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?
Step-by-Step Instructions
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
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.
- Click Choose Device → Select Raspberry Pi 5
- Click Choose OS → Raspberry Pi OS (64-bit)
- Click Choose Storage → Select your SD card
- Click the gear/settings icon (⚙) before writing
In the settings, configure:
| Setting | Value |
|---|---|
| Hostname | hangar-pi |
| Enable SSH | Yes — Use password authentication |
| Username | pi |
| Password | A strong password (write it down!) |
| WiFi | Leave blank — use ethernet |
| Timezone | Your local timezone |
Click Save, then Write. The flash takes about 5–10 minutes.
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'
ssh (no extension). Reinsert and reboot.Update the Pi and Install Tailscale
Once connected via SSH, update the system first:
sudo apt update && sudo apt upgrade -yThen install Tailscale with one command:
curl -fsSL https://tailscale.com/install.sh | shConnect the Pi to your Tailscale network and advertise the hangar subnet:
sudo tailscale up --advertise-routes=192.168.0.0/24 --accept-routesIt will print a URL — open it in a browser and log in to your Tailscale account to authenticate the Pi.
Approve the Subnet Route in Tailscale Admin
Log into the Tailscale admin console at login.tailscale.com/admin/machines.
- Find hangar-pi in the machine list
- Click the three-dot menu (...) next to it
- Click "Edit route settings"
- Enable the route 192.168.0.0/24
- Click Save
What This Does
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.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=1Install socat (a reliable TCP relay tool):
sudo apt install socat -yCreate a systemd service that forwards port 3333 from the Pi to your home node's Tailscale IP:
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
EOFReplace 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-relayYou should see Active: active (running).
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:
| Field | Old Value | New Value |
|---|---|---|
| Pool 1 URL | stratum+tcp://192.168.0.100:3333 (old Windows PC) | stratum+tcp://192.168.0.108:3333 (Pi) |
Clear the Field Before Typing
Save and restart the Antminer. Within 2–3 minutes, Pool 1 should show "Normal".
Setup Complete! 🎉

Power Savings Summary
| Device | Power Draw | Monthly 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.