WireGuard is 4,000 lines of code. OpenVPN is 600,000. Fewer lines means a smaller attack surface, faster handshakes and speeds that actually match your connection.
This guide uses wg-easy — a Docker container that wraps WireGuard with a web UI for managing peers.
docker run -d \
--name=wg-easy \
-e WG_HOST=your.domain.or.ip \
-e PASSWORD=changeme \
-v ~/.wg-easy:/etc/wireguard \
-p 51820:51820/udp \
-p 51821:51821/tcp \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
--sysctl="net.ipv4.ip_forward=1" \
--restart unless-stopped \
ghcr.io/wg-easy/wg-easy
Replace your.domain.or.ip with your public IP or a dynamic DNS hostname.
Log into your router and forward UDP port 51820 to the internal IP of your Docker host. If your ISP assigns a dynamic IP, set up a free dynamic DNS service — DuckDNS works well and integrates easily.
Open http://your-server-ip:51821 in a browser. Log in with the password you set. Click "New Client," name it (e.g. "phone" or "laptop"), and download or scan the QR code.
Install the WireGuard app:
Import the config via QR code or file. Toggle the VPN on. Your traffic now routes through your home network.
With the VPN connected on your phone, visit https://whatismyip.com. It should show your home IP, not your mobile carrier's IP.
Any machine running Docker handles this fine. A Raspberry Pi 4 4GB runs wg-easy for 5–10 peers without breaking a sweat.
As an Amazon Associate, IT Lad earns from qualifying purchases made through links on this page. Read the full affiliate disclosure.