Tor (The Onion Router) is an anonymity network that hides your real IP address by routing traffic through encrypted relays before it reaches its destination. In Bitcoin, routing your node's traffic through Tor prevents peers and analytics firms from recording which IP address broadcast a given transaction.
This article assumes you have a personal node running. If you have not yet set one up, Running a Bitcoin Node covers the hardware, software, and Sparrow connection options.
What is Tor?
When you visit a website, your traffic passes through your Internet Service Provider and potentially other intermediaries before it reaches its destination. These parties can observe what you access, log that data, sell it to advertisers or other third parties, or hand it over to authorities on request. The destination itself also sees your IP address, which reveals your approximate location and can be used to track you across visits.
Tor is open-source software developed by the non-profit Tor Project that addresses this issue. It routes your traffic through three volunteer-operated relays before it reaches its destination, using layered encryption so that no single party can connect both ends of the communication. This layered approach is the origin of its name: The Onion Router.
Before leaving your device, your data is wrapped in three layers of encryption, one for each relay. Each relay can only decrypt its own outer layer, which reveals the address of the next relay and nothing more. The three relays work as follows:
- The guard node receives your traffic directly from your device. It knows your real IP address but does not know the final destination of your traffic, only the address of the next relay.
- The middle relay receives traffic from the guard node. It knows neither your IP address nor the final destination. Its role is to pass traffic between the two outer relays, preventing either from knowing both ends of the connection.
- The exit node receives traffic from the middle relay and delivers it to its final destination. It knows where the traffic is going but has no way to identify where it originated.
No single relay ever holds enough information to connect both ends of the communication. The result is that your traffic cannot be attributed to your real IP address by the destination, by any relay, or by anyone observing the network in between.
Tor is not a VPN. A VPN routes traffic through a single company-operated server that can log your activity and comply with legal requests. Tor routes through independent volunteer relays with no single point of control or visibility.
Tor also supports hidden services, which are servers accessible only within the Tor network via .onion addresses with no publicly visible IP. Both Bitcoin nodes and Electrum servers can expose .onion addresses, enabling fully private remote access without exposing your home network's location.
What is the IP Address Threat to Bitcoin Privacy?
Your IP address and your internet traffic are not anonymous. Your IP address identifies your internet service provider and pinpoints your geographic location to the city level.
When you interact with the Bitcoin network, that activity travels over the same internet infrastructure described above. Your node broadcasts transactions to peers and maintains active connections to the Bitcoin peer-to-peer network, all originating from your real IP address.
Blockchain analytics firms exploit this directly. Companies like Chainalysis operate large numbers of listener nodes seeded across the Bitcoin network to record which IP address first broadcasts each transaction. When your node announces a transaction, those listener nodes log your IP alongside the transaction ID, creating a database record linking your network location to that transaction and the on-chain addresses involved.
If your on-chain addresses are already linked to your identity through KYC exchange records or other means, IP correlation adds an independent confirmation of that link. If your IP appears consistently across multiple broadcasts, analytics firms can use it to associate previously unlinked transactions with your known cluster.
Running your own node and routing your Bitcoin traffic through Tor together close both vectors of network-level exposure.
- Your node resolves address queries locally, so no third-party server logs your IP and transaction queries to build a profile of your holdings.
- Tor ensures outbound transaction broadcasts reach the peer network through an exit node, so analytics listener nodes see that IP rather than yours.
With this setup, neither your queries nor your broadcasts are attributable to your real network location, as described in What is Bitcoin Privacy?.
How Does Tor Work with Bitcoin?
When Tor is enabled, your Bitcoin node's traffic routes through Tor's encrypted relay circuit rather than connecting directly over the open internet.
Your node maintains connections to peers, broadcasts transactions, receives transactions from other nodes to hold in its mempool, and receives and validates new blocks. All of that traffic goes through Tor. In practice this means that everything your node connects to sees the Tor exit node's IP address rather than yours.
When you broadcast a transaction, here is how it moves through the circuit:
- Guard node. Your node sends the encrypted transaction data to the guard node. This is the only relay in the circuit that sees your real IP address, but it cannot read the transaction data or see where it is ultimately going.
- Relay node. The guard node passes the encrypted data to the middle relay. This node knows neither your IP address nor the final destination. It receives the encrypted packet and forwards it to the exit node.
- Exit node. The exit node receives the data, decrypts the final layer, and delivers your transaction to the Bitcoin peer network. It knows the destination but has no way of knowing your IP address. Peers on the network receive your broadcasted transaction from the exit node's IP address and have no information about where it originated.
Tor also supports onion services, which keep traffic entirely within the Tor network with no exit node. This is how a Fulcrum Electrum server can expose a .onion address for Sparrow to connect to remotely, with no IP address exposed on either side.
One limitation applies to nation-state adversaries with visibility across large portions of the Tor network, who can in theory use timing correlation to de-anonymize users. For the vast majority of Bitcoin users this is not a realistic threat. The relevant adversaries are commercial analytics firms, not global surveillance agencies conducting targeted attacks.
Dandelion++ (BIP-156) is a separate protocol-level proposal that would route transactions through a serial stem phase before public broadcast, reducing first-hop information even without Tor. It is not deployed in Bitcoin Core as of this writing and is a watch item rather than a current option.
How Do I Configure Bitcoin Core with Tor?
Bitcoin Core has had native Tor support since version 0.12 (2016). No additional software bridge is required. The key configuration lives in the bitcoin.conf file. Four settings matter for Tor integration:
-
proxy=127.0.0.1:9050routes all outbound connections through the local Tor SOCKS proxy. This is the foundational setting. Without it, Bitcoin Core connects to peers directly over clearnet. -
onlynet=onionrestricts Bitcoin Core to Tor-only peer connections, the maximum privacy configuration. The tradeoff is a smaller peer pool and a slight latency increase in the range of 200 to 500 milliseconds. For most self-custody users prioritising privacy over connectivity, this tradeoff is appropriate. -
listen=1andbind=127.0.0.1enable Bitcoin Core to accept incoming connections and restrict it to listening only on the loopback interface. This prevents Bitcoin Core from advertising your real IP address to peers. Withoutlisten=1, Bitcoin Core runs in outbound-only mode and no .onion address is created. -
Tor control port access. Bitcoin Core automatically creates and advertises a .onion address at startup if it can reach Tor's control port (
torcontrol=127.0.0.1:9051by default). The standard authentication method is cookie-based: on Linux, add the user running Bitcoin Core to thetorgroup, and ensure yourtorrcincludesControlPort 9051,CookieAuthentication 1, andCookieAuthFileGroupReadable 1. On platforms where cookie authentication is unavailable,torpasswordcan authenticate against aHashedControlPasswordintorrcinstead. Once the control port connection is established, Bitcoin Core generates and maintains its.onionaddress automatically.
Mixed mode, which omits onlynet=onion, maintains both clearnet and Tor peer connections simultaneously. Clearnet peers see your real IP address, so mixed mode provides better connectivity at the cost of weaker IP privacy. For self-custody users who want the network privacy layer covered completely, Tor-only mode is the right configuration.
If you are using Umbrel or Start9, Tor is configured and active by default. You do not need to edit bitcoin.conf manually. Both platforms expose .onion addresses for Bitcoin Core and Electrum server services automatically through their interfaces.
How Do I Connect Sparrow via Tor?
Sparrow includes a built-in Tor proxy and does not require a separate Tor installation to connect via .onion. Sparrow's official documentation at sparrowwallet.com/docs covers the full connection setup. The steps below cover the basics of the two proxy approaches.
Using Sparrow's internal Tor (simplest):
- In Sparrow, open Preferences and navigate to the Server tab.
- Select Private Electrum and enter your Fulcrum server's .onion address and port number. Leave the proxy toggle off.
- Click Test Connection. When an .onion address is detected and no external proxy is configured, Sparrow starts its bundled Tor proxy automatically. The green server indicator in the bottom toolbar confirms the connection.
Using a system Tor instance (Tor running separately):
- In Sparrow, open Preferences and navigate to the Server tab.
- Enable the Use Proxy toggle. Enter
127.0.0.1and port9050for a system Tor service, or9150if you are using Tor Browser. - Enter your Fulcrum server's .onion address in the Private Electrum field.
- Click Test Connection to confirm.
Once connected, Sparrow reaches your personal node from any network without exposing your home IP or current location.
To verify Tor is active on Bitcoin Core, check the debug.log file for a line containing tor: Got service ID followed by a .onion address. You can also check the getnetworkinfo RPC output for entries under localaddresses with type "tor."
A common misconfiguration is enabling Tor for transaction broadcast while continuing to query a clearnet Electrum server. The Electrum server already observed your address set and IP during the query, so Tor at broadcast time does nothing for the exposure that already occurred. The correct setup routes everything through Tor: address queries through a Tor-connected Sparrow to a .onion Fulcrum server, and transaction broadcast through a Tor-enabled Bitcoin Core node.
The complete network privacy stack is Bitcoin Core with onlynet=onion, Fulcrum exposed as a .onion hidden service, Sparrow connecting via Tor to that hidden service, and Coldcard signing PSBTs via QR code or SD card with no network interface. The node removes address query observation. Tor removes IP correlation at broadcast and peer connection time. Coldcard keeps signing operations offline.
Full Privacy Stack Reference
| Privacy threat | Tool | Layer |
|---|---|---|
| Address clustering (CIOH) | CoinJoin, PayJoin, coin control | On-chain |
| Change output detection | PayJoin, fresh addresses | On-chain |
| Address reuse linkage | Fresh addresses for every receive | On-chain |
| Address query observation | Personal Bitcoin node | Network |
| IP address correlation | Tor | Network |
Related articles
What is Bitcoin Privacy?
The three-layer privacy framework Tor fits within and the network layer it addresses.
Running a Bitcoin Node
Setting up the personal node that Tor-enabled Bitcoin Core and Sparrow connect to.
What is CoinJoin?
On-chain privacy that breaks address clustering, complementing Tor's network-level protection.
Bitcoin Address Reuse and Management
On-chain address hygiene that complements network-level privacy measures.