|
| 1 | +# Sealos |
| 2 | + |
| 3 | +!!! warning "Community documentation" |
| 4 | + |
| 5 | + This page is maintained by the Sealos templates community and is not |
| 6 | + verified by headscale developers. Report deployment-specific issues in the |
| 7 | + [Sealos templates repository](https://github.com/labring-actions/templates/issues). |
| 8 | + Confirm that the template uses a supported headscale release before |
| 9 | + production use. |
| 10 | + |
| 11 | +The community-maintained Sealos template deploys headscale and |
| 12 | +[Headplane](https://github.com/tale/headplane) on Kubernetes. It configures |
| 13 | +persistent storage, TLS-enabled endpoints, and SQLite by default. PostgreSQL is |
| 14 | +available as a deployment option. |
| 15 | + |
| 16 | +[](https://sealos.io/products/app-store/headscale) |
| 17 | + |
| 18 | +## Deploy |
| 19 | + |
| 20 | +1. Open the Sealos template and select **Deploy Now**. |
| 21 | +1. Keep SQLite for the default deployment, or enable PostgreSQL to provision a |
| 22 | + dedicated database. |
| 23 | +1. Wait for the headscale and Headplane containers to become ready. |
| 24 | +1. Open the application URL. The root path redirects to Headplane at `/admin/`. |
| 25 | + |
| 26 | +The template also creates a separate TLS endpoint for the headscale gRPC API. |
| 27 | + |
| 28 | +## Sign in and register a node |
| 29 | + |
| 30 | +Create a headscale API key from the headscale container: |
| 31 | + |
| 32 | +```shell |
| 33 | +headscale apikeys create |
| 34 | +``` |
| 35 | + |
| 36 | +Paste the key into the Headplane sign-in page. In Headplane, create a user and |
| 37 | +then create a pre-authentication key for that user. |
| 38 | + |
| 39 | +Connect a node with the public application URL and the pre-authentication key: |
| 40 | + |
| 41 | +```shell |
| 42 | +tailscale up \ |
| 43 | + --login-server=https://<HEADSCALE_DOMAIN> \ |
| 44 | + --authkey=<PRE_AUTH_KEY> |
| 45 | +``` |
| 46 | + |
| 47 | +Continue with the [getting started guide](../../usage/getting-started.md) for |
| 48 | +the standard headscale registration workflow. |
| 49 | + |
| 50 | +## Persistence and database |
| 51 | + |
| 52 | +The template persists these paths: |
| 53 | + |
| 54 | +| Path | Contents | |
| 55 | +| -------------------- | ---------------------------------------- | |
| 56 | +| `/var/lib/headscale` | SQLite database, keys, and runtime state | |
| 57 | +| `/etc/headscale` | Headscale configuration | |
| 58 | +| `/var/lib/headplane` | Headplane state | |
| 59 | + |
| 60 | +When PostgreSQL is enabled, Sealos provisions a dedicated database and injects |
| 61 | +its credentials from a Kubernetes Secret. The headscale configuration and keys |
| 62 | +remain on persistent volumes. |
| 63 | + |
| 64 | +## Updating |
| 65 | + |
| 66 | +Review the template's |
| 67 | +[deployment notes](https://github.com/labring-actions/templates/tree/kb-0.9/template/headscale) |
| 68 | +for its currently tested headscale and Headplane versions. Before changing the |
| 69 | +headscale image version, back up the database and persistent volumes and follow |
| 70 | +the [upgrade guide](../upgrade.md). |
0 commit comments