📖 L2 of 5 · M5⏱ 6 min

Tagged devices in production

Recipes for using tags in real setups. Auth keys + tags + ACLs working together.

1The lifecycle of a tagged server

  1. You declare the tag in policy with tagOwners.
  2. You generate an auth key, applying the tag at key-creation time.
  3. You install Tailscale on the new server using tailscale up --auth-key=tskey-... --advertise-tags=tag:server.
  4. The server appears in the admin console as tag:server — owner is the tag, not a human.
  5. ACLs reference tag:server, granting access to whoever should have it.
  6. 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.

🧠Knowledge check

Three quick questions

Q1.You replace your old home server with new hardware. With tags, what changes in your ACL policy?
Q2.You want CI runners to deploy to staging only, never prod. What's the cleanest pattern?
Q3.How do you check whether a device is using the tag you expected?
3 / 3
Audit logs next.