Project 05 · The Build Log

Build a Free Personal VPN with WireGuard

Intermediate ~40 min $0 extra

Build a Free Personal VPN with WireGuard on a Pi

Disclosure: As an Amazon Associate I earn from qualifying purchases.

Commercial VPNs spend fortunes on podcasts ads convincing you to rent them a tunnel. But the most useful VPN of all is the one that tunnels home — to your own network, your own files, your own Pi projects — and it’s free, because WireGuard is free, and you already own the hardware. This build sets it up in about forty minutes, and explains honestly what it does and doesn’t protect.

Get the full kit → jumps to the (very short) parts list. Any always-on Pi works — the Project 02 box can share the duty, or a spare board from your starter kit adventures.

First, the Honest VPN Talk

A VPN is an encrypted tunnel between two points. Where the other end is decides what it’s good for, and ads blur this on purpose:

What You’ll Need

Total: $0 if a Pi is already on your network. Software (WireGuard, and the PiVPN installer below) is free and open source.

Step 1 — Address Housekeeping (10 Minutes)

Two foundations, both familiar by now: give the Pi a fixed IP (DHCP reservation in your router — the Project 02 move), and sort out how the internet finds your house. Most home connections have an address that changes occasionally, so set up a dynamic DNS name (free tiers exist; many routers have one built in) — a hostname like yourname.something.net that always points at your current home address. Your VPN clients will connect to that name, so address changes stop mattering. Five boring minutes here prevent the classic “VPN worked until it didn’t” mystery.

Step 2 — Install with PiVPN (10 Minutes)

On the Pi, run the PiVPN installer from pivpn.io. It exists to make this exact setup a menu instead of a manual: it detects your Pi, installs WireGuard (choose it over the older OpenVPN option — WireGuard is faster, smaller, and simpler on phones), confirms your fixed IP and dynamic-DNS name, and picks the standard WireGuard port, UDP 51820. Reboot when it asks. What you now own: a VPN server with a command (pivpn) that manages everything from here on.

Step 3 — Open Exactly One Door (5 Minutes)

In your router, forward UDP port 51820 to the Pi’s fixed address. That’s the entire exposure: one port, one protocol, into a service designed to be internet-facing (WireGuard answers only to clients holding valid keys — to everyone else it is silent, which is a genuinely elegant security property). Not the DMZ, not a port range — the Minecraft rule applies to the whole house: one door, one purpose, keys required.

Step 4 — Add Your Phone (5 Minutes, the Delightful Part)

On the Pi: pivpn add, name the profile (phone), then pivpn -qr phone — a QR code appears in your terminal. Open the WireGuard app, tap +, scan. Done: your phone now holds a key, and the key is the account — no passwords, no sign-up, nothing to phish. Repeat per device (laptop, tablet, a partner’s phone), one profile each, so a lost phone is one pivpn revoke instead of a whole-system reset. Toggle the tunnel on from the app and load a page: you’re browsing through home. Check the Pi with pivpn -c and you’ll see your phone’s handshake, live.

One setting worth choosing deliberately: the app lets each profile be full tunnel (all traffic via home — the coffee-shop armor) or split (only home-network addresses via the tunnel — faster for everyday use at home away from home). Full for untrusted networks, split for travel convenience is the common pattern.

Step 5 — Live With It (the Payoff)

What NOT to Buy

The Total, Honestly

Build It This Weekend

Fix the Pi’s address, claim a free dynamic-DNS name, run PiVPN, forward UDP 51820, scan one QR code. Then go to a coffee shop, turn on the tunnel, and open your Pi-hole dashboard from a network you don’t trust at all — and feel the whole point land.

Where the series goes next: the Build Log keeps daily cadence — an always-on e-ink dashboard for the house is next in Smart Home & Pi-hole, and everything in the library is reachable from anywhere now, through the tunnel you just built. Start anywhere via the full project library.