mirror of
https://github.com/juanfont/headscale.git
synced 2026-01-12 04:10:32 +01:00
fail to run headscale serve #561
Closed
opened 2025-12-29 02:20:20 +01:00 by adam
·
12 comments
No Branch/Tag Specified
main
update_flake_lock_action
gh-pages
kradalby/release-v0.27.2
dependabot/go_modules/golang.org/x/crypto-0.45.0
dependabot/go_modules/github.com/opencontainers/runc-1.3.3
copilot/investigate-headscale-issue-2788
copilot/investigate-visibility-issue-2788
copilot/investigate-issue-2833
copilot/debug-issue-2846
copilot/fix-issue-2847
dependabot/go_modules/github.com/go-viper/mapstructure/v2-2.4.0
dependabot/go_modules/github.com/docker/docker-28.3.3incompatible
kradalby/cli-experiement3
doc/0.26.1
doc/0.25.1
doc/0.25.0
doc/0.24.3
doc/0.24.2
doc/0.24.1
doc/0.24.0
kradalby/build-docker-on-pr
topic/docu-versioning
topic/docker-kos
juanfont/fix-crash-node-id
juanfont/better-disclaimer
update-contributors
topic/prettier
revert-1893-add-test-stage-to-docs
add-test-stage-to-docs
remove-node-check-interval
fix-empty-prefix
fix-ephemeral-reusable
bug_report-debuginfo
autogroups
logs-to-stderr
revert-1414-topic/fix_unix_socket
rename-machine-node
port-embedded-derp-tests-v2
port-derp-tests
duplicate-word-linter
update-tailscale-1.36
warn-against-apache
ko-fi-link
more-acl-tests
fix-typo-standalone
parallel-nolint
tparallel-fix
rerouting
ssh-changelog-docs
oidc-cleanup
web-auth-flow-tests
kradalby-gh-runner
fix-proto-lint
remove-funding-links
go-1.19
enable-1.30-in-tests
0.16.x
cosmetic-changes-integration
tmp-fix-integration-docker
fix-integration-docker
configurable-update-interval
show-nodes-online
hs2021
acl-syntax-fixes
ts2021-implementation
fix-spurious-updates
unstable-integration-tests
mandatory-stun
embedded-derp
prtemplate-fix
v0.28.0-beta.1
v0.27.2-rc.1
v0.27.1
v0.27.0
v0.27.0-beta.2
v0.27.0-beta.1
v0.26.1
v0.26.0
v0.26.0-beta.2
v0.26.0-beta.1
v0.25.1
v0.25.0
v0.25.0-beta.2
v0.24.3
v0.25.0-beta.1
v0.24.2
v0.24.1
v0.24.0
v0.24.0-beta.2
v0.24.0-beta.1
v0.23.0
v0.23.0-rc.1
v0.23.0-beta.5
v0.23.0-beta.4
v0.23.0-beta3
v0.23.0-beta2
v0.23.0-beta1
v0.23.0-alpha12
v0.23.0-alpha11
v0.23.0-alpha10
v0.23.0-alpha9
v0.23.0-alpha8
v0.23.0-alpha7
v0.23.0-alpha6
v0.23.0-alpha5
v0.23.0-alpha4
v0.23.0-alpha4-docker-ko-test9
v0.23.0-alpha4-docker-ko-test8
v0.23.0-alpha4-docker-ko-test7
v0.23.0-alpha4-docker-ko-test6
v0.23.0-alpha4-docker-ko-test5
v0.23.0-alpha-docker-release-test-debug2
v0.23.0-alpha-docker-release-test-debug
v0.23.0-alpha4-docker-ko-test4
v0.23.0-alpha4-docker-ko-test3
v0.23.0-alpha4-docker-ko-test2
v0.23.0-alpha4-docker-ko-test
v0.23.0-alpha3
v0.23.0-alpha2
v0.23.0-alpha1
v0.22.3
v0.22.2
v0.23.0-alpha-docker-release-test
v0.22.1
v0.22.0
v0.22.0-alpha3
v0.22.0-alpha2
v0.22.0-alpha1
v0.22.0-nfpmtest
v0.21.0
v0.20.0
v0.19.0
v0.19.0-beta2
v0.19.0-beta1
v0.18.0
v0.18.0-beta4
v0.18.0-beta3
v0.18.0-beta2
v0.18.0-beta1
v0.17.1
v0.17.0
v0.17.0-beta5
v0.17.0-beta4
v0.17.0-beta3
v0.17.0-beta2
v0.17.0-beta1
v0.17.0-alpha4
v0.17.0-alpha3
v0.17.0-alpha2
v0.17.0-alpha1
v0.16.4
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.16.0-beta7
v0.16.0-beta6
v0.16.0-beta5
v0.16.0-beta4
v0.16.0-beta3
v0.16.0-beta2
v0.16.0-beta1
v0.15.0
v0.15.0-beta6
v0.15.0-beta5
v0.15.0-beta4
v0.15.0-beta3
v0.15.0-beta2
v0.15.0-beta1
v0.14.0
v0.14.0-beta2
v0.14.0-beta1
v0.13.0
v0.13.0-beta3
v0.13.0-beta2
v0.13.0-beta1
upstream/v0.12.4
v0.12.4
v0.12.3
v0.12.2
v0.12.2-beta1
v0.12.1
v0.12.0-beta2
v0.12.0-beta1
v0.11.0
v0.10.8
v0.10.7
v0.10.6
v0.10.5
v0.10.4
v0.10.3
v0.10.2
v0.10.1
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.1
v0.8.0
v0.7.1
v0.7.0
v0.6.1
v0.6.0
v0.5.2
v0.5.1
v0.5.0
v0.4.0
v0.3.6
v0.3.5
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.2
v0.2.1
v0.2.0
v0.1.1
v0.1.0
Labels
Clear labels
CLI
DERP
DNS
Nix
OIDC
SSH
bug
database
documentation
duplicate
enhancement
faq
good first issue
grants
help wanted
might-come
needs design doc
needs investigation
no-stale-bot
out of scope
performance
policy 📝
pull-request
question
regression
routes
stale
tags
tailscale-feature-gap
well described ❤️
wontfix
Mirrored from GitHub Pull Request
No Label
bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/headscale#561
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Micraow on GitHub (Sep 30, 2023).
Bug description
After following the brief installation guide step by step, I came to
systemctl status headscaleUnfortunately, it fails. I retried and checked my conf, but it still exist:
I tried
headscale serveas root, but it shows:I hope you can help me with it. Thanks!
Environment
To Reproduce
follow the guide at: https://headscale.net/running-headscale-linux/#installation
@zacred0rryn commented on GitHub (Sep 30, 2023):
I just encountered the exact same failure as you on ubuntu20.04 with v0.22.3, and I tried
mkdir -p /var/run/headscale && touch /var/run/headscale/headscale.sockas root which didn't help since the/var/run/headscaledirectory disappeared immediately.@Micraow commented on GitHub (Sep 30, 2023):
Yes! I also tried this and the folder disappeared immediately. I thought it was my own fault before.
@Micraow commented on GitHub (Sep 30, 2023):
The docker version outputs this:
2023-09-30T07:57:25Z INF No private key file at path, creating... path=/var/lib/headscale/private.key
2023-09-30T07:57:25Z FTL go/src/headscale/cmd/headscale/cli/server.go:21 > Error initializing error="failed to read or create private key: failed to save private key to disk: open /var/lib/headscale/private.key: no such file or directory"
@zacred0rryn commented on GitHub (Sep 30, 2023):
I've solved the problem on my machine by deleting all related stuff first:
Then redo the installation and get
config.yamlset (I keptunix_socketunchanged from the example config), and the service starts up successfully with no error after reboot either.I don't know why this worked for me. It just did.
@Micraow commented on GitHub (Sep 30, 2023):
Oops!
It doesn't work for me.
在 2023-09-30 17:26:36,"桜戸りん" @.***> 写道:
I've solved the problem on my machine by deleting all related stuff first:
apt remove headscale# rm -rf /etc/headscale && rm-rf /var/lib/headscale# usermod -g root headscale && groupdel headscale && userdel headscale
Then redo the installation and get config.yaml set (I kept unix_socket unchanged from the example config), and the service starts up successfully with no error after reboot either.
I don't know why this worked for me. It just did.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>
@XiaowenHu96 commented on GitHub (Oct 17, 2023):
I encountered the same issue on the same version of the OS, and it was resolved simply by cleaning up the directories and reinstalling. This issue might be related to #1417.
Looking at the
postinstall.shscript, I couldn't find anything suspicious. Permissions appear to be set correctly, but I should note that I'm not experienced with Debian packaging.Could you please share the output from the system journal using this command:
journalctl -u headscale?@myltw commented on GitHub (Dec 1, 2023):
@kradalby commented on GitHub (Dec 10, 2023):
Please use discord for support requests.
@samdelong commented on GitHub (Jan 24, 2024):
I was able to work around this by appending the mkdir command before starting headscale as such
sudo mkdir /var/run/headscale && sudo headscale serve@luckylinux commented on GitHub (Feb 25, 2024):
Not the prettiest solution when using Docker/Podman, but you could just add a volume mount to /var/run/headscale.
In my case I created a folder in /home/podman/run/headscale (my podman running user is
podman):Example
compose.yml:@W1BTR commented on GitHub (Aug 6, 2024):
Also having this issue when running through docker using the updated config. I plan to run behind a reverse proxy called caddy.
headscale fails to run with the error:
Error starting server error="failed to set up gRPC socket: listen unix /var/run/headscale/headscale.sock: bind: no such file or directory"I tried pruning the container and removing the config but still have this issue. @luckylinux what exactly did you put in /run/headscale? I dont have anything set for /var/run/headscale in my docker-compose.
@luckylinux commented on GitHub (Aug 7, 2024):
@W1BTR: it was
~/run/headscaleAKA/home/<myuser>/run/headscale. Pretty sure you don't have to put anything, just create the folder and mount, so that Headscale can create Files (which apparently did NOT work unless I did that - weird).Anyway since I got the "Headscale is no supported yada yada" Talk when discussing Issues with the Tailscale Client on the Tailscale Issue Tracker (especially related to DNS Issues), I was trying to move on to
netbirdinstead but faced several Issues related to SSO (both Keycloak and Authentik). So right now I'm stuck with nothing working to be honest ...