Skip to content
runonprem

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.

UDP
s

🔒 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

  1. Enter the public hostname or IP of your server (or router) and the UDP port, and forward that port to the server.
  2. 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).
  3. 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).
  4. 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

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

Formulas reviewed November 27, 2026 by Novian · runs entirely in your browser · methodology