One of the joys of using Tailscale is that, regardless of where my devices are, they act like they share the same network. However, because this works so well in the background, I stopped thinking about it, and that was the problem.
Some of my connections were slower than they should have been and stayed that way for a long time. The cause was very simple, and you should check yours if you use Tailscale.
Direct vs. DERP
The straight road and the scenic route your data can take
Every Tailscale connection will start on the detour (DERP). When two of your devices need to talk, their traffic first passes through a relay server while Tailscale works out a direct path. The connection eventually moves to the shortcut if Tailscale finds one, but when it doesn’t, the connection remains on the relay.
There are names for these two options. When your devices communicate with each other with nothing between them, it’s called direct. When there is a relay, it’s called DERP. DERP is a server Tailscale runs to pass your traffic along.
|
Direct |
DERP relay |
|
|---|---|---|
|
Route |
Device to device |
Device to server to device |
|
Typical feel |
Fast, low latency |
Usually slower, with lower top speed |
|
When it happens |
Most setups |
When a direct path can’t be made |
The difference comes down to speed. Relays can limit throughput and are usually slower than a direct link.
When you use DERP, you don’t give up privacy. The traffic is encrypted between the devices, so the relay server can’t see its content. This is also why Tailscale still works: the relay runs over ordinary HTTPS, which most networks allow. The detour serves a purpose, but that’s not where you want your traffic to stay.
The one-word giveaway
Spotting the detour in 30 seconds
Devices show up as connected on Tailscale regardless of the route: direct or DERP. Hence, you may have a detour that goes unnoticed for days, weeks, or months. It only takes this one command to verify:
tailscale status
Once the output appears, look at the line for each device. You should see direct, followed by an address, or relay, followed by the name of a city. That shows the path in use.
Take a closer look by running tailscale ping and including the name of the device. The initial replies you get may come back via DERP before the route switches to a direct address.
Running ‘tailscale ping’ nudges Tailscale to switch to a direct path; a previously slow connection will often switch to direct on its own. However, the route is stuck if it continues to answer via the relay even after several attempts.
When I ran tailscale status, it showed a relay from Paris, and I got about 40ms per reply when I ran tailscale ping. When the connection switched to direct, tailscale ping returned 12ms.
An unexpected actor
The culprit behind my detour, and the usual suspects behind yours
The culprit for my problem was the café’s Wi-Fi. It made it harder for my laptops to connect directly to the PC at home. I initially thought it was a Tailscale problem and restarted the app a few times and reconnected the devices. But the status line consistently came back as relay. However, when I tried the same connection on my home Wi-Fi, it switched to direct, making the café Wi-Fi the likely culprit.
Once one side is behind a strict network, Tailscale’s connection logic expects a relay, unless there is no NAT on the other side at all. A network will qualify as strict if it hides your devices so well that anything outside has a hard time reaching them first.
Some routers do this on purpose as a protection mechanism, but it will get in the way of direct connections. Both sides count. A strict network on your end paired with an ordinary home network on the other can force a detour.
So my laptop that connects directly at home feels slower from the café because it goes through a relay. This was the network simply refusing to let the two devices meet; Tailscale hadn’t broken anything.
|
What you notice |
Likely cause |
|---|---|
|
Fine at home, relayed on hotel or office Wi-Fi |
The network restricts direct traffic |
|
Relayed on mobile data |
Carrier-level setup, often out of your hands |
|
Relayed even at home |
Double NAT (your ISP’s box plus your own router) or a strict router |
|
Relayed on one device only |
A firewall or a second VPN app on that device |
Most setups I’ve seen fit one of these categories.
Fixes worth trying first, and the networks that will never cooperate
Your easiest test is to put one of the devices on a phone’s hotspot and rerun the status check. The first network was the culprit if the connection goes direct. If it still goes through a relay, then take a look at the device itself.
By default, Tailscale will look for direct traffic on UDP port 41641, so consider opening the port on your firewall or router if it’s a network problem. Check your own port first, since it can be changed. Also, it’s possible to let Tailscale request the port itself by turning on UPnP or NAT-PMP on the router; this may do the job.
If your setup requires the ISP’s box and your router to both handle NAT, putting your ISP box in bridge mode will allow only one of these to do the work. This can fix the problem, since port rules and UPnP may fail behind two layers of NAT.
If all you do is light jobs like SSH or a dashboard, a relay is fine, but for heavier work, it may hurt. Also, not all networks will go direct, so if you’ve tried all the fixes, maybe that network just doesn’t go direct.
- OS
-
Windows, macOS, Linux, Android, iPhone
- Developer
-
Tailscale
- Price model
-
Free, paid plans available
Tailscale is a zero-config, VPN-based remote access tool. It’s based on the WireGuard protocol and creates peer-to-peer connections between devices, regardless of location.