DEV Community

Cover image for Tailscale vs NetBird vs plain WireGuard: what I run on 7 small VPS (with real latency numbers)
Fajar Hidayat
Fajar Hidayat

Posted on

Tailscale vs NetBird vs plain WireGuard: what I run on 7 small VPS (with real latency numbers)

I don't have a homelab. I have 7 small rented VPS, most of them 2 vCPU and 2 GB RAM, a few dollars each a month, joined into one private WireGuard network.

I posted a diagram of that on LinkedIn and it got way more comments than I expected. two questions kept coming back:

  • why not just use Tailscale?
  • one guy tried plain WireGuard, Tailscale and Headscale, and ended up on NetBird self-hosted because of the features

fair questions. so here's the comparison I wish I had read before building it, with numbers from my own setup.

TL;DR

  • Tailscale, NetBird and plain WireGuard all move your packets over WireGuard. the encryption and the speed are basically the same.
  • what you're actually choosing is the control plane: who handles keys, peer discovery, NAT traversal, relays and access rules.
  • few servers and one operator: plain WireGuard is fine and stays lean. a team, roaming devices, SSO, audit: use Tailscale or NetBird.
  • on my mesh, WireGuard added 0.3 ms on a 64 ms path. the bottleneck was never the tunnel.

the setup

topology: visitors reach the apps through a Cloudflare Tunnel, six servers in a WireGuard full mesh, a backup VPS behind NAT and my laptop joining through one relay, backups to object storage and GitHub, alerts to my phone, an audit sandbox outside the mesh

  • 6 servers on the mesh: two app servers, one that runs apps and also relays, a bigger VM for builds and renders, a small monitor box, and a backup VPS behind NAT
  • servers with a public IP talk to each other directly (full mesh). the backup box and my laptop sit behind NAT, so they go through one relay
  • apps open no public ports, except one server that still serves a single nested subdomain on 443 (Cloudflare's free certificate only covers one subdomain level). everything else comes in through Cloudflare Tunnel
  • inside the mesh, a firewall on each server lets in SSH, ping and an allowlist. nothing else
  • 1 more VPS sits outside the mesh on purpose, it's an audit sandbox and I don't want it able to reach anything

Tailscale vs NetBird vs WireGuard, side by side

Tailscale NetBird plain WireGuard (mine)
data plane WireGuard WireGuard (kernel on Linux) WireGuard (kernel)
client open source (BSD-3), except the GUI apps on macOS, iOS, Windows open source (BSD-3) open source
coordination server Tailscale's own, closed source. self-host via Headscale, a separate community project NetBird cloud, or self-host all of it (management, signal, relay are AGPLv3) none, config files I write
relay when direct fails Tailscale's relays NetBird's, or your own one of my own servers
NAT traversal automatic automatic the NAT box goes through one relay
access control ACLs + SSO, ready ACLs + SSO + dashboard, ready firewall per server
setup time minutes more services to run if self-hosted slowest, you learn on the way

comparison card: Tailscale, NetBird and plain WireGuard, 64.0 ms over the mesh vs 64.3 ms over the plain internet

I checked the license bits against the repos, because this is where people (me included) get it wrong. Tailscale's client really is open source. what's closed is the coordination server they host. NetBird's repo is BSD-3 except management/, signal/ and relay/, which are AGPLv3. one blog I read said all of NetBird is BSD-3, the license files say otherwise, I went with the license files.

why I went plain

two reasons, neither very clever:

  1. I wanted to hold it myself and actually understand it. no account, no coordination server somewhere else.
  2. lean. everything installed on these boxes gets used. most have 1.9 GB RAM, so every extra daemon counts.

self-hosting NetBird would solve reason 1 and break reason 2. its quickstart wants a VM with a public domain, ports 80, 443 and UDP 3478 open, then management, signal, relay and dashboard, usually with an identity provider for SSO. that's a lot of moving parts to manage 6 servers only I touch.

does doing it by hand cost performance?

I measured. 4 pings per pair, 15 pairs, one run, so treat it as rough.

path latency
same path, over the mesh vs over the plain internet 64.0 ms vs 64.3 ms
servers in the same city 0.5 to 1.2 ms (avg 0.9)
all servers that serve apps 30 ms avg
via relay vs direct, path A 175.2 ms vs 177.9 ms
via relay vs direct, path B 241 ms vs 269 ms

yes, the relay was sometimes faster than the direct route. my guess is the relay's network just has a better route to that box. a guess, not something I proved.

throughput through the relay is about 16.5 Mbit/s (217 MB in 105 s). that's not WireGuard, that's the provider capping egress at around 17 Mbit/s. lesson: before you blame the tunnel, measure the pipe under it.

6 things I'd tell anyone building a small mesh

these matter more than which tool you pick.

1. pick by operators and peers, not by features. a full mesh of n servers is n(n-1)/2 peer pairs. 6 servers is 15. 20 servers is 190. one operator can hand-manage 15. nobody should hand-manage 190. that's the point where a coordination server earns its keep.

2. a mesh is not a trust boundary. being on the WireGuard network doesn't mean a box can reach every port. I run three layers: the cloud provider's firewall, a default-deny firewall on every host, and inside the mesh each server only lets in SSH, ping and an allowlist. from the outside, 4 of my 5 servers with a public IP answer only SSH, keys only. the fifth also answers 443 for that one subdomain. if one box gets popped, it shouldn't own the rest.

3. keep public traffic off the mesh. the mesh is for my servers talking to each other. visitors go through Cloudflare Tunnel, outbound only, so apps have no open port to scan, apart from that one 443.

4. don't let critical jobs depend on the mesh. my relay is a single point of failure for the NAT box. so both backup jobs try the mesh first and fall back to SSH over the public internet with the same read-only key. I cut the mesh on purpose to test it, both switched in about 25 s and finished. if you copy this, lock that key down: read-only, one forced command (rrsync -ro is made for exactly this), and a from= source restriction if your IPs are stable. a fallback path is still a way in.

5. keep a way in that isn't the thing you're fixing. I can still reach every server without the mesh. if WireGuard breaks, I can still log in and fix WireGuard. keys only, no password logins, and that path gets the same hardening as everything else.

6. measure the overhead before you optimize it. I expected some tunnel tax. it was 0.3 ms. the real limits were the provider's egress cap and physical distance.

where plain WireGuard is honestly worse

  • one relay. fixed for backups, but the NAT box still drops off the mesh if the relay dies. removing the relay needs one more UDP port open in the cloud firewalls, and I haven't done it yet.
  • keys are manual. Tailscale and NetBird handle key rotation. I don't have that.
  • no per-person access. fine with one operator. painful with two.
  • restore isn't proven. backups run, fallback is tested, but I haven't yet restored a box end to end until the app is serving again. that's the next thing on my list, and the gap I'd poke at first if I were reading this.

so which one should you use?

  • few servers, one person, you want to understand it: plain WireGuard
  • you want it done in 10 minutes and don't mind a hosted control plane: Tailscale
  • you like the Tailscale clients but want your own control server: Headscale
  • a team, lots of devices, ACLs and SSO, everything self-hosted: NetBird

signs you've outgrown plain WireGuard: a second person needs access, peers start roaming (laptops, phones), you need an audit trail of who connected, or editing peer configs starts to feel like a chore.

FAQ

is Tailscale open source? the client is (BSD-3), except the GUI wrappers on macOS, iOS and Windows. the coordination server Tailscale hosts is not.

can I self-host Tailscale? you can self-host the control server with Headscale, a community project that works with the Tailscale clients. it's not a Tailscale product.

is NetBird fully self-hostable? yes, all components. the server parts are AGPLv3, the client is BSD-3.

does WireGuard slow things down? on my mesh, 0.3 ms on a 64 ms path. distance and your provider matter far more.


which one are you running, and what made you pick it? and if you run plain WireGuard too, how do you handle key rotation? I'd genuinely like to steal your approach 😅

Top comments (3)

Collapse
 
dosaygo profile image
dosaygo •

For internal web dashboards on the WireGuard mesh or your isolated audit sandbox VPS, how do you handle browser access from a device where you cannot install a WireGuard, Tailscale, or NetBird client?

Collapse
 
fajarhide profile image
Fajar Hidayat •

honestly most of the time I just don't, the dashboards stay mesh only on purpose. if a device can't join the mesh it doesn't get to see them

when I really need it from a borrowed laptop, a Cloudflare Tunnel with Access in front, for that one dashboard only. the audit sandbox never gets one. how do you handle it?

Collapse
 
dosaygo profile image
dosaygo •

Thanks for the detail on keeping the dashboards mesh-only and putting a Cloudflare Tunnel with Access in front of a single dashboard when you're on a borrowed laptop. I'm building BrowserBox to run the browser itself inside a container on the private mesh and stream only the rendered view over a token-authenticated link (which you can gate behind Cloudflare Access), so the borrowed laptop never joins the WireGuard mesh or receives the dashboard's raw session cookies: browserbox.io/go/forum-20261128-de...