Bitcoin Forum
March 13, 2026, 02:56:08 PM *
News: Latest Bitcoin Core release: 30.2 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Encrypting / locking a wallet when not using a GUI / QT ?  (Read 1319 times)
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
January 03, 2015, 09:08:39 PM
 #1

Ok, so when using Bitcoin-QT aka the fancy GUI. You can lock / encrypt the wallet that otherwise has all your addresses in it. Well, if one does not use the GUI aka Bitcoin-QT how does one go about locking / encrypting the wallet from the command line ?

Assuming it's doable from the command line, which I don't see why it wouldn't be since the GUI aka QT is just a fancy front end to the backend bitcoind as I understand it.

Ty.

To be decided...
activebiz
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


View Profile
January 03, 2015, 10:45:43 PM
 #2

./bitcoind encryptwallet <passphrase>
Encrypts the wallet with <passphrase>.

./bitcoind walletpassphrase <passphrase> <timeout>
Stores the wallet decryption key in
memory for <timeout> seconds.

./bitcoind walletlock
Removes the wallet encryption key from
memory, locking the wallet. After calling
this method, you will need to call
walletpassphrase again before being able
to call any methods which require the
wallet to be unlocked.

MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
January 03, 2015, 11:40:55 PM
 #3

./bitcoind encryptwallet <passphrase>
Encrypts the wallet with <passphrase>.

./bitcoind walletpassphrase <passphrase> <timeout>
Stores the wallet decryption key in
memory for <timeout> seconds.

./bitcoind walletlock
Removes the wallet encryption key from
memory, locking the wallet. After calling
this method, you will need to call
walletpassphrase again before being able
to call any methods which require the
wallet to be unlocked.
Ty for this, I had a friend trying to help me figure it out but he couldn't seem to dig anything up.

To be decided...
activebiz
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


View Profile
January 05, 2015, 05:31:11 AM
 #4

sure u can find more useful API commands here. https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

fenghush
Sr. Member
****
Offline Offline

Activity: 658
Merit: 250



View Profile
January 09, 2015, 05:54:52 PM
 #5

./bitcoind encryptwallet <passphrase>
Encrypts the wallet with <passphrase>.

./bitcoind walletpassphrase <passphrase> <timeout>
Stores the wallet decryption key in
memory for <timeout> seconds.

./bitcoind walletlock
Removes the wallet encryption key from
memory, locking the wallet. After calling
this method, you will need to call
walletpassphrase again before being able
to call any methods which require the
wallet to be unlocked.
Ty for this, I had a friend trying to help me figure it out but he couldn't seem to dig anything up.

You should run unset HISTFILE or equivalent command for resetting the history file of your shell  so your wallet password wont be stored in plain text in your shell's history file before you encrypt/decrypt your wallet .

MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
January 10, 2015, 08:35:56 AM
 #6

./bitcoind encryptwallet <passphrase>
Encrypts the wallet with <passphrase>.

./bitcoind walletpassphrase <passphrase> <timeout>
Stores the wallet decryption key in
memory for <timeout> seconds.

./bitcoind walletlock
Removes the wallet encryption key from
memory, locking the wallet. After calling
this method, you will need to call
walletpassphrase again before being able
to call any methods which require the
wallet to be unlocked.
Ty for this, I had a friend trying to help me figure it out but he couldn't seem to dig anything up.

You should run unset HISTFILE or equivalent command for resetting the history file of your shell  so your wallet password wont be stored in plain text in your shell's history file before you encrypt/decrypt your wallet .
Good point, I noticed when I use the up arrow that it allows previous commands to be pulled.

So just: unest HISTFILE

?

To be decided...
fenghush
Sr. Member
****
Offline Offline

Activity: 658
Merit: 250



View Profile
January 10, 2015, 11:24:15 AM
 #7

./bitcoind encryptwallet <passphrase>
Encrypts the wallet with <passphrase>.

./bitcoind walletpassphrase <passphrase> <timeout>
Stores the wallet decryption key in
memory for <timeout> seconds.

./bitcoind walletlock
Removes the wallet encryption key from
memory, locking the wallet. After calling
this method, you will need to call
walletpassphrase again before being able
to call any methods which require the
wallet to be unlocked.
Ty for this, I had a friend trying to help me figure it out but he couldn't seem to dig anything up.

You should run unset HISTFILE or equivalent command for resetting the history file of your shell  so your wallet password wont be stored in plain text in your shell's history file before you encrypt/decrypt your wallet .
Good point, I noticed when I use the up arrow that it allows previous commands to be pulled.

So just: unest HISTFILE

?
If you're using bash unset HISTFILE will prevent bash from writing the command line history in .bash_history, to remove the 'up arrow' command history I believe the variable is HISTSIZE=0

MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
January 10, 2015, 11:59:45 AM
 #8

You should run unset HISTFILE or equivalent command for resetting the history file of your shell  so your wallet password wont be stored in plain text in your shell's history file before you encrypt/decrypt your wallet .
Good point, I noticed when I use the up arrow that it allows previous commands to be pulled.

So just: unest HISTFILE

?
If you're using bash unset HISTFILE will prevent bash from writing the command line history in .bash_history, to remove the 'up arrow' command history I believe the variable is HISTSIZE=0
Not sure what I'm using TBH but I def want to not "store" the unlock/lock password anywhere.

To be decided...
fenghush
Sr. Member
****
Offline Offline

Activity: 658
Merit: 250



View Profile
January 10, 2015, 01:48:15 PM
 #9

You should run unset HISTFILE or equivalent command for resetting the history file of your shell  so your wallet password wont be stored in plain text in your shell's history file before you encrypt/decrypt your wallet .
Good point, I noticed when I use the up arrow that it allows previous commands to be pulled.

So just: unest HISTFILE

?
If you're using bash unset HISTFILE will prevent bash from writing the command line history in .bash_history, to remove the 'up arrow' command history I believe the variable is HISTSIZE=0
Not sure what I'm using TBH but I def want to not "store" the unlock/lock password anywhere.
You can run echo $SHELL to figure that out. It's most likely bash.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!