synix/docs/modules/nixos/headscale.md
sid 95a533c876
All checks were successful
Deploy docs / build-and-deploy (push) Successful in 3s
initial commit
2026-02-23 20:34:35 +01:00

1.1 KiB

Headscale

Headscale is an open source, self-hosted implementation of the Tailscale control server.

View the synix NixOS module on Forgejo.

References

Setup

Set a CNAME record for your Headscale subdomain (headscale by default) pointing to your domain.

Config

{
  imports = [ inputs.synix.nixosModules.headscale ];

  services.headscale = {
    enable = true;
    openFirewall = true;
  };
}

Usage

Create a new user:

sudo headscale users create <USER>

Get the user's id:

sudo headscale users list

Create a pre auth key for that user:

sudo headscale preauthkeys create --expiration 99y --reusable --user <ID>

Give the user the pre-auth key.

Troubleshooting

Check if your ACL config is valid:

sudo headscale policy check --file PATH/TO/acl.hujson