Privacy advocates have long recommended using Bitcoin over Tor, an anonymizing network that hides your IP address from the services you use on the Internet. The default configuration of Bitcoin Core is set to run over the traditional IPv4 Internet. In order to connect to other peers, nodes must know each others’ IP addresses, and this information becomes available to the public Bitcoin network. The Tor network allows computers to connect to each other without exposing IP addresses. Bitcoin Core can be configured to operate on the Tor network and ignore the IPv4 network.
These instructions set up the following:
- Install the official Tor client from the Ubuntu armhf repository
- Configure Tor to run a hidden service and run it automatically
- Configure Bitcoin Core to route all peer-to-peer connections via Tor only
This setup does not enable Tor as a relay, bridge, or exit node. If you want to add any of those capabilities, please consult the Tor Project website for instructions.
First run this setup script. It installs and runs Tor and gets everything set up and running.
chmod 755 torsetup.sh
Bitcoin will restart and begin looking for peers on the Tor onion network. It may take a while to find many nodes. If all is working, the GUI status page should show more than 0 peers.
If you later want to switch Bitcoin back to the regular Internet, use the following script. The same script can be used to switch back to Tor again. After each change, Bitcoin will restart. This script changes which network Bitcoin uses. Tor will continue running on the device even if Bitcoin is not using it.
chmod 755 ToggleTor.sh
If you want to remove Tor run:
sudo apt-get remove tor