SSH over Tailscale is slow on cellular
Set the host up once
- Use the MagicDNS name (
mac.tailnet-name.ts.netor justmac) or the stable100.x.y.zaddress as the host name. Both survive IP changes, so the remembered host key keeps matching. - Keep the ordinary SSH server (OpenSSH) listening and sign in with a key, as on any host. Tailscale SSH with "check mode" asks you to confirm in a browser before each login; Sigmux has no browser to do that in, so either exempt the phone from check mode in your ACL or keep OpenSSH.
- Leave the server awake. A Mac that sleeps does not answer; in System
Settings turn off sleep while on power, or run
caffeinate -sin a tmux window you keep around.
Get a direct path
A phone on cellular sits behind carrier NAT, so the connection can only
be direct if the server's side can be reached. Check with
tailscale status on the server: a line that says
relay "hkg" (or any relay name) next to the phone means every
byte goes through that relay; direct with an address means
you are done. Then, in order of effect:
- IPv6 at home or on the VPS. Carriers hand phones IPv6; if the server has a public IPv6 address too, Tailscale connects directly without any NAT tricks. This is the single most effective change.
- Let the router map a port. Enable UPnP or NAT-PMP on
the home router, or forward one UDP port to the server and pin Tailscale
to it:
tailscale up --port=41641(keep your other flags) and forward UDP 41641. On a cloud VM, open UDP 41641 inbound in the security group. - Avoid double NAT. A 5G home gateway or an ISP modem in front of your own router usually means two NATs and no hole punching. Put the modem in bridge mode, or use the ISP's IPv6.
- A relay of your own nearby. If the server must stay behind a hard NAT, a small VPS in the same region as the phone running a custom DERP (or acting as a Tailscale peer relay) cuts the round trip to tens of milliseconds, still relayed but close.
tailscale netcheck on the server reports the NAT type and
whether a port mapping was found; "MappingVariesByDestIP: true" with no
mapping is the case that only IPv6 or a forwarded port fixes.
Living with a relayed link
- Keep sessions attached rather than closing them: reconnecting into the same tmux session is one tap from the Disconnected band and costs one handshake, and nothing is lost on the server meanwhile.
- Use Compose for anything longer than a command; typing character by character over a 500 ms echo is miserable, one paste is not.
- Raise the host's Keepalive interval a little if the cellular link drops the SSH connection often; the default is tuned for direct paths.
- Agent notifications do not use the tailnet at all: the hook on the server posts to the relay (or your Bark, ntfy or webhook) over the public internet, so the server needs outbound HTTPS and the phone needs nothing but its own connectivity.
More help
This page is the Tailscale section of Sigmux Help. If the connection fails outright rather than being slow, see Troubleshooting. Setting up a coding agent on the same machine: Use Claude Code from your iPhone.