Headscale¶
- Website
- GitHub Open source control server software
- Docs
- Helm charts
- Container images
- FR: Support for WireGuard only peers
- Headscale Operator
- For headscale metrics see ./monitoring.md
Setup¶
If Headscale is installed in Kubernetes, configure a shell alias.
For Kubernetes:
For Podman:
Create a user¶
If the Headscale user varac doesn't exist yet, create it (only once):
Register new node¶
Request node registration from a device:
Then follow the link from the browser to register the node in headscale:
Using a pre-auth key (deprecated)¶
Generate a preauth-key:
Login using a preauth-key:
sudo tailscale up --login-server https://$HEADSCALE_DOMAIN \
--authkey $(gopass show --password token/$HEADSCALE_DOMAIN/preauth-key/varac)
Ansible role¶
- artis3n-tailscale
- State file on each machine:
~/.local/state/artis3n-tailscale
Bootstrap new machine¶
Getting started: Using a preauthkey
Before configuring a device, ensure the user varac is created (see above).
Create a preauthent key:
Or create a preauthkey using a tag:
Then store token in Vaultwarden (token/hs.k.varac.net/varac/preauth-key/ANSIBLE_INVENTORY_HOSTNAME),
add the device to the vpn inventory group and run ansible:
Finally, accept the additional routes in the headscale UI.
Api keys¶
headscale apikeys list
headscale apikey create "tailscale-exporter"
headscale apikeys delete --prefix hskey-api-…
Issues¶
- Sometimes (i.e. after device tags are added) Headscale needs to get restarted so nodes can reach each other.