HomePart 2: AntminerPart 3: Pi Relay
Part 3 of 3 — The Bridge

Raspberry Pi 5 VPN Relay: Remote Mining from Anywhere

Replace a power-hungry Windows desktop with a 5-watt Raspberry Pi 5. Use Tailscale to create a secure VPN tunnel between your hangar and home, and socat to forward mining traffic seamlessly.

What You Will Need

  • Parts 1 and 2 complete — node running, Antminer configured
  • Raspberry Pi 5 (4GB) — see the Parts List for exact model
  • Official Raspberry Pi 27W USB-C Power Supply
  • Aluminum passive heatsink case (iUniker or similar)
  • 8GB+ microSD card (128GB recommended for permanent install)
  • Ethernet cable to connect Pi to the hangar router
  • A computer to flash the SD card (Windows, Mac, or Linux)
  • A free Tailscale account (tailscale.com)

Why Replace the Windows Desktop?

A Windows desktop draws 100–150W continuously just to act as a network relay. A Raspberry Pi 5 does the exact same job at 5–8W — saving you roughly $8–12/month in electricity. It also runs silently, has no moving parts, and is far more reliable for 24/7 unattended operation.

Step-by-Step Instructions

1

Assemble the Raspberry Pi

Before inserting the SD card, assemble the Pi into the aluminum passive heatsink case. The case acts as the heatsink — apply the included thermal pads to the CPU and other chips as shown in the case instructions, then close it up.

Thermal Pads Are Critical

The aluminum case only works as a heatsink if the thermal pads make proper contact with the chips. Take your time with this step. A poorly assembled case can cause thermal throttling.
2

Flash the SD Card with Raspberry Pi OS

Download and install Raspberry Pi Imager on your computer. Insert the microSD card and open the imager.

  1. Click Choose Device → Select Raspberry Pi 5
  2. Click Choose OSRaspberry Pi OS (64-bit)
  3. Click Choose Storage → Select your SD card
  4. Click the gear/settings icon (⚙) before writing

In the settings, configure:

SettingValue
Hostnamehangar-pi
Enable SSHYes — Use password authentication
Usernamepi
PasswordA strong password (write it down!)
WiFiLeave blank — use ethernet
TimezoneYour local timezone

Click Save, then Write. The flash takes about 5–10 minutes.

3

Boot the Pi and Connect via SSH

Insert the flashed SD card into the Pi, connect an ethernet cable from the Pi to the hangar router, and plug in the power supply. Wait 60–90 seconds for the first boot to complete.

From any computer on the hangar network, connect via SSH:

If that does not work, find the Pi's IP from your router's device list, then use:

If SSH Says 'Connection Refused'

If you get "Connection refused", SSH may not have been enabled during the flash. Remove the SD card, plug it into your computer, open the bootfs partition, and create an empty file named exactly ssh (no extension). Reinsert and reboot.
4

Update the Pi and Install Tailscale

Once connected via SSH, update the system first:

sudo apt update && sudo apt upgrade -y

Then install Tailscale with one command:

curl -fsSL https://tailscale.com/install.sh | sh

Connect the Pi to your Tailscale network and advertise the hangar subnet:

sudo tailscale up --advertise-routes=192.168.0.0/24 --accept-routes

It will print a URL — open it in a browser and log in to your Tailscale account to authenticate the Pi.

5

Approve the Subnet Route in Tailscale Admin

Log into the Tailscale admin console at login.tailscale.com/admin/machines.

  1. Find hangar-pi in the machine list
  2. Click the three-dot menu (...) next to it
  3. Click "Edit route settings"
  4. Enable the route 192.168.0.0/24
  5. Click Save

What This Does

Approving the subnet route tells Tailscale to route traffic for the entire 192.168.0.x network through the Pi. This means you can access the Antminer's web interface at 192.168.0.107 from anywhere in the world as long as Tailscale is running.
6

Set Up the Mining Traffic Relay with socat

Enable IP forwarding so the Pi can forward network packets:

echo "net.ipv4.ip_forward=1" | sudo tee /etc/sysctl.d/99-ipforward.conf
sudo sysctl -w net.ipv4.ip_forward=1

Install socat (a reliable TCP relay tool):

sudo apt install socat -y

Create a systemd service that forwards port 3333 from the Pi to your home node's Tailscale IP:

Create the service file:
sudo tee /etc/systemd/system/mining-relay.service << 'EOF'
[Unit]
Description=Mining Pool Relay
After=network.target tailscaled.service
Wants=tailscaled.service

[Service]
ExecStart=/usr/bin/socat TCP-LISTEN:3333,fork,reuseaddr TCP:100.99.146.78:3333
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

Replace 100.99.146.78 with your home node's Tailscale IP address. Then enable and start the service:

sudo systemctl enable mining-relay
sudo systemctl start mining-relay
sudo systemctl status mining-relay

You should see Active: active (running).

7

Update the Antminer Pool URL and Test

Now update the Antminer's Pool 1 URL to point to the Pi instead of the Windows desktop. In the Antminer web interface (http://192.168.0.107), go to Miner Configuration → Pools and change Pool 1:

FieldOld ValueNew Value
Pool 1 URLstratum+tcp://192.168.0.100:3333 (old Windows PC)stratum+tcp://192.168.0.108:3333 (Pi)

Clear the Field Before Typing

Make sure to completely clear the Pool 1 URL field before typing the new address. If you accidentally append the new URL to the old one, Pool 1 will show "Abnormal". The field should contain only the new URL.

Save and restart the Antminer. Within 2–3 minutes, Pool 1 should show "Normal".

Setup Complete! 🎉

Your Raspberry Pi is now the sole relay between the Antminer and your home Bitcoin node. You can safely shut down the Windows desktop permanently. The Pi uses only 5–8 watts and will run unattended indefinitely.
Diagram showing Raspberry Pi relay forwarding mining traffic through Tailscale VPN

Power Savings Summary

DevicePower DrawMonthly Cost*Annual Cost*
Windows Desktop (old relay)~120W~$8.64~$103.68
Raspberry Pi 5 (new relay)~6W~$0.43~$5.18
Savings~114W~$8.21/month~$98.50/year

*At $0.10/kWh, 24/7 operation

Troubleshooting

❓ Pool 1 shows 'Abnormal' after updating the URL

✅ The URL field likely has extra text. Clear it completely and retype: stratum+tcp://192.168.0.108:3333

❓ SSH connection refused to hangar-pi.local

✅ SSH was not enabled during flashing. Create an empty file named 'ssh' (no extension) in the bootfs partition of the SD card.

❓ Tailscale shows the Pi but subnet route is not working

✅ Make sure you approved the 192.168.0.0/24 route in the Tailscale admin console at login.tailscale.com/admin/machines.

❓ mining-relay service shows 'inactive (dead)'

✅ Run: sudo systemctl start mining-relay && sudo journalctl -u mining-relay -n 20 to see the error.