English
简体中文繁體中文EnglishРусскийفارسی

Put your network in an envelope

One key per device, an address on the front, sealed and sent; only the other side can open it. Official downloads for every system, setup guides from zero, and a small machine that writes the config in your browser.

Go to downloadsSee how the first tunnel is built

From10.8.0.1 · vps.example.org:51820

Stamp on a 1950 US airmail envelope
PublicKey
xTIBA5rboUvnH4ht…ZmCcrlA=
AllowedIPs
10.8.0.2/32
Endpoint
wherever it goes

Build it step by step

  1. The first tunnelBuild a first WireGuard tunnel with a VPS and a PC: keys, two config files, the UDP port, starting it, and checking with wg show and ping.
  2. Phone by QRTurn a WireGuard client config into a QR code and scan it: qrencode in the terminal, ready codes in OpenWrt and wg-easy, and how to stay safe.
  3. Use your home network from outsideReach your home LAN from outside with WireGuard: the router or a small box as server, AllowedIPs, forwarding, firewall, port mapping and dynamic DNS.
  4. Everything through the tunnelRoute everything through WireGuard: AllowedIPs 0.0.0.0/0, forwarding and NAT on the server, DNS, IPv6 leaks and how to check the result.
  5. Add and remove devicesAdding and removing WireGuard devices, pausing one, reloading without dropping others, limiting where a device may go, and replacing lost keys.
  6. Keep it runningKeep WireGuard working: start at boot, reading wg show, backing up, changing the port, dynamic DNS changes and updating on each system.

Three things and it works

ThingWhat it isWhere from
A pair of keysKeep the private one, hand out the public onewg genkey, or the generator
An address to write toThe other side's public IP and UDP portYour server, a home line with a public IP, or a provider
A routing listAllowedIPs: which addresses go to whomWrite it yourself, here is how

One handshake and the mail starts

Your deviceServerFirst letter: who I am (sealed)Reply: received, keys agreedPackets only the other side can open
One round trip, then new session keys every two minutes

There is no login, no account and no "connecting". It shakes hands when there is something to send and stays silent otherwise, so a port scan cannot see it.

Often asked

Does WireGuard come with servers?

No. It is a protocol and an app; your configuration decides where it goes: your VPS, your router at home, or a file from a provider.

AdLuoboyunRather not build one? Try a ready-made line: 1 GB of trial traffic on sign-up, valid 24 hours, for Clash / Mihomo.Try it ready-made
Do I need an account?

No. The official apps have no accounts and cost nothing.

How is it different from an ordinary VPN app?

A VPN app bundles servers, accounts and an interface. WireGuard gives you the tunnel only, and many VPN services run on it underneath.

Three counters

  1. Generate configsGenerate WireGuard config files online: enter the server, network and number of devices; keys are made in your browser for wg0.conf and each device.
  2. Check a configCheck a WireGuard config online: key format, swapped public keys, overlapping AllowedIPs, missing ports and DNS. It runs in the browser, no upload.
  3. Work out the MTUWork out WireGuard MTU and MSS for your line, with ping tests for Windows, macOS and Linux, to fix half-loaded pages and stuck downloads.

Letters answered

All ten letters

Delivery directory

Postcodes: WireGuard, WireGuard guide, WireGuard VPN, WireGuard setup