I have a wallet on an offline computer, which has too many backups on connected computers.

I would like to generate a totally new bitcoin address on the offline computer, and use it as a cold storage address. I will then sign an offline transaction from the wallet to that new address and be safe.

How can I create a new Bitcoin private key from the Bitcoin CLI, without using any existing wallet keys / addresses?

I've looked into getnewaddress, but it seems to be getting the keys from the keypool on the existing wallet.

Note - I know I can use bitaddress.org offline, but I would like to use the basic bitcoin-core tools for this one.

  • pybitcointools' CLI random_key function perhaps?
    – hartmut
    Jul 15, 2016 at 13:40
  • @hartmut Thanks! Nice option, but I'd rather use bitcoin-core.
    – Adam Matan
    Jul 16, 2016 at 1:25

3 Answers 3


Maybe do:

1.) Move to current wallet.dat to a different location (will result in creating a fresh wallet)

2.) Start bitcoind/qt with -keypool=1 (if you want to avoid keypools)

3.) Call getnewaddress

You might also consider using a hardware wallet.


Yes it grabs from the keypool which is a security/back-up feature so that you have future addresses private keys stored.

I guess I don't understand your problem, why don't you want it to pull from the keypool exactly? I suppose you could change your bitcoin.conf to keypool=1 or some other small number, and then generate new addresses. That way your newly generated address will be a new one that is not from the previously existing key pool. But again I'm not sure what purpose this would serve. The new keys will be saved to your wallet either way, whether your have keypool=1 or keypool=1000.

  • This does not work with HD wallets, as of bitcoin core 0.13 Aug 15, 2016 at 10:08
  • Also, you can not reduce the keypool by setting keypool=1 (You actually need to drain it by calling getnewaddress repeatedly) Aug 15, 2016 at 10:10

you need to use multiple wallet.dat files. create multiple wallet.dat files from file > backup wallet, after encrypting each wallet from settings > encrypt wallet create as below example : savings-wallet-1.dat savings-wallet-2.dat spending-wallet-1.dat

and so on...

on linux : replace ~/.bitcoin/wallet.dat with the one you wish to use for your current session

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.