How to enable wallet encryption from the command line?

5

Which command should I use to encrypt a previously unencrypted wallet from the command line?

Alexey Kalmykov

Posted 2014-04-22T10:50:26.890

Reputation: 744

Answers

6

The command is: bitcoin-cli encryptwallet mypassphrase.

The list with all commands exposed through bitcoind's RPC API can be found here: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list or can be fetched with the command: bitcoin-cli help.

It's worth noting that the encryptwallet command will not show up in bitcoin-cli help's results once your wallet is encrypted, instead you will get three new commands: walletlock, walletpassphrase and walletpassphrasechange.

George Kimionis

Posted 2014-04-22T10:50:26.890

Reputation: 2 824

1Thanks a lot! My problem was that I used "help" to see the list of the commands on another installation with encrypted wallet. So it didn't show me the this command.Alexey Kalmykov 2014-04-22T11:12:26.247