Tailscale gets the WireGuard plumbing out of the way and lets you spend your operator time on policy. This article covers a clean fleet install — package, systemd, SSO login — and the ACL structure we use in real tailnets: identity-driven rather than IP-driven, tagged machines for stable references, and groups derived from your SSO provider. The deliverable is a tailnet where “alice can ssh to prod” is one line in policy.json, not a tribal-knowledge incantation.
How to verify
Before installing, confirm DNS resolves the Tailscale endpoints, the host clock is sane (WireGuard hates clock skew), and no competing mesh agent is running.
date
timedatectl status | grep -E 'synchronized|service'
getent hosts login.tailscale.com
systemctl list-units --type=service | grep -E 'zerotier|nebula|tailscale'
ip link show type wireguard
If the clock is off by more than 30 seconds, Tailscale handshakes will work intermittently and you will spend hours debugging “the VPN drops at random.” Fix NTP first.
What’s happening
Tailscale is a control plane on top of WireGuard. Your machines run a tailscaled agent that authenticates to the central coordination server using your identity provider’s tokens (Google, Microsoft, Okta, GitHub, or your own OIDC). The control plane never sees the data path — it distributes public keys, endpoint hints, and policy. The data path is plain WireGuard, peer-to-peer when possible, through a DERP relay when NAT prevents direct connection.
Policy lives in a single policy.json (HuJSON-formatted) file managed in the admin console or by API. The ACL grammar is small: acls, tagOwners, groups, hosts, ssh, and nodeAttrs. The unit of policy is (src, dst, ports), where src and dst can be user@example.com, group:engineering, tag:prod, or a CIDR.
The trick to writing policy that lasts is tagging machines (tag:prod-db, tag:ci-runner) and basing rules on tags rather than hostnames or IPs. Hostnames change; tags are stable contracts.
The procedure
-
Install on Ubuntu. Use the official repo so you get signed updates.
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.noarmor.gpg | \ tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.tailscale-keyring.list | \ tee /etc/apt/sources.list.d/tailscale.list apt update apt install -y tailscale -
Bring the agent up with a tag. For servers, never log in interactively as a human — use an auth key with a tag attached.
tailscale up \ --authkey=tskey-auth-xxxxxxxxxxxxxx \ --advertise-tags=tag:prod-web \ --ssh \ --accept-routes=false tailscale statusThe
--sshflag opts the node into Tailscale SSH (key-less, identity-checked SSH); the--accept-routes=falseprevents subnet-route advertisements from rewriting your routing table without consent. -
Author policy.json in the admin console. A structure that scales:
{ "groups": { "group:engineering": ["alice@example.com", "bob@example.com"], "group:oncall": ["alice@example.com"] }, "tagOwners": { "tag:prod-web": ["group:engineering"], "tag:prod-db": ["group:engineering"], "tag:ci-runner": ["group:engineering"] }, "acls": [ // Engineers can reach prod-web on web ports. { "action": "accept", "src": ["group:engineering"], "dst": ["tag:prod-web:80,443,22"] }, // Only on-call can reach prod-db, and only on db ports. { "action": "accept", "src": ["group:oncall"], "dst": ["tag:prod-db:5432,22"] }, // CI runners can reach prod-web for deploys, nothing else. { "action": "accept", "src": ["tag:ci-runner"], "dst": ["tag:prod-web:22"] } ], "ssh": [ { "action": "check", "src": ["group:oncall"], "dst": ["tag:prod-db"], "users": ["root", "postgres"], "checkPeriod": "12h" } ] } -
Validate the policy before saving — the admin console has a “Preview” mode that shows which (src, dst) pairs the policy allows. Use it on every change.
-
Test from a client. With
tag:prod-webmachines registered and your laptop logged in asalice@example.com:tailscale status tailscale ping prod-web-1 ssh prod-web-1The connection is direct WireGuard if NAT allows; otherwise it relays through the closest DERP.
-
Lock down the agent on servers. Disable user-mode authentication on long-lived nodes so a compromised laptop cannot register fresh nodes under the wrong identity:
tailscale set --shields-up=false --hostname=prod-web-1 --ssh
Common pitfalls
- Letting humans
tailscale upinteractively on servers — the node ends up tied to that person’s identity. Use auth keys with tags exclusively. - Writing ACLs in terms of hostnames or IPs — both change. Use tags and let
tagOwnersenforce who can apply a tag. - Forgetting
--sshon servers when you intend to use Tailscale SSH — the agent registers but SSH connections fall through to OpenSSH on port 22. - Letting
policy.jsondrift unversioned — keep it in git, push via the API in CI. The admin console UI is fine for testing but bad as a source of truth. - Setting
--accept-routeseverywhere — clients will pull subnet routes from any node that advertises them, which can hijack your default route silently.
In the engagements we run, the tailnet is part of the identity perimeter — policy.json is reviewed in PRs, tags follow infrastructure naming, and SSO group membership drives access without anyone editing config on a server. That is what Managed Operations brings to a tailnet: not just an agent on every box, but the discipline that turns “we use Tailscale” into “we have a documented access model.”