Closed threerog closed 1 year ago
[2023-04-03 07:47:50,770] CRITICAL in helper: /data WRITE: FAILED
[2023-04-03 07:47:50,770] ERROR in helper: /data/key.txt EXIST: FAILED - NO ERROR
Does this key.txt need to be created manually If you need to create it manually, what content is in it
It should be redirecting you to the settings page to put your key in.
technically not an error unless you've already tried putting your key in on the Settings page. I'll fix the code so it just shows as INFO.
Oh I didn't see the first part.
/data is not writable. Please ensure your permissions are correct. /data mount should be writable by UID/GID 1000:1000.
You'll need to set whatever mount /data is on to 1000:1000 with chown
Oh I didn't see the first part.
/data is not writable. Please ensure your permissions are correct. /data mount should be writable by UID/GID 1000:1000.
You'll need to set whatever mount /data is on to 1000:1000 with chown
sudo chown 1000:1000 /data
mount | grep "/data"
I tried to execute the above command as root, which is still 4096
Are you running this inside or outside the container? The folder outside the container should be 1000:1000
In this case, chown 1000:1000 /etc/headscale/ui
Thank you.
In addition, I would like to ask if the headscale configuration directory must be under the root directory?
/headscale/config
I want to place all the headscale configuration files in /etc/headscale/config
How to write a volume
/etc/headscale/ui
/etc/headscale/config/private.key
/etc/headscale/config/noise_private.key
/etc/headscale/config/db.sqlite
This is my modified docker-compose.yml
But it doesn't work
docker run \
--name headscale \
--detach \
--volume /etc/headscale/config:/etc/headscale/config \
--publish 0.0.0.0:8080:8080 \
--publish 0.0.0.0:9090:9090 \
headscale/headscale:latest \
headscale serve
logs
WRN Failed to read configuration from disk error="Config File \"config\" Not Found in \"[/etc/headscale /root/.headscale /]\""
FTL go/src/headscale/cmd/headscale/cli/root.go:48 > Error loading config error="fatal error reading config file: Config File \"config\" Not Found in \"[/etc/headscale /root/.headscale /]\""
Thank you again. I've already solved it
Is apikey the environment parameter KEY for headscale-ui
Error
Key authentication failed. Check your key.
[2023-04-03 09:27:36,316] ERROR in helper: /data/key.txt EXIST: FAILED - NO ERROR
[2023-04-03 09:27:36,316] INFO in helper: All startup checks passed.
[2023-04-03 09:27:36,316] INFO in helper: Testing API key validity.
[2023-04-03 09:27:36,317] INFO in helper: Got a non-200 response from Headscale. Test failed (Response: 500)
[2023-04-03 09:28:07 +0800] [1] [CRITICAL] WORKER TIMEOUT (pid:8)
There are two "keys":
headscale apikeys create
on your Headscale serverKEY
environment variable, generated with openssl rand -base64 32
the KEY
variable is used to encrypt your Headscale API key when it's written to disk (via the "Save" button on the Settings page)
You enter your Headscale API key on the Settings page, click Save, then click Test to verify it works.
Key in that error message refers to your Headscale API key. You'll need to save THEN test :)
Finally working properly
Two summary points are the chown 1000:1000
permission issue and the headscale apikeys create
Good to know! I'll make some changes to the README to make this a bit more clear!