I anticipated Solana-cli to encrypt the storage of secret keys or seeds, but it doesn't. When I run solana-keygen new It asks passphrase, however id.json file is not encrypted. I can read it with text editor. What was passphrase for? Is this expected behavior, or am I doing something wrong?

2 Answers 2


This is expected.

Your local id.json should only be used for tests and nothing more e.g storage of your assets.

Still, it is possible to not write the KP to the id.json file using

solana-keygen new --no-outfile

docs: https://docs.solanalabs.com/cli/wallets/paper

  • It coulnd't figure out how to use paper wallet to sign. When I transfer, deploy etc. solana-cli uses id.json.
    – kadir
    Commented Jun 3 at 11:09
  • solana config --keypair <KEYPAIR_PATH_TO_USE.JSON>
    – Jimii
    Commented Jun 3 at 17:32
  • It seems like I'll need to transition away from using a paper wallet. I had hoped for a more secure method where it could prompt me for the paper wallet's secret key. As a compromise, I'll opt for a file system wallet, though I'll hope there are no malware on my computer. While I'm cautious about installing anything suspicious on my PC, it's hard to be entirely certain.
    – kadir
    Commented Jun 4 at 6:05

You should be able to store keypairs on a flash drive or use the hardware wallets like Ledger.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.