Networking
WireGuard config generator with QR codes
Set up a WireGuard VPN into your homelab or office: generate the server config and a config plus QR code for each laptop or phone. Keys are created in your browser and never leave it.
🔒 Keys were generated in your browser with X25519 and are not sent anywhere. The shared link contains no keys — opening it creates new ones.
How to use it
- Enter the public hostname or IP of your server (or router) and the UDP port, and forward that port to the server.
- Choose a tunnel subnet that does not clash with your LAN or the networks your devices roam on (10.8.0.1/24 is a common choice).
- Choose AllowedIPs: "full" sends all traffic through the VPN; a list such as 192.168.1.0/24 only routes your home network (split tunnel).
- Save the server file as /etc/wireguard/wg0.conf and start it with wg-quick up wg0; import each peer file or scan its QR code in the WireGuard app.
Formula and method
keys: X25519 (Curve25519) key pairs, private keys clamped like `wg genkey`
server: [Interface] Address, ListenPort, PrivateKey + one [Peer] per client
peer k: Address = server address + k (/32)
[Peer] Endpoint = host:port, AllowedIPs, PersistentKeepalive- For internet access through the tunnel ("full"), enable IP forwarding on the server (net.ipv4.ip_forward=1) and NAT — see the commented PostUp/PostDown lines.
- Keep private keys secret. Anyone with a peer file can join your network; delete a peer’s [Peer] block on the server to revoke it.
Worked example
Server 10.8.0.1/24 on vpn.example.com:51820 with two peers: peer 1 gets 10.8.0.2/32, peer 2 10.8.0.3/32; the server lists each peer’s public key with that /32 as AllowedIPs, and each peer points its Endpoint at vpn.example.com:51820.
FAQ
Is it safe to generate WireGuard keys on a website?
Here the keys are generated by JavaScript in your browser using the Web Crypto random generator and the audited @noble/curves X25519 implementation; nothing is sent to a server. If you prefer, generate keys with wg genkey on your own machine and paste them into the files.
What does PersistentKeepalive do?
It sends a small packet every N seconds so NAT routers keep the connection open. 25 seconds is the usual value for phones and laptops behind NAT.
Full or split tunnel?
Full tunnel (0.0.0.0/0, ::/0) sends all traffic through your home connection — useful on public Wi-Fi. Split tunnel only routes your home networks and keeps everything else direct.
Related tools
- IPv4 subnet (CIDR) calculator — Network, broadcast, netmask, wildcard and host range of any IPv4 CIDR, and how to split it into smaller subnets.
- Nginx & Caddy reverse proxy config generator — Generate an Nginx or Caddy reverse-proxy config with HTTPS, WebSockets, HSTS and upload limits for a self-hosted app.
Formulas reviewed November 27, 2026 by Novian · runs entirely in your browser · methodology