3.3 KiB
3.3 KiB
Production headscale on Wodanio DSPS
Robbi's real tailnet control server (https://vpn.robbis.space, MagicDNS base ts.robbis.space) runs as a
container service named headscale on the Wodanio DSPS platform, NOT on a host you can SSH into.
Credentials live in ~/Wodanio/.env (DSPS token and headscale API key). Load them in the script; never print
values. Device docs: ~/Wodanio/tailnet/GERAETE.md, ACL: ~/Wodanio/tailnet/policy.hujson.
DSPS API (base https://dsps1.zlg-dc1.wodanio.net, bearer auth with the DSPS token)
- Spec is embedded in
/v1/docs/swagger-ui-init.js(swaggerDocobject);/v1/docs/swagger.jsonreturns HTML. Fetch it with subprocess andjson.JSONDecoder().raw_decodefrom the first{after"swaggerDoc"— the terminal tool truncates the big output and breaks parsing. GET /v1/container-> list services (headscale, traefik, nats).GET /v1/container/{id}-> full definition incl.envs[]({key,value}),volumes,proxies,podStatus[].podId.POST /v1/container/{id}/execbody{"podId": "<podStatus[0].podId>", "command": ["/ko-app/headscale", ...]}— podId is required. The image is distroless (ko): nols/sh; only/ko-app/headscaleruns.PATCH /v1/container/{id}changes the service and redeploys it (= restart). DSPS access is over the public internet, so a headscale restart does not cut off agent access.- When redacting output, mask by env name, not by a field called
key— DSPS env entries use akeyfield for the variable name.
Config model
- There is NO config file (
WRN no config file found, using defaults). All settings areHEADSCALE_*env vars on the DSPS service, e.g.HEADSCALE_DNS_MAGIC_DNS=true,HEADSCALE_DNS_BASE_DOMAIN=ts.robbis.space,HEADSCALE_DNS_NAMESERVERS_GLOBAL=1.1.1.1 1.0.0.1(space-separated list),HEADSCALE_POLICY_MODE=database. - "Backup the config" = save the full
GET /v1/container/{id}JSON locally (e.g.~/Wodanio/headscale-container.bak-<date>.json, chmod 600) before any PATCH; restore by PATCHing envs back. - Map-valued settings work as a JSON string:
HEADSCALE_DNS_NAMESERVERS_SPLIT={"lan":["192.168.178.35"]}(verified 2026-11 — clients showedlan -> 192.168.178.35intailscale dns status~1 min after PATCH; this is now LIVE). On macOS at home,--accept-routeskeeps the local LAN on en0 (no detour via rpi). PATCH body ={"envs": [full list]}; exec calls may 504 — use /health + client dns status to verify. After any change, verify withheadscale configtestvia exec and check a node actually receives it; roll back from the backup if not. Mounting a real config.yaml into the/var/lib/headscalevolume is the alternative (changes how the service is configured -> ask first).
Read-only checks via exec
headscale version,headscale nodes list,headscale nodes list-routes(columns Approved/Available/Serving).- Same data via headscale REST
GET /api/v1/node(fieldsavailableRoutes,approvedRoutes,subnetRoutes,online).
Home network facts relevant to DNS
- Pi-hole:
192.168.178.35(thenasnode, tailnet 100.64.0.3). Resolves.lannames. Does not answer on its tailnet IP unless Pi-hole is set to permit all origins. - Subnet router: node
rpiadvertises+approved192.168.178.0/24(autoApprovers).