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: groups in the Tailscale policy file keep your rules readable

Network and access
~/tips/tip-tailscale-policy-groups

"groups": {

Give access to a named group once instead of listing email addresses in every rule.

A first policy file often has email addresses in every rule. Adding one person meant editing five places. Groups fix that.

Define the group once:

"groups": {
  "group:family": ["[email protected]", "[email protected]"],
  "group:admins": ["[email protected]"]
}

Then use it as a source in your rules:

"grants": [
  {
    "src": ["group:family"],
    "dst": ["tag:media"],
    "ip": ["*"]
  }
]

When someone new joins, you add them to the group and every rule follows. The name must start with group:, and a person can be in as many groups as you like.

The docs mention one limit that is easy to miss: a group cannot contain another group. So group:admins cannot simply be part of group:family; you list Alice in both.

Groups hold users, not devices. To group machines, use tags instead. And for one-off access, a single email address in a rule is still fine. I’d start a group as soon as the same list shows up twice.

Further reading: Tailnet policy file syntax

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