## Why run a node behind Tor

PotCoin is a transparent Proof-of-Stake chain — everything on-chain is public. That's by design. But the _network layer_ is a different story: every peer you connect to sees your IP address as soon as you broadcast a transaction or a staked block. Running the daemon behind Tor closes that gap by tunneling all P2P traffic through the Tor anonymity network.

**Who this is for**

- Node operators who don't want their home/office IP logged by every peer
- Stakers running a 24/7 validator who'd rather not advertise its location
- Anyone on a restricted or surveilled network

This is _optional_. The chain works fine without Tor — it's just an extra layer of operational privacy.

## Step-by-step

1. ### Install Tor

```
   # Debian / Ubuntu / Raspberry Pi OS
   $ sudo apt update && sudo apt install tor

# macOS
   $ brew install tor

# Windows: download Tor Expert Bundle from torproject.org
   ```

2. ### Make sure Tor is running on port 9050

```
   $ sudo systemctl enable --now tor
   $ ss -lnt | grep 9050
   LISTEN  0  4096  127.0.0.1:9050  0.0.0.0:*
   ```

3. ### Edit your potcoin.conf

Path: `~/.potcoin/potcoin.conf` on Linux/macOS or `%APPDATA%\PotCoin\potcoin.conf` on Windows.

```
   # Route all P2P traffic through Tor
   proxy=127.0.0.1:9050
   onlynet=ipv4
   listen=0
   discover=0

# Optional: only connect to onion seeds
   # onlynet=onion
   ```

4. ### Restart the daemon

```
   $ potcoind stop
   $ potcoind -daemon
   ```

5. ### Verify Tor is in use

```
   $ potcoind getnetworkinfo | grep -A2 networks
   # look for: "name": "ipv4", "proxy": "127.0.0.1:9050"

$ potcoind getpeerinfo | head -30
   # external addresses should be onion or your VPN exit
   ```

6. ### Confirm DNS is also tunneled

```
   $ potcoind getnetworkinfo | grep -i nameproxy
   # nameproxy should equal proxy — DNS leaks defeat the whole point
   ```

**Seed nodes vs staking nodes**  
The public seed nodes (`seeds.potcoin.com`) stay _non-Tor_ on purpose so new wallets can find peers. Personal staking/validator nodes that hold funds — yours — are the ones that benefit most from being behind Tor.

**Don't reuse the daemon's wallet over the regular internet**  
Once you've configured Tor, never start the daemon without it — that one accidental boot leaks your IP to every peer that connects in the first 60 seconds.
