Only relayed
Why two Devices connect through a Relay instead of directly, and how to get a direct connection.
Two Devices always try to connect directly first. When no direct path works, they connect through a Relay. Relayed connections work and stay encrypted end to end, but they are slower, and they use your Network's Relay pool.
See which it is
- In the console, open a Device: Connections lists each Device it talks to as Direct or Relayed.
- In the macOS and Windows apps, each Device in the list shows Direct or Relayed.
- On Linux or Windows,
tiltas statusends the line of each Device it is talking to withactive; directand the other Device's public address, or withactive; relayand the Relay's region.
tiltas ping shows the path, and stops as soon as the connection goes direct:
tiltas ping nasA reply via DERP(…) came through a Relay; a reply via an address and port, such as 203.0.113.7:41641, came directly.
If it never goes direct, the command ends with direct connection not established.
Find out why
Run tiltas netcheck on each of the two Devices:
tiltas netcheckLook at two lines of its report:
| Line | What it tells you |
|---|---|
UDP: false | This Device cannot send UDP to the internet. Direct connections need UDP, so it is always relayed. |
MappingVariesByDestIP: true | This Device is behind a strict NAT. A direct connection is still possible when the other side is not. |
The report also names the Nearest DERP, the closest Relay, and the latency to each.
Get a direct connection
Most often, one side can be made reachable:
-
Allow outgoing UDP. A company or guest network that blocks UDP forces every connection through a Relay. Use another network, or ask its administrator to allow outgoing UDP.
-
Open UDP port 41641 on a server. A server with a public address and a host firewall, or a cloud server behind a security group, connects directly once inbound UDP
41641is allowed. Withufw:Terminal sudo ufw allow 41641/udp -
One reachable side is enough. Two Devices behind strict NATs relay; if one of them is a server with UDP
41641open, the pair goes direct.
Nothing needs to be opened on a home router: Devices behind ordinary home routers usually find a direct path by themselves.
When relayed is fine
For a phone on mobile data reaching a server now and then, relayed is fine. Past the Relay pool, Relayed traffic slows to 10 Mbit/s but is never cut: see The Relay pool.