GuidesSecurity

Tailscale vs WireGuard: which to use for a server

WireGuard is the tunnel, Tailscale the managed mesh on top: keys, NAT traversal, relays, access rules, SSH, self-hosting, speed and cost, with configs for each.

November 25, 2026The Everpod team
The short answer

WireGuard is the tunnel: a protocol and a Linux kernel module (with apps for other systems) that encrypts traffic between peers whose public keys and AllowedIPs you write into a config file yourself, with at least one side reachable on a UDP port, usually 51820. Tailscale is a service built on WireGuard that does that bookkeeping for you: a coordination server hands out keys and addresses, devices connect directly through NAT where they can and through encrypted relays where they cannot, and you get access rules, device names, SSH and exit nodes on top. Pick plain WireGuard for a fixed link between a few machines you control, with nothing of anyone else’s in the path; pick Tailscale when devices move, sit behind NAT, or you want no open port on the server. As of November 25, 2026, Tailscale’s Personal plan is free for up to 6 users; WireGuard is free software.

Side by side

WireGuardTailscale
What it is
A VPN protocol and its implementations (Linux kernel module, apps for Windows, macOS, BSD, iOS, Android)A mesh network service whose client runs WireGuard in userspace
Keys
You generate them and copy public keys between peersGenerated on each device; the coordination server distributes public keys
Reaching a peer
One side needs an address and UDP port the other can reachDirect UDP through NAT where possible, else a peer relay or a DERP relay
Access control
AllowedIPs per peer, plus your firewallA policy file of grants by user, group and tag
Extras
None; it is a tunnelMagicDNS, Tailscale SSH, exit nodes, subnet routers, Serve and Funnel
Who runs the control side
You, entirelyTailscale (closed source), or you with Headscale
Cost
FreeFree Personal plan; Standard $8 per user a month

What each one actually is

WireGuard describes itself as “an extremely simple yet fast and modern VPN that utilizes state-of-the-art cryptography”. Each peer has a key pair, and each interface keeps what the project calls a Cryptokey Routing Table, “the simple association of public keys and allowed IPs”. Per its protocol page, all packets travel over UDP, a server “does not even respond at all to an unauthorized client; it is silent and invisible”, and peers re-handshake every few minutes for fresh session keys. What it leaves out is deliberate: “All issues of key distribution and pushed configurations are out of scope of WireGuard”.

Tailscale fills exactly that gap. Its own comparison says “Tailscale is built on top of WireGuard” and offers “identical point-to-point traffic encryption”, and that “Tailscale manages key distribution and all configurations for you.” The piece that does it is the coordination server, which How Tailscale works calls “essentially, a shared drop box for public keys” that carries virtually no traffic. Private keys are created on each device and never leave it, so Tailscale cannot decrypt the traffic.

Setting up each one

WireGuard. Install the tools (on Ubuntu, sudo apt install wireguard) and make a key pair on each machine, as in the quickstart:

umask 077
wg genkey | tee privatekey | wg pubkey > publickey
Copied

The private key stays on its machine; the public key is what you copy to the other side, by any channel you trust. Then write /etc/wireguard/wg0.conf on each end, with the fields the wg-quick man page uses. On the server:

[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = <server private key>

[Peer]
# the laptop
PublicKey = <laptop public key>
AllowedIPs = 10.0.0.2/32
Copied

On the laptop:

[Interface]
Address = 10.0.0.2/24
PrivateKey = <laptop private key>

[Peer]
# the server
PublicKey = <server public key>
Endpoint = server.example.com:51820
AllowedIPs = 10.0.0.1/32
PersistentKeepalive = 25
Copied

Make the file readable by root only, bring it up on both, and have it start at boot:

sudo chmod 600 /etc/wireguard/wg0.conf
sudo wg-quick up wg0
sudo systemctl enable wg-quick@wg0
sudo wg show
Copied

The config file holds the private key, which is why it is root’s alone; once the key is pasted in, the privatekey file can be deleted. The server also needs UDP 51820 open to the internet in its firewall and at the provider. AllowedIPs = 10.0.0.1/32 sends only the server’s tunnel address through the tunnel; a full tunnel (0.0.0.0/0) changes the laptop’s default route, and on a machine that also runs Tailscale it can take the tailnet’s traffic, as running Tailscale and WireGuard on one machine explains. The PersistentKeepalive line is for a peer behind NAT that must stay reachable; the quickstart calls 25 seconds “a sensible interval that works with a wide variety of firewalls”, and it is off by default.

Tailscale. On each Linux machine, per its install page:

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
Copied

tailscale up prints a URL; signing in there adds the machine to your tailnet, and every other device signed into the same tailnet can reach it by its 100.x address or its name. There are no keys to copy and no port to open.

Keys, NAT and relays

With WireGuard, adding a peer means generating its keys and adding a [Peer] block to every machine it should talk to, and removing one means deleting that block everywhere. For the tunnel to start, at least one side must have an endpoint the other can reach; two laptops both behind home routers cannot reach each other without a third machine with a public address in between, or a port forwarded on one router. Once connected, WireGuard handles roaming; in its words, “there is full IP roaming on both ends.”

Tailscale tries to connect devices directly over UDP using NAT traversal based on STUN and ICE. When that fails, as it can behind hard NAT or a network that blocks UDP, it uses a peer relay in your tailnet if you have set one up, and otherwise one of Tailscale’s DERP relays, which forward packets they cannot read: “it’s impossible for a DERP server to decrypt your traffic.” A server needs no open inbound port, though opening UDP 41641 makes a direct path more likely. tailscale status shows whether each peer is direct or relayed. Node keys expire after 180 days by default, after which the machine must sign in again; for a server you can turn that off on its row of the Machines page.

Access control and extras

WireGuard’s only access control is AllowedIPs: on receive, a packet from a peer is accepted only from the addresses listed for it. Which ports a peer may reach is up to the firewall on the machine, and there is no notion of users.

Tailscale keeps one policy file for the tailnet, written as grants from a source to a destination with the ports allowed, by user, group or tag. Grants are deny-by-default, but a new tailnet’s default policy “enables communication between all devices within the tailnet”, so replace it before a server that runs an agent joins. On top of the network it adds:

With plain WireGuard each of these is a separate job: your own DNS, SSH keys, NAT rules beside the IP forwarding for an exit, a reverse proxy for a public URL.

Who holds what

Plain WireGuard has no third party: the keys, the configs and the machines are all yours. Tailscale’s client is mostly open source and its DERP relays are open source, but the coordination server is closed and run by Tailscale. It never sees your private keys, but it decides which devices join your tailnet and what the policy says, which Tailscale states plainly: “Using Tailscale introduces a dependency on Tailscale’s security.” If that is the sticking point, the community-maintained Headscale replaces the coordination server with one you run, using the ordinary Tailscale clients. NetBird is another option with a self-hostable control plane from the vendor itself (Tailscale vs NetBird).

Performance and cost

Tailscale’s own answer is direct: “Using WireGuard directly offers better performance than using Tailscale.” On Linux, WireGuard runs as a kernel module, while “Tailscale currently uses the userspace WireGuard implementation, which has more overhead.” Tailscale says it “generally offers good bandwidth and excellent latency”, and a connection through a DERP relay is slower than a direct one. For SSH into an agent’s server the gap rarely matters; for bulk transfer between two fixed Linux machines it can.

WireGuard costs nothing. Tailscale’s Personal plan, as of November 25, 2026, is $0 for up to 6 users with unlimited user devices, 3 ACL groups and 50 tagged resources such as servers to start; Standard is $8 per user a month. Tailscale pricing goes through what each plan covers.

Which to pick

For another mesh network set against Tailscale, see Tailscale vs ZeroTier.

Run Claude Code, Codex, OpenCode, Pi, Hermes or OpenClaw on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.