IP segment settings, and I can't start it #1084

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

Originally created by @wlytwmssjo-li on GitHub (Aug 14, 2025).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

sudo systemctl status headscale
● headscale.service - Headscale coordination server
Loaded: loaded (/etc/systemd/system/headscale.service; enabled; preset: disabled)
Active: active (running) since Thu 2025-08-14 21:57:07 CST; 679ms ago
Main PID: 184175 (headscale)
Tasks: 4 (limit: 23171)
Memory: 12.8M
CPU: 28ms
CGroup: /system.slice/headscale.service
└─184175 /usr/local/bin/headscale serve

Aug 14 21:57:07 VM-10-16-rockylinux systemd[1]: Started Headscale coordination server.
[root@VM-10-16-rockylinux ~]# sudo systemctl status headscale
× headscale.service - Headscale coordination server
Loaded: loaded (/etc/systemd/system/headscale.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Thu 2025-08-14 21:57:08 CST; 1s ago
Duration: 490ms
Process: 184197 ExecStart=/usr/local/bin/headscale serve (code=exited, status=1/FAILURE)
Main PID: 184197 (code=exited, status=1/FAILURE)
CPU: 31ms

Aug 14 21:57:08 VM-10-16-rockylinux systemd[1]: headscale.service: Scheduled restart job, restart counter is at 5.
Aug 14 21:57:08 VM-10-16-rockylinux systemd[1]: Stopped Headscale coordination server.
Aug 14 21:57:08 VM-10-16-rockylinux systemd[1]: headscale.service: Start request repeated too quickly.
Aug 14 21:57:08 VM-10-16-rockylinux systemd[1]: headscale.service: Failed with result 'exit-code'.
Aug 14 21:57:08 VM-10-16-rockylinux systemd[1]: Failed to start Headscale coordination server.
[root@VM-10-16-rockylinux ~]# headscale serve --config /etc/headscale/config.yaml
2025-08-14T21:57:16+08:00 FTL ../home/runner/work/headscale/headscale/cmd/headscale/cli/serve.go:24 > Error initializing error="loading configuration: no IPv4 or IPv6 prefix configured, minimum one prefix is required"
[root@VM-10-16-rockylinux ~]# cat /etc/headscale/config.yaml
server_url: https://headscale.xxai.com
listen_addr: 0.0.0.0:8080
metrics_listen_addr: 127.0.0.1:9090

db_type: sqlite3
db_path: /var/lib/headscale/db.sqlite

tls_cert_path: ""
tls_key_path: ""

必填:Tailscale v2 Noise 协议密钥

noise:
private_key_path: /var/lib/headscale/noise_private.key

必填:分配给客户端的子网前缀

prefixes:
ipv4: 100.64.0.0/10
ipv6: fd7a:115c:a1e0::/48

DNS 配置

dns:
override_local_dns: false
nameservers:
global:
- 1.1.1.1
- 8.8.8.8

log_level: info

No matter how I set this configuration file, it keeps prompting me about errors in the IP segment settings, and I can't start it

Expected Behavior

No matter how I set this configuration file, it keeps prompting me about errors in the IP segment settings, and I can't start it

Steps To Reproduce

0.26.1

Environment

- OS:
- Headscale version:
- Tailscale version:

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Debug information

Originally created by @wlytwmssjo-li on GitHub (Aug 14, 2025). ### Is this a support request? - [x] This is not a support request ### Is there an existing issue for this? - [x] I have searched the existing issues ### Current Behavior sudo systemctl status headscale ● headscale.service - Headscale coordination server Loaded: loaded (/etc/systemd/system/headscale.service; enabled; preset: disabled) Active: active (running) since Thu 2025-08-14 21:57:07 CST; 679ms ago Main PID: 184175 (headscale) Tasks: 4 (limit: 23171) Memory: 12.8M CPU: 28ms CGroup: /system.slice/headscale.service └─184175 /usr/local/bin/headscale serve Aug 14 21:57:07 VM-10-16-rockylinux systemd[1]: Started Headscale coordination server. [root@VM-10-16-rockylinux ~]# sudo systemctl status headscale × headscale.service - Headscale coordination server Loaded: loaded (/etc/systemd/system/headscale.service; enabled; preset: disabled) Active: failed (Result: exit-code) since Thu 2025-08-14 21:57:08 CST; 1s ago Duration: 490ms Process: 184197 ExecStart=/usr/local/bin/headscale serve (code=exited, status=1/FAILURE) Main PID: 184197 (code=exited, status=1/FAILURE) CPU: 31ms Aug 14 21:57:08 VM-10-16-rockylinux systemd[1]: headscale.service: Scheduled restart job, restart counter is at 5. Aug 14 21:57:08 VM-10-16-rockylinux systemd[1]: Stopped Headscale coordination server. Aug 14 21:57:08 VM-10-16-rockylinux systemd[1]: headscale.service: Start request repeated too quickly. Aug 14 21:57:08 VM-10-16-rockylinux systemd[1]: headscale.service: Failed with result 'exit-code'. Aug 14 21:57:08 VM-10-16-rockylinux systemd[1]: Failed to start Headscale coordination server. [root@VM-10-16-rockylinux ~]# headscale serve --config /etc/headscale/config.yaml 2025-08-14T21:57:16+08:00 FTL ../home/runner/work/headscale/headscale/cmd/headscale/cli/serve.go:24 > Error initializing error="loading configuration: no IPv4 or IPv6 prefix configured, minimum one prefix is required" [root@VM-10-16-rockylinux ~]# cat /etc/headscale/config.yaml server_url: https://headscale.xxai.com listen_addr: 0.0.0.0:8080 metrics_listen_addr: 127.0.0.1:9090 db_type: sqlite3 db_path: /var/lib/headscale/db.sqlite tls_cert_path: "" tls_key_path: "" # 必填:Tailscale v2 Noise 协议密钥 noise: private_key_path: /var/lib/headscale/noise_private.key # 必填:分配给客户端的子网前缀 prefixes: ipv4: 100.64.0.0/10 ipv6: fd7a:115c:a1e0::/48 # DNS 配置 dns: override_local_dns: false nameservers: global: - 1.1.1.1 - 8.8.8.8 log_level: info No matter how I set this configuration file, it keeps prompting me about errors in the IP segment settings, and I can't start it ### Expected Behavior No matter how I set this configuration file, it keeps prompting me about errors in the IP segment settings, and I can't start it ### Steps To Reproduce 0.26.1 ### Environment ```markdown - OS: - Headscale version: - Tailscale version: ``` ### Runtime environment - [x] Headscale is behind a (reverse) proxy - [ ] Headscale runs in a container ### Debug information 无
adam added the bug label 2025-12-29 02:28:11 +01:00
adam closed this issue 2025-12-29 02:28:11 +01:00
Author
Owner

@nblock commented on GitHub (Aug 14, 2025):

Please fix the formatting of the config file using backticks (```) and submit your configuration file as attachment

@nblock commented on GitHub (Aug 14, 2025): Please fix the formatting of the config file using backticks (```) and submit your configuration file as attachment
Author
Owner

@wlytwmssjo-li commented on GitHub (Aug 14, 2025):

cat config.yaml
server_url: https://headscale.xxai.com
listen_addr: 0.0.0.0:8080
metrics_listen_addr: 127.0.0.1:9090

db_type: sqlite3
db_path: /var/lib/headscale/db.sqlite

tls_cert_path: ""
tls_key_path: ""

noise:
private_key_path: /var/lib/headscale/noise_private.key

分配的子网前缀(必填,IPv4/IPv6 至少一个)

prefixes:
ipv4: 100.64.0.0/10
ipv6: fd7a:115c:a1e0::/48

dns:
override_local_dns: false
nameservers:
global:
- 1.1.1.1
- 8.8.8.8

log_level: info

@wlytwmssjo-li commented on GitHub (Aug 14, 2025): cat config.yaml server_url: https://headscale.xxai.com listen_addr: 0.0.0.0:8080 metrics_listen_addr: 127.0.0.1:9090 db_type: sqlite3 db_path: /var/lib/headscale/db.sqlite tls_cert_path: "" tls_key_path: "" noise: private_key_path: /var/lib/headscale/noise_private.key # 分配的子网前缀(必填,IPv4/IPv6 至少一个) prefixes: ipv4: 100.64.0.0/10 ipv6: fd7a:115c:a1e0::/48 dns: override_local_dns: false nameservers: global: - 1.1.1.1 - 8.8.8.8 log_level: info
Author
Owner

@wlytwmssjo-li commented on GitHub (Aug 15, 2025):

config.yaml this is my config.yaml

@wlytwmssjo-li commented on GitHub (Aug 15, 2025): [config.yaml](https://github.com/user-attachments/files/21792263/config.yaml) this is my config.yaml
Author
Owner

@nblock commented on GitHub (Aug 15, 2025):

config.yaml this is my config.yaml

Have a look at the example configuration for 0.26.1:

474ea236d0/config-example.yaml (L58-L60)

It should be v4 and v6 respectively, you have ipv4 and ipv6. Some other parameters are invalid, too.

@nblock commented on GitHub (Aug 15, 2025): > [config.yaml](https://github.com/user-attachments/files/21792263/config.yaml) this is my config.yaml Have a look at the [example configuration for 0.26.1](https://github.com/juanfont/headscale/blob/v0.26.1/config-example.yaml): https://github.com/juanfont/headscale/blob/474ea236d0c6d393dbcf7baa98da240ad20c1b66/config-example.yaml#L58-L60 It should be `v4` and `v6` respectively, you have `ipv4` and `ipv6`. Some other parameters are invalid, too.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1084