1

My bitcoin Tor node recently suffered a hard disk failure. After changing the hardware, re-installing Linux and bitcoind, setting up Tor for a hidden service, I realized (obviously !) that my external onion address had to change. So my question is: what do I need to do to ensure I keep the same onion address the next time my node suffers unrecoverable failure? Looking at the directory /var/lib/tor/bitcoin_service, I can see two files hostname and private_key where the former does contain my onion address (which I think is related to my private key). So I am guessing all I need to do is back up these files and restore them in my new system (while setting up /etc/tor/torrc and bitcoin.conf appropriately of course, as explained here). Do I need more?

EDIT: it seems that simply importing the files hostname and private_key into a new system (having properly defined /etc/tor/torrc and bitcoin.conf) does not work (the node fails to connect to Tor network). So Tor probably maintains additional state apart from these two files. So the question remains open: how to set up a new system so as to keep existing onion address.

1

Depending on the version of Bitcoin Core and Tor you are using, there is the possibility that your installation was actually making use of Tor control and not actually using the configuration from your torrc. Have a look in the /.bitcoin/ folder for onion_private_key and try exiting Bitcoin Core, putting that file back in place from your old HDD and, restart Bitcoin Core.

I do not know if you will also need to do the same for the Tor auth cookie /run/tor/control.authcookie?

There is an updated setup guide for running Bitcoin Core and Tor on Bitcoin.SE right here.

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.