triauth for HeadscaleOIDC
Let your team add their devices to your private network with one approval on their own device, and no Headscale passwords.
- Sign-in through
- OpenID Connect bridge
- Available in
- Every Headscale installation
- Set up in
config.yaml
About Headscale
Headscale is a self-hosted replacement for the coordination server behind Tailscale, the private network that connects a team's laptops, servers, and phones. People keep using the regular Tailscale apps, while the sign-in and the device list stay on a server of your own. It is a community project and is not associated with Tailscale Inc.
Connect Headscale to triauth
Headscale signs people in through the triauth OpenID Connect bridge. When someone adds a device with the Tailscale app, the app opens a page on your Headscale, which sends them straight to the bridge. They type their username, approve on their own device, and the new device joins the network. Nobody keeps a Headscale password, and when someone leaves, removing their identity records at your domain stops them from adding devices.
How it works
Open oidc.triauth.org and enter your domain. Paste Headscale's redirect address,
https://headscale.example.com/oidc/callbackwith your own Headscale address in place ofheadscale.example.com, and click Connect app. The bridge gives you a client ID and a client secret.On your server, add the section below to Headscale's
config.yamland restart Headscale. Replaceexample.comwith your domain and the two placeholders with the client ID and the client secret from the bridge.yamloidc: issuer: "https://oidc.triauth.org/example.com" client_id: "<client ID from the bridge>" client_secret: "<client secret from the bridge>" scope: ["openid", "profile", "email"]On a device, run
tailscale up --login-server https://headscale.example.comor sign in from the Tailscale app, and follow the link it shows.
Checkpoint
The link from the Tailscale app opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve. Headscale then confirms that the device has been registered.
Good to know
- Everyone with an identity at your domain gets a Headscale user at their first sign-in and can add devices. To let only one team in, limit the app to a group when you connect it, or list the groups published at your domain under
allowed_groups. - A registered device stays in the network until the expiry you set in Headscale, independent of the sign-in. The person signs in again only when a device expires or a new one joins.
- Headscale takes one sign-in provider, so the bridge replaces any other provider you had.
For the person who connects the app
| Setting | Value |
|---|---|
| Redirect address | https://<your-headscale>/oidc/callback |
| Where in Headscale | the oidc section of config.yaml |
| Issuer | https://oidc.triauth.org/<your domain>, from which Headscale reads the rest |
| Expiry | keep use_expiry_from_token at false, its default, and set node.expiry instead. The bridge's ID token lives ten minutes, and devices would expire with it |
| Groups | add groups to scope and list the allowed groups under allowed_groups. Groups cannot be used in access rules |
| PKCE | optional, pkce.enabled: true with the default S256 method |
Headscale keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. Headscale's OpenID Connect reference explains every key, including the username rules and the filters.
Next steps
- Read the OpenID Connect bridge page for what every connected app gets and what the bridge keeps private.
- Read Roll out to your team to give everyone in your organization an identifier at your domain.
- Read Groups to publish teams and filter who may join the network.
- Read Headscale's OpenID Connect reference for every setting Headscale offers.
All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.