Handshake for peer did not complete after 5 seconds means WireGuard sent a 148-byte UDP initiation packet and received zero reply. In almost every setup, the culprit is either (1) the server sits behind ISP CGNAT (Starlink, 5G Home Internet, or residential fiber without a real public IPv4), (2) UDP ListenPort (51820) is blocked in ufw/security groups, or (3) public/private keys were pasted into the wrong [Peer] block.
Test if the server is behind CGNAT first. Run our CGNAT Checker — if your home ISP uses 100.64.0.0/10 CGNAT, inbound UDP 51820 never reaches your router.
Verify keypair symmetry. Client [Peer] PublicKey must equal wg pubkey < server_private.key (and vice versa).
Drop MTU to 1380 on 5G / T-Mobile / LTE. If handshakes succeed intermittently then stall on HTTPS, 464XLAT encapsulation is dropping 1420-byte packets.
Add PersistentKeepalive = 25 on whichever side sits behind NAT.
WireGuard is intentionally "silent" — an unauthenticated or unreachable peer drops packets without sending a reset, so every failure produces the exact same Handshake did not complete log line. Use this 4-step checklist to isolate the exact layer in two minutes.
1. Is the "server" endpoint actually behind CGNAT?
If you are trying to dial into your home router, NAS, or Raspberry Pi from your phone over cellular, check your home connection in our CGNAT Checker.
- If your home ISP is Starlink, T-Mobile/Verizon/Three 5G, or CGNAT fiber (
100.64.x.xWAN IP), router port forwarding on UDP51820cannot work because your ISP drops unsolicited inbound packets at the carrier edge. - The fix: Flip the tunnel direction! Have your home box dial outbound to a
$3/moPrivateByte WireGuard Static IPv4 Gateway (or a$5.99/moWireGuard VPS) withPersistentKeepalive = 25.
2. Confirm UDP packets actually arrive at the server (tcpdump)
SSH into the public endpoint and watch UDP 51820 live while toggling the client on:
sudo tcpdump -ni any udp port 51820 -vv
- Zero packets appear in
tcpdump: Your cloud firewall,ufw(sudo ufw allow 51820/udp), or ISP CGNAT is dropping UDP before WireGuard ever sees it. - 148-byte incoming packets appear, but no 92-byte reply leaves: Your keys do not match!
3. Eliminate key-swap mistakes
Regenerate a clean, matched client + server wg0.conf pair directly in your browser using our client-side WireGuard Config & Key Generator (built on RFC 7748 X25519 so Client.PublicKey and Server.PublicKey are cross-wired automatically without copy-paste mixups).
4. Fix stalled transfers after handshake (MTU = 1380)
If wg show reports latest handshake: 3 seconds ago (180 B received) yet SSH and web pages hang, path MTU blackholing is dropping full-size frames — especially over PPPoE (1492) or 5G 464XLAT (1400). Set MTU = 1380 under [Interface] on both peers and restart wg-quick@wg0.
