Headscale (self-hosted Tailscale server) container on Unraid, can't register nodes (devices) reddit / selfhosted ---------------------------------------------------------------------- europacafe · 2023-10-17 06:23 **Running platforms**: \- pfSense 2.7.0 + HAProxy as a reverse proxy \- Unraid 6.12.4 \- Headscale (v0.23.0) from repository: [juanfont/headscale: An open source, self-hosted implementation of the Tailscale control server (github.com)](https://github.com/juanfont/headscale) \- Youtube excellent guide: [https://youtu.be/OECp6Pj2ihg?si=vMNI6kpu9 JJHK7tk](https://youtu.be/OECp6Pj2ihg?si=vMNI6kpu9JJHK7tk) \- docker compose yaml from: [JimsGarage/Headscale at main · JamesTurland/JimsGarage (github.com)](https://github.com/JamesTurland/ JimsGarage/tree/main/Headscale) As Unraid don't have headscale in it app store, I use Stack webui on Portainer (running on unraid) to deploy the headscale docker. **The docker-compose** I deployed: `version: '3.9'` `services:` `headscale:` `container_name: headscale` `volumes:` `- /mnt/user/appdata/headscale/config:/etc/headscale/` `- /mnt/user/appdata/headscale/keys:/var/lib/headscale/` `ports:` `- 8089:8080` `- 9099:9090` `image: headscale/headscale:latest` `command: headscale serve` `restart: unless-stopped` ​ `headscale-ui:` `image:` [`ghcr.io/gurucomputing/headscale- ui:latest`](https://ghcr.io/gurucomputing/headscale-ui:latest) `pull_policy: always` `container_name: headscale-ui` `restart: unless-stopped` `ports:` `- 9999:80` Both the headscale server and headscale-ui are shown as Started (running) on my unraid. However, I can't register any nodes (devices). **Symptoms:** After starting headscale container, I got some errors like this: `2023-10-17T04:00:50Z INF Received signal to stop, shutting down gracefully signal=terminated` `2023-10-17T04:00:50Z INF Headscale stopped` `2023-10-17T04:00:54Z ERR error getting routes error="sql: database is closed"` `2023-10-17T04:00:54Z ERR Error listing users error="sql: database is closed"` `2023-10-17T04:00:54Z ERR Error listing users error="sql: database is closed"` `2023-10-17T04:00:59Z ERR Error listing users error="sql: database is closed"` `2023-10-17T04:00:59Z ERR error getting routes error="sql: database is closed"` `2023-10-17T04:00:59Z ERR Error listing users error="sql: database is closed"` `An updated version of Headscale has been found (0.23.0-alpha1 vs. your current 0.22.3). Check it out` [`https://github.com/juanfont/head scale/releases`](https://github.com/juanfont/headscale/releases) `2023-10-17T04:01:03Z INF Setting up a DERPMap update worker frequency=86400000` `2023-10-17T04:01:03Z WRN Listening without TLS but ServerURL does not start with http://` `2023-10-17T04:01:03Z INF listening and serving HTTP on:` [`0.0.0.0:8080`](https://0.0.0.0:8080) `2023-10-17T04:01:03Z INF listening and serving metrics on:` [`127.0.0.1:9090`](https://127.0.0.1:9090) `2023-10-17T04:07:41Z INF Received signal to stop, shutting down gracefully signal=terminated` `2023-10-17T04:07:41Z INF Headscale stopped` When I checked the host files, I can see the following files created by the container: db.sqlite, private.key, and noise\_private.key. With HAProxy, I can access "https://headscale.mydomain.com/windows" . I can issue headscale commands in headscale container console, e.g. `root@dc18189b2ea8:/# headscale nodes list` `An updated version of Headscale has been found (0.23.0-alpha1 vs. your current 0.22.3). Check it out` [`https://github.com/juanfont/head scale/releases`](https://github.com/juanfont/headscale/releases) `ID | Hostname | Name | MachineKey | NodeKey | User | IP addresses | Ephemeral | Last seen | Expiration | Online | Expired` `root@dc18189b2ea8:/# headscale user list` `An updated version of Headscale has been found (0.23.0-alpha1 vs. your current 0.22.3). Check it out` [`https://github.com/juanfont/head scale/releases`](https://github.com/juanfont/headscale/releases) `ID | Name | Created` When using Tailscale app (v.1.48.2) on Android, after tapping the three-dot on upper right corner 4 times, I was allowed to enter my self-hosted headscale server url (instead of signing on Tailscale website) "[https://headscale.mydomain.com](https://headscale.mydomain.com)", it was then supposed to generate a hash public key for me to register the device on headscale server, but it was quiet. I also tried to register my Windows 11 with Tailscale app by following the instructions on website "[https://headscale.mydomain.com/windows](https://headscale.my domain.com/windows)" (adding some Windows register keys). My Tailscale app on Windows still led me to the Tailscale signin website instead of generating the has public key. I can't find any solution online. Anyone has successfully made it work? I also attach the headscale config.yaml for reference here. [https://drive.google.com/file/d/17FRP91iUf84xoz6CiJrwGrl7mXJDgdA7/vie w?usp=sharing](https://drive.google.com/file/d/17FRP91iUf84xoz6CiJrwGr l7mXJDgdA7/view?usp=sharing)