Headscale 0.24.0.ynh1 does not start

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.11 stable
What app is this about: Headscale

Describe your issue

Head scale fails to start since latest update 0.24.0.ynh1

Share relevant logs or error messages

2025-01-13T22:55:14Z FTL …/…/…/home/runner/work/headscale/headscale/cmd/headscale/cli/serve.go:24 > Error initializing error=“creating OIDC provider from issuer config: Get "https://dexserver.xxxxx/.well-known/openid-configuration\”: dial tcp [::1]:443: connect: connection refused"
2025-01-13T22:59:55Z WRN
WARN: The “dns.use_username_in_magic_dns” configuration key is deprecated and has been removed. Please see the changelog for more details.

2025-01-13T22:59:58Z WRN Listening without TLS but ServerURL does not start with http://
2025-01-19T11:22:33Z ERR …/…/…/home/runner/work/headscale/headscale/hscontrol/noise.go:199 > Cannot parse MapRequest error=“unexpected end of JSON input”
2025-01-22T07:14:31Z FTL
FATAL: The “dns.use_username_in_magic_dns” configuration key has been removed. Please see the changelog for more details.

2025-01-22T07:38:13Z FTL
FATAL: The “dns.use_username_in_magic_dns” configuration key has been removed. Please see the changelog for more details.

2025-01-22T07:38:23Z FTL
FATAL: The “dns.use_username_in_magic_dns” configuration key has been removed. Please see the changelog for more details.

2025-01-22T07:39:49Z FTL
FATAL: The “dns.use_username_in_magic_dns” configuration key has been removed. Please see the changelog for more details.

2025-01-22T07:42:24Z FTL
FATAL: The “dns.use_username_in_magic_dns” configuration key has been removed. Please see the changelog for more details.

Hi, to solve this problem you can run the following commands :
As root : yunohost app shell headscale
when you are in the shell (headscale@domain.tld), run
nano config.yaml
then find inside the file the use_username param under the magicDNS section and comment it. Even if you set it as false it doesn’t work. You have to comment the line. Save the file (ctrl+o with nano then ctrl+x to leave the editor)
Then restart headscale after leaving the shell :
logout
systemctl restart headscale (as root user)

Hope it works for you

1 Like

Thank you. This fixed the deprecated warning, but head scale still refuses to start (it was working before the upgrade)

Here are the error logs after I commented the magic dns parameters in the shell and rebooted the yunohost server

-- Boot 489b55da260b4161a41eb8b067dbee1c --
janv. 22 21:24:00 systemd[1]: Starting headscale.service - Control server for the WireGuard-based VPN...
janv. 22 21:24:01 systemd[1]: Started headscale.service - Control server for the WireGuard-based VPN.
janv. 22 21:24:02 systemd[1]: headscale.service: Main process exited, code=exited, status=1/FAILURE
janv. 22 21:24:02 systemd[1]: headscale.service: Failed with result 'exit-code'.

and

2025-01-22T21:21:11Z WRN Listening without TLS but ServerURL does not start with http://
2025-01-22T21:21:11Z FTL ../../../home/runner/work/headscale/headscale/cmd/headscale/cli/serve.go:29 > Headscale ran into an error and had to shut down. error="failed to bind to TCP address: listen tcp 127.0.0.1:9090: bind: address already in use"
2025-01-22T21:22:32Z WRN Listening without TLS but ServerURL does not start with http://
2025-01-22T21:22:32Z FTL ../../../home/runner/work/headscale/headscale/cmd/headscale/cli/serve.go:29 > Headscale ran into an error and had to shut down. error="failed to bind to TCP address: listen tcp 127.0.0.1:9090: bind: address already in use"
2025-01-22T21:24:02Z FTL ../../../home/runner/work/headscale/headscale/cmd/headscale/cli/serve.go:24 > Error initializing error="creating OIDC provider from issuer config: Get \"https://dexserver.xxxxxx/.well-known/openid-configuration\": dial tcp [::1]:443: connect: connection refused"

Thanks for help