Local-only · RFC 7748 X25519
WireGuard Key Generation
Generate real Curve25519 (X25519) WireGuard keypairs and optional PresharedKeys locally in your browser, with a live wg0.conf builder and copyable wg CLI commands. Keys never leave this device.
WireGuard keypair
Click any key to copy · R regeneratesClamped RFC 7748 scalar ·
wg pubkey compatibleKey exchangeCurve25519 (X25519)RFC 7748 Montgomery ladder (~128-bit security)
Format44-char Base6432 raw key bytes encoded as standard Base64 with = pad
ProtocolNoise_IKpsk2PresharedKey adds post-quantum symmetric protection
Ready-to-paste wg0.conf builder
Adjust your tunnel settings below — both client and server blocks stay synced with your keys.
CLI & server commands
Generate keys directly on Linux or macOS, or manage interfaces with wg-quick.
# Install wireguard-tools # macOS: brew install wireguard-tools # Ubuntu: sudo apt install wireguard # Fedora: sudo dnf install wireguard-tools # Generate keypair with restrictive file permissions umask 077 wg genkey | tee privatekey | wg pubkey > publickey # Start, inspect, and stop wg0 sudo wg-quick up wg0 sudo wg show sudo wg-quick down wg0
# Lock down config permissions on the server sudo chmod 600 /etc/wireguard/wg0.conf # Enable WireGuard tunnel on boot (systemd) sudo systemctl enable --now wg-quick@wg0 # Hot-reload peers without dropping active tunnels sudo wg syncconf wg0 <(wg-quick strip wg0) # Generate a keypair inside an ephemeral Docker container docker run --rm linuxserver/wireguard wg genkey
# Generate a 256-bit PresharedKey for post-quantum defense-in-depth umask 077 wg genpsk > preshared.key # Add the identical PresharedKey line under [Peer] on BOTH client and server: # PresharedKey = <44-character base64 output> # Derive public key from an existing private key at any time echo 'PRIVATE_KEY' | wg pubkey
Deploy your WireGuard tunnel
Three steps to bring up an encrypted peer-to-peer VPN tunnel.
01
Save wg0.conf with chmod 600Place the downloaded client config at /etc/wireguard/wg0.conf (or import into the WireGuard app) and replace <SERVER_PUBLIC_KEY>.02
Add [Peer] on the serverPaste the Server [Peer] block into your server's wg0.conf. Share only your PublicKey — never the PrivateKey.03
Start wg0 & verify handshakeRun sudo wg-quick up wg0 and check sudo wg show to confirm latest handshake and transfer counters.