
Homelab Wireguard Vpn
Stand up WireGuard on a home Linux host or Pi so you can reach NAS, APIs, and lab services securely from phone and laptop.
Overview
Homelab WireGuard VPN is an agent skill for the Operate phase that configures WireGuard servers, peers, routing modes, and troubleshooting for secure remote access to a home lab.
Install
npx skills add https://github.com/affaan-m/everything-claude-code --skill homelab-wireguard-vpnWhat is this skill?
- Server setup on Raspberry Pi, Linux, pfSense, or router with UDP tunnel (port 51820)
- Keypair generation, peer configs, and multi-client automation guidance
- Split tunnel (home subnet only) vs full tunnel (all traffic) explained
- Troubleshooting playbook for tunnels that will not establish
- Explicit warning to review iptables rules and key file permissions before applying
- Default WireGuard listen example: UDP port 51820
- Illustrated home LAN CIDR example: 192.168.1.0/24
Adoption & trust: 1.1k installs on skills.sh; 210k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You cannot safely reach home NAS, Pis, or internal APIs on the road without opening random ports or trusting brittle port forwards.
Who is it for?
Solo builders self-hosting on a home LAN who want phone/laptop access with minimal VPN overhead.
Skip if: Teams needing corporate SSO, audit-heavy compliance VPNs, or networks without any public endpoint or DDNS plan.
When should I use this skill?
Setting up WireGuard server on Pi/Linux/router, configuring peers, choosing tunnel routing, or fixing connection failures.
What do I get? / Deliverables
You run an encrypted WireGuard tunnel with correct keys, peer profiles, and routing so laptops and phones join your home subnet reliably.
- Server and client WireGuard config files
- Peer onboarding steps for additional devices
Recommended Skills
Journey fit
How it compares
Homelab WireGuard setup skill—not a managed commercial VPN product or Kubernetes ingress tutorial.
Common Questions / FAQ
Who is homelab-wireguard-vpn for?
Self-hosters and indie developers running Linux or Pi homelabs who need encrypted remote access from mobile and laptop clients.
When should I use homelab-wireguard-vpn?
During Operate when standing up or extending VPN infra, adding peers, choosing split vs full tunnel, or debugging a tunnel that will not connect.
Is homelab-wireguard-vpn safe to install?
It includes shell and network configuration—review the Security Audits panel on this Prism page and validate every iptables and key permission change on your own hardware.
SKILL.md
READMESKILL.md - Homelab Wireguard Vpn
# Homelab WireGuard VPN WireGuard is a fast, modern VPN protocol. It is the right choice for remote access to a home network — simpler to configure than OpenVPN and faster than most alternatives. All configuration examples show common setups. Review each command — especially the iptables forwarding rules and key file permissions — before applying them to your system, and make changes in a maintenance window. ## When to Use - Setting up WireGuard server on a Raspberry Pi, Linux host, pfSense, or router - Generating WireGuard keypairs and writing peer config files - Configuring remote access from a phone or laptop to a home network - Explaining split tunneling (route only home traffic) vs full tunnel (route all traffic) - Troubleshooting WireGuard connections that will not come up - Automating peer configuration generation for multiple clients ## How WireGuard Works ``` Your phone (WireGuard client) │ │ Encrypted UDP tunnel (port 51820) │ Your home router (WireGuard server — needs a public IP or DDNS) │ Your home network (192.168.1.0/24, NAS, Pi, etc.) Every device has a keypair (public + private key). The server knows each client's public key. The client knows the server's public key + endpoint (IP:port). Traffic is encrypted end-to-end with no central server or certificate authority. ``` ## Server Setup (Linux) ```bash # Install WireGuard sudo apt update && sudo apt install wireguard -y # Generate server keypair — create files with private permissions from the start sudo mkdir -p /etc/wireguard sudo sh -c 'umask 077; wg genkey > /etc/wireguard/server_private.key' sudo sh -c 'wg pubkey < /etc/wireguard/server_private.key > /etc/wireguard/server_public.key' # Write server config — substitute the actual private key value # Do not store private keys in version control or share them sudo tee /etc/wireguard/wg0.conf << 'EOF' [Interface] Address = 10.8.0.1/24 # VPN subnet — server gets .1 ListenPort = 51820 PrivateKey = <paste_server_private_key_here> # Scoped forwarding rules: allow VPN traffic in/out, not a blanket FORWARD ACCEPT PostUp = iptables -A FORWARD -i wg0 -o eth0 -j ACCEPT PostUp = iptables -A FORWARD -i eth0 -o wg0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -o eth0 -j ACCEPT PostDown = iptables -D FORWARD -i eth0 -o wg0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE [Peer] # Phone — replace with the actual phone public key PublicKey = <phone_public_key> AllowedIPs = 10.8.0.2/32 [Peer] # Laptop — replace with the actual laptop public key PublicKey = <laptop_public_key> AllowedIPs = 10.8.0.3/32 EOF sudo chmod 600 /etc/wireguard/wg0.conf # Replace eth0 with your actual outbound interface name # Check with: ip route show default # Enable IP forwarding (required for routing traffic through the server) echo "net.ipv4.ip_forward=1" | sudo tee /etc/sysctl.d/99-wireguard.conf sudo sysctl --system # Start WireGuard and enable on boot sudo wg-quick up wg0 sudo systemctl enable wg-quick@wg0 ``` ## Client Configuration ```bash # Generate a unique keypair for each client device # Run on the client, or on the server and transfer the private key securely — never in plaintext umask 077 wg genkey | tee phone_private.key | wg pubkey > phone_public.key # Client config file (phone_wg0.conf): [Interface] PrivateKey = <phone_private_key> Address = 10.8.0.2/32 DNS = 192.168.1.2 # Optional: use Pi-hole for DNS over the tunnel [Peer] PublicKey = <server_public_key> Endpoint = your-home-ip.ddns.net:51820 # Your public IP or DDNS hostname AllowedIPs = 192.168