From 29772a655bad4727340cd4a63f30b52634fc1425 Mon Sep 17 00:00:00 2001 From: debian Date: Fri, 24 Oct 2025 00:04:12 +0200 Subject: [PATCH] create config template for headscale --- .../config/{config.yaml => config-template.yaml.j2} | 11 ++++------- services/headscale/headscale.yml | 3 +-- 2 files changed, 5 insertions(+), 9 deletions(-) rename services/headscale/config/{config.yaml => config-template.yaml.j2} (98%) diff --git a/services/headscale/config/config.yaml b/services/headscale/config/config-template.yaml.j2 similarity index 98% rename from services/headscale/config/config.yaml rename to services/headscale/config/config-template.yaml.j2 index eb92a63..aaa7a0f 100644 --- a/services/headscale/config/config.yaml +++ b/services/headscale/config/config-template.yaml.j2 @@ -10,13 +10,13 @@ # # https://myheadscale.example.com:443 # -server_url: http://0.0.0.0:8080 +server_url: {{ headscale_server_url }} # Address to listen to / bind to on the server # # For production: -listen_addr: 0.0.0.0:8080 #listen_addr: 127.0.0.1:8080 +listen_addr: {{ headscale_listen_addr }} # Address to listen to /metrics and /debug, you may want # to keep this endpoint private to your internal network @@ -276,7 +276,7 @@ dns: # `base_domain` must be a FQDN, without the trailing dot. # The FQDN of the hosts will be # `hostname.base_domain` (e.g., _myhost.example.com_). - base_domain: example.com + base_domain: {{ headscale_base_domain }} # Whether to use the local DNS settings of a node or override the local DNS # settings (default) and force the use of Headscale's DNS configuration. @@ -285,10 +285,7 @@ dns: # List of DNS servers to expose to clients. nameservers: global: - - 1.1.1.1 - - 1.0.0.1 - - 2606:4700:4700::1111 - - 2606:4700:4700::1001 + - {{ dns_nameserver }} # NextDNS (see https://tailscale.com/kb/1218/nextdns/). # "abc123" is example NextDNS ID, replace with yours. diff --git a/services/headscale/headscale.yml b/services/headscale/headscale.yml index 890f822..925e8fe 100644 --- a/services/headscale/headscale.yml +++ b/services/headscale/headscale.yml @@ -15,8 +15,7 @@ services: command: serve environment: HEADSCALE_SERVER_URL: ${HOST_IP} - HEADSCALE_DNS_NAMESERVERS: ${DNS_NODE_IP:-10.10.10.3} - HEADSCALE_DNS_MAGIC_DNS: "true" + HEADSCALE_DNS_NAMESERVERS: ${DNS_NODE_IP:-1.1.1.1} networks: - ip4net labels: