THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Bitcoin over Tor Explained: Onion Peers, IP Privacy, and Node Connectivity

permalink THAMER
#bitcoin-tor#node-privacy#onion-services#p2p-connectivity

Bitcoin nodes can communicate through Tor, a network that routes traffic through privacy-preserving circuits. Tor can help prevent a directly connected peer from learning the node operator's ordinary public IP address, but the degree of privacy depends on the actual network configuration and traffic patterns.

What does an onion address represent?

An onion service provides a Tor-reachable endpoint. Bitcoin peers can advertise and connect to supported onion addresses through network-aware address handling. BIP155's addrv2 format was introduced to represent address types, including modern Tor addresses, that did not fit older address encodings.

An onion address is a network endpoint, not proof that its operator is honest. Bitcoin's consensus checks still apply to every block and transaction obtained from an onion peer.

Outbound versus inbound connectivity

An outbound Tor connection allows a node to contact other peers through Tor. An onion service can also make the node reachable for inbound connections without exposing a conventional publicly reachable IP address in the same way as an ordinary clearnet listener.

These are separate capabilities. A node can make outbound connections without necessarily offering a reachable onion service. Settings and behavior depend on the Bitcoin Core version, Tor setup, and network environment.

Privacy benefits and limitations

Tor can reduce direct IP disclosure and make some network-level linking harder. It does not automatically make Bitcoin transactions anonymous: on-chain transaction graphs, address reuse, timing patterns, and application-level disclosures can still reveal relationships.

A peer can observe the transaction messages it receives, even if the transport is routed through Tor. A poorly configured application may also connect over clearnet or leak identifying data through services outside Bitcoin's P2P connection.

Tor compared with BIP324

Tor primarily addresses network routing and location privacy. BIP324 protects the contents of the Bitcoin P2P transport stream between peers. They solve different problems and can complement one another. Neither technology alone guarantees that a node cannot be eclipsed or that a wallet's on-chain activity is private.

Operational considerations

Tor routing may introduce additional latency and dependencies. Operators should monitor connectivity, keep Tor and Bitcoin Core updated, and test whether their intended inbound and outbound paths actually use the desired transport. For critical services, privacy choices should be balanced against availability and peer diversity.

Primary references

BIP155 — addrv2 message: https://github.com/bitcoin/bips/blob/master/bip-0155.mediawiki

Bitcoin Core network documentation: https://bitcoincore.org/en/doc/

Tor Project documentation: https://community.torproject.org/onion-services/

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects