Tagged devices in production
Recipes for using tags in real setups. Auth keys + tags + ACLs working together.
1The lifecycle of a tagged server
- You declare the tag in policy with
tagOwners. - You generate an auth key, applying the tag at key-creation time.
- You install Tailscale on the new server using
tailscale up --auth-key=tskey-... --advertise-tags=tag:server. - The server appears in the admin console as
tag:server— owner is the tag, not a human. - ACLs reference
tag:server, granting access to whoever should have it. - If you replace the box, you re-run the install with the same tag. ACLs continue to apply.
2Common production patterns
Per-environment tags: tag:prod, tag:staging, tag:dev. ACLs grant CI access to staging but not prod, etc.
Per-service tags: tag:web, tag:db, tag:cache. Lets you write rules like "web boxes can reach db on 5432; nothing else can."
Composition: a single device can have many tags. --advertise-tags=tag:prod,tag:web. Both apply.
3The "tagged-only" tailnet
A pattern from production-style setups: no human owns any device. Every device, including engineer laptops, is tagged. Humans appear only in groups.
This isolates "the network" from "who happened to install Tailscale." When an engineer leaves, you remove them from the group; their laptop's tag stays. The next engineer takes over the laptop, gets added to the group, and inherits the same access.
For home use this is overkill. For team setups, it's clean.
4Watch out for: tag drift
Easy to declare a tag in policy, then forget to actually apply it on a device. The device sits as user-owned with no tag, and your ACLs don't apply to it.
Periodically review the Machines page sorted by owner. Anything tagged shows up under the tag's owner; user-owned shows up under the human. Look for accidents.