Generate new .onion address for bitcoind over tor

2

Been following this guide just to tinker around with bitcoind over tor. According to the guide, when bitcoind controls the tor daemon using controlport=9051 whenever you restart bitcoind tor should generate a new .onion address. This is not happening. If I restart bitcoind, tor or both, it always uses the same old .onion address. A fully system restart doesn't work either.

how do I generate a new .onion address?

Note: I am NOT using /blah/var/hidden_service and cannot just delete the private key in that folder. When using controlport there doesn't seem to be a private key anywhere. Or is there?

Mike

Posted 2018-12-04T03:38:21.890

Reputation: 105

Answers

2

bitcoind will cache the private key used. It is located at in the onion_private_key file in your bitcoind data directory (default will be ~/.bitcoin/onion_private_key). Delete that file and you should get a new onion private key and thus a new onion URL.

Andrew Chow

Posted 2018-12-04T03:38:21.890

Reputation: 40 910

Perfect. How is this not documented anywhere. I've been searching high and low. Even TOR's official manual/guide says it will generate a new .onion when bitcoind rebootsMike 2018-12-05T02:40:21.790

1

It's mentioned here: https://github.com/bitcoin/bitcoin/blob/master/doc/files.md, but I agree that the documentation could use some work.

Andrew Chow 2018-12-05T04:46:35.850