failed to read or create private key: failed to parse private key: key hex has the wrong size, got 44 want 64 #288

Closed
opened 2025-12-29 01:26:12 +01:00 by adam · 4 comments
Owner

Originally created by @xxooo on GitHub (Jul 3, 2022).

wg genkey > /etc/headscale/private.key

FTL ../../home/runner/work/headscale/headscale/cmd/headscale/cli/server.go:21 > Error initializing error="failed to read or create private key: failed to parse private key: key hex has the wrong size, got 44 want 64"

??? version is v0.15.0 v0.16.0-beta5

Originally created by @xxooo on GitHub (Jul 3, 2022). wg genkey > /etc/headscale/private.key FTL ../../home/runner/work/headscale/headscale/cmd/headscale/cli/server.go:21 > Error initializing error="failed to read or create private key: failed to parse private key: key hex has the wrong size, got 44 want 64" ??? version is v0.15.0 v0.16.0-beta5
adam added the enhancement label 2025-12-29 01:26:12 +01:00
adam closed this issue 2025-12-29 01:26:12 +01:00
Author
Owner

@kradalby commented on GitHub (Jul 3, 2022):

Dont manually generate the key, Headscale will do it for you, delete the key and restart.

You must have read some outdated docs or not seen a changelog, can you link where you followed?

@kradalby commented on GitHub (Jul 3, 2022): Dont manually generate the key, Headscale will do it for you, delete the key and restart. You must have read some outdated docs or not seen a changelog, can you link where you followed?
Author
Owner

@xxooo commented on GitHub (Jul 6, 2022):

headscale nodes list
ID | Name | NodeKey | Namespace | IP addresses | Ephemeral | Last seen | Online | Expired
1 | centos229 | [a6egY] | qqdafenqi | 10.8.8.1, | false | 2022-07-06 08:14:40 | online | no
2 | landeMacBook-Air | [YYwn5] | qqdafenqi | 10.8.8.2, | false | 2022-07-06 08:14:43 | online | no

[root@centos229 ~]# ping 10.8.8.2
PING 10.8.8.2 (10.8.8.2) 56(84) bytes of data.

2022-07-06T08:16:36Z INF Client sent endpoint update and is ok with a response without peer list handler=PollNetMap machine=centos229
2022-07-06T08:16:40Z INF Client sent endpoint update and is ok with a response without peer list handler=PollNetMap machine=centos229
2022-07-06T08:16:52Z ERR ../home/runner/work/headscale/headscale/api.go:159 > Cannot decode message error="cannot decrypt response"
2022-07-06T08:17:11Z ERR ../home/runner/work/headscale/headscale/api.go:159 > Cannot decode message error="cannot decrypt response"

version v0.16.0-beta5

@xxooo commented on GitHub (Jul 6, 2022): headscale nodes list ID | Name | NodeKey | Namespace | IP addresses | Ephemeral | Last seen | Online | Expired 1 | centos229 | [a6egY] | qqdafenqi | 10.8.8.1, | false | 2022-07-06 08:14:40 | online | no 2 | landeMacBook-Air | [YYwn5] | qqdafenqi | 10.8.8.2, | false | 2022-07-06 08:14:43 | online | no [root@centos229 ~]# ping 10.8.8.2 PING 10.8.8.2 (10.8.8.2) 56(84) bytes of data. 2022-07-06T08:16:36Z INF Client sent endpoint update and is ok with a response without peer list handler=PollNetMap machine=centos229 2022-07-06T08:16:40Z INF Client sent endpoint update and is ok with a response without peer list handler=PollNetMap machine=centos229 2022-07-06T08:16:52Z ERR ../home/runner/work/headscale/headscale/api.go:159 > Cannot decode message error="cannot decrypt response" 2022-07-06T08:17:11Z ERR ../home/runner/work/headscale/headscale/api.go:159 > Cannot decode message error="cannot decrypt response" version v0.16.0-beta5
Author
Owner

@xxooo commented on GitHub (Jul 7, 2022):

@kradalby

@xxooo commented on GitHub (Jul 7, 2022): @kradalby
Author
Owner

@kradalby commented on GitHub (Jul 10, 2022):

Hi, please ask about support requests on Discord.

@kradalby commented on GitHub (Jul 10, 2022): Hi, please ask about support requests on Discord.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#288