2

I created a wallet before Bitcoin Core 0.13.0 was released so my wallet is not a HD wallet. How do I make my wallet a HD wallet?

  • A thumbs up because it's your first question, and have given so many answers. – croraf Oct 22 '17 at 21:52
2

Since Bitcoin Core 0.17, there is an automatic way to directly upgrade a wallet from non-HD to HD. Simply start Bitcoin Core with the the -upgradewallet option and have no other wallets (i.e. remove all -wallet= and wallet= options from the command line and bitcoin.conf respectively) being loaded. -upgradewallet does not work when multiple wallets are loaded. This will automatically generate a new seed and keypool while also retaining all of your old private keys and transactions so nothing is lost.


Prior to Bitcoin Core 0.17, there was no mechanism for migrating non-HD wallets to HD wallets. If you don't want to upgrade to 0.17+, then migrating your coins to an HD wallet is possible, at the expense of invalidating your backups and a bit of work.

First you will need to backup your current wallet. Stop Bitcoin Core and back up your wallet.dat file. Now rename your wallet.dat file to something else, like wallet-orig.dat.

Now start Bitcoin Core again. Bitcoin Core will create a new wallet.dat file. This one will be HD and that will be the file that you want to actually use later.

Once Bitcoin Core has started, encrypt your wallet and restart Bitcoin Core. Once you have restarted it, you should see no transactions and no (or one) addresses. Now get a couple of addresses and write them down somewhere. Stop Bitcoin Core again and backup your new wallet.dat file. Rename your new wallet.dat file to something else, like wallet-new.dat and rename your old wallet.dat file (wallet-orig.dat) back to wallet.dat.

Start Bitcoin Core again. You should see your old addresses and transactions. Go to the Send tab and send your Bitcoin to the addresses that you wrote down earlier.

Finally, stop Bitcoin Core, rename your new wallet.dat file (wallet-new.dat) back to wallet.dat. Back it up again and start Bitcoin Core again. You should now see transactions from your previous wallet sending Bitcoin to your new wallet. Once those transactions have confirmed, you have successfully migrated your Bitcoin from a non-HD Bitcoin Core wallet to a HD Bitcoin Core wallet.

1

In Bitcoin Core 0.17.0, they added a startup option -upgradewallet which does the upgrade to an HD wallet, and retains all history.

  • >Since Bitcoin Core 0.17, there is an automatic way to directly upgrade a wallet from non-HD to HD. Simply start Bitcoin Core with the the -upgradewallet option and have no other wallets (i.e. remove all -wallet= and wallet= options from the command line and bitcoin.conf respectively) being loaded. -upgradewallet does not work when multiple wallets are loaded. This will automatically generate a new seed and keypool while also retaining all of your old private keys and transactions so nothing is lost. – Rutger Versteegden Aug 25 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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