headscale: an allow-all ACL policy with tag:server and route auto-approval #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "change/headscale-acl"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan (change mode)
Why. headscale runs with no ACL policy, so every (re)installed host's microVM-bridge route has to be approved
by hand (
headscale nodes approve-routes, nixed'sdocs/guides/host-operations.md, ThinkCentre install step 4).An ACL policy with
autoApproversremoves that step.What changes.
headscale/config/acl.hujson(new): one allow-allaclsrule (any policy denies by default, so this keeps thetailnet exactly as open as it is now),
tag:serverowned bythodkatz@, andautoApprovers.routesfor192.168.122.0/24(nixos) and192.168.123.0/24(thinkcentre), fromtag:serveronly.headscale/config/config.yaml:policy.path: /etc/headscale/acl.hujson(the compose file mounts/srv/selfhosted/headscale/configthere).docs/guides/network-and-caddy.md: The ACL policy: what it does, how a host gets tagged, how to check an edit.docs/knowledge/headscale-autoapprove-tag-later.md(+ index line): tagging a node after registration doesn'tauto-approve its route.
Check. Run here against
headscale/headscale:0.27.1(the compose pin) andtailscale/tailscalecontainers on athrowaway docker network:
headscale policy check --file acl.hujsonpasses; it rejects an undefined tag and an owner without@;--tags tag:serverpre-auth key gets192.168.122.0/24approved on advertise; anuntagged node's route stays under Available;
Deploy (the user, on the VPS)
Nothing changes until then. Existing routes stay approved, so nothing is cut off.
After that, a new host registers with
headscale preauthkeys create --user <ID> --tags tag:server(the hosts'user
thodkatzis ID 2); nixed'shost-operations.mdgets that rewrite as a follow-up direct change once this isdeployed.
🤖 Generated with Claude Code
WIP: headscale: an allow-all ACL policy with tag:server and route auto-approvalto headscale: an allow-all ACL policy with tag:server and route auto-approvalLocal review (correctness + methodology subagents)
AGENTS.mdtrap and the guide named onlyconfig.yamlas needing a VPS redeploy;acl.hujsondoes too.headscale policy checkdoesn't verify that owner users exist:nosuchuser@passes, which would silently stop auto-approval.Also checked, no issue: the policy validates on 0.27.1;
policy.pathmatches the directory mount; the old container sees the pulled file (directory bind mount), so the pre-restart check works;-f headscale/docker-compose.yamlresolves.envand the project name as a deploy from insideheadscale/; the CLI flags exist; no stale docs elsewhere; sign-off check clean.Replies
54021ea: both texts now sayheadscale/config/(config.yaml,acl.hujson).54021ea: title and index line widened.54021ea: the guide says the check doesn't cover user names and to confirm withheadscale users list.Checks: Caddyfile validate loop (AGENTS.md Setup): exit 0;
headscale policy check --file acl.hujson: exit 0;python3 .methodology/shared/sync-agents.py --check: exit 0