Quick answer
How do I add a device to WireGuard?
Here is how to add a device to WireGuard: make a key pair for it, add a [Peer] with its public key and a free tunnel address to wg0.conf on the TunnelVPS server, then apply it with wg syncconf so other devices stay connected. Give the device a client file or QR code. That is 5 steps in all.
In brief
- Keys: one new pair per device, made with
wg genkeyandwg pubkey. - Server: one
[Peer]with the device's public key and a unique/32address. - Apply:
wg syncconfchanges only what differs;wg setadds a peer live. - Remove:
wg set wg0 peer <KEY> remove, then delete the block from the file.
What are the 5 steps to add a device?
| Step | Where | What to do |
|---|---|---|
| 1 | Server | Make a key pair for the device in a separate folder. |
| 2 | Server | Pick the next free tunnel address, such as 10.8.0.4/32. |
| 3 | Server | Append a [Peer] block with the public key and that address to wg0.conf. |
| 4 | Server | Apply with wg syncconf wg0 <(wg-quick strip wg0). |
| 5 | Device | Import the client file, or scan it as a QR code, and connect. |
Why does each device need its own keys?
Because WireGuard ties one public key to one peer, with one tunnel address and one current endpoint. If two phones share a file, the server keeps switching the endpoint between them and both drop packets.
Anyone asking how to add a device to WireGuard should start from this rule. Separate keys also make revocation clean. A lost phone loses its peer; the laptop keeps working. The family sharing guide applies this rule to a whole household.
mkdir -p /etc/wireguard/clients/tablet
cd /etc/wireguard/clients/tablet
umask 077
wg genkey | tee privatekey | wg pubkey > publickeyWhat goes in the new [Peer] block?
The device's public key and an AllowedIPs line with its own tunnel address. On the server, AllowedIPs lists the addresses that device may use inside the tunnel. Use a /32 that no other peer has.
A comment line above each block, such as # tablet, keeps a long file readable. If the server runs SaveConfig = true, wg-quick rewrites the file from the live state at shutdown, so edit it with the interface down or turn that option off.
[Peer]
# tablet
PublicKey = <TABLET_PUBLIC_KEY>
AllowedIPs = 10.8.0.4/32How do you apply the change without cutting other devices?
Use wg syncconf, which reads the live configuration and changes only what differs. The wg-quick manual gives the form wg syncconf wgnet0 <(wg-quick strip wgnet0); with an interface called wg0, use the line below in bash.
A full systemctl restart wg-quick@wg0 also works, but every device reconnects. For a quick test, wg set adds the peer to the running interface only; it is lost at the next restart unless it is also in the file.
wg syncconf wg0 <(wg-quick strip wg0)
# or, live only:
wg set wg0 peer <TABLET_PUBLIC_KEY> allowed-ips 10.8.0.4/32
wg show wg0What does the device's client file contain?
Its own private key and address, then the server's public key, address and port. 203.0.113.10 below is a documentation address: replace it with the IPv4 from the dashboard. AllowedIPs = 0.0.0.0/0, ::/0 sends all traffic through the tunnel.
Phones import this file as a QR code; see the QR code guide. Computers and routers import the file itself, as each device guide shows.
[Interface]
PrivateKey = <TABLET_PRIVATE_KEY>
Address = 10.8.0.4/32
DNS = <DNS_RESOLVER_IP>
[Peer]
PublicKey = <SERVER_PUBLIC_KEY>
Endpoint = 203.0.113.10:51820
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive = 25How do you check that the new device connected?
Run wg show wg0 and look for a recent latest handshake under the new peer. The transfer line then starts counting bytes received and sent. TunnelVPS read the wg manual on 16 November 2026: wg show can also print only latest-handshakes or transfer.
If no handshake appears, check the Endpoint line, the UDP port and the keys. The traffic guide reads these counters in more detail. Knowing how to add a device to WireGuard and check it takes most of the mystery out of the protocol.
Device questions
Is there a limit on how many devices I can add to WireGuard?
TunnelVPS sets none. A /24 tunnel subnet gives about 250 addresses; CPU and monthly traffic set the practical limit.
Can I make the keys on the device instead of the server?
Yes, and the private key then never leaves the device. Copy only its public key to the server.
How do I remove a device?
Run wg set wg0 peer <KEY> remove, then delete its block from wg0.conf so it does not return at the next restart.
What is the best way to add a device to WireGuard in 2026?
Edit wg0.conf, then wg syncconf. The file stays the single record of who has access.
Why does the new phone connect but load nothing?
Usually IP forwarding or the NAT rule is missing on the server, or the client's DNS line is wrong.
Verdict
- One device, one key pair, one
/32: the rule that keeps a server tidy. - Apply with
wg syncconfso nobody else is disconnected.
Sources (4)
- wg(8) manual page — man7.org (read 2026-11-16)
- wg-quick(8) manual page — man7.org (read 2026-11-16)
- WireGuard: Quick Start — WireGuard (read 2026-11-16)
- IPv4 Address Blocks Reserved for Documentation (RFC 5737) — IETF (January 2010)
Room for every device
Home carries a household's devices with 5 TB a month, at $6.37 a month on 12 months.
- Built by a person, 1 hour at most after confirmation
- Lost days credited back if a server cannot be delivered
- Pay in BTC, XMR, USDT, USDC, ETH, SOL or LTC
- DomaineGoat LLC · Panama