brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: tailscale up --advertise-tags=tag:server makes a Tailscale server stop belonging to you

Network and access
~/tips/tip-tailscale-advertise-tags

sudo tailscale up --advertise-tags=tag:server --force-reauth

Gives a server a tag instead of your user account, so ACLs and key expiry treat it as a server.

A server logged in with my own account shares my identity: rules for me apply to it, and its key expires like a laptop’s. For servers I’d rather use a tag.

sudo tailscale up --advertise-tags=tag:server --force-reauth

The tags page of the Tailscale docs uses this command, and tailscale login --advertise-tags=tag:server works as well. Several tags go in one comma-separated list: --advertise-tags=tag:server,tag:development.

The tag must exist first. You define it under tagOwners in the tailnet policy file, and only its owners (or admins) can apply it:

"tagOwners": {
  "tag:server": ["autogroup:admin"]
}

What changes: the docs say applying a tag removes user-based authentication, since a device has tags or a user, not both. You then write ACL rules for tag:server instead of for a person. And when you tag a device and authenticate it for the first time, its key expiry is turned off by default.

Caveats. Off by default is not off for good: key expiry can be switched back on in the admin console. You cannot remove every tag from a device again. If the device was added with an auth key, the docs say to make a new key instead of changing tags with this flag. And tagged devices can only use Tailscale SSH to other tagged devices, which surprised me the first time I read it.

Further reading: Tailscale: tags, Tailscale CLI reference, On this site: put a tests block in your Tailscale policy file

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link