Coordination server (HCS)
The coordination server (HCS) connects zones via a mesh VPN and hosts shared services. It is a small public server (a VPS is sufficient).
Declare the HCS
Section titled “Declare the HCS”Enable coordination and declare the host profile: hcs:
network: coordination: enable: true hostname: "hcs" domain: "headscale" # → headscale.domain.tld
hosts: - hostname: "hcs" name: "Coordination server" profile: "hcs" ipv4: external: "203.0.113.10" # Public IP of the VPS internal: "100.64.0.2" # IP in the tailnet services: headscale: # VPN coordination idm: # identities (Kanidm) vaultwarden: # vaultInstallation follows the same procedure as a
gateway
(just install / configure / apply).
Global services
Section titled “Global services”A service marked global: true is exposed on the HCS with a public DNS
(<name>.domain.tld): it is reachable from anywhere, including the Internet.
services: forgejo: domain: "git" global: true # → https://git.domain.tldCreate a user account
Section titled “Create a user account”-
Create the system account
Add the user in
etc/config.yaml, then generate, commit, and apply:etc/config.yaml users:bob:uid: 1001name: "Bob"profile: "normal"groups: ["global"] -
Vaultwarden account
- Admin: send an invitation.
- User: receives an email to set their master password.
- Admin: confirm the user.
-
Kanidm account (on the HCS)
Fenêtre de terminal just enter hcskanidm person credential create-reset-token <login> --name idm_adminForward the link or QR code to the user, who creates their key and recovery password.
-
Bitwarden
Installing Bitwarden on browsers and smartphones simplifies access.
-
Service access
SSO opens all services with a single authentication. Rights are defined by Kanidm groups.
Connect from outside
Section titled “Connect from outside”Outside a zone, access to services goes through a Tailscale VPN client, validated by the administrator.
-
User side
- Install the Tailscale client.
- Request to join the network
headscale.domain.tld.
-
Admin side
Fenêtre de terminal just enter hcs# Reusable temporary key (multiple clients)sudo headscale preauthkeys create --reusable --expiration 1h --user 1# Or validate an already connected clientsudo headscale nodes register --key <key> --user nix