summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-02-20 22:19:08 +0800
committerYour Name <you@example.com>2026-02-20 22:19:08 +0800
commitda23533f1e3e226a9b3eea825e94a3b8332182e4 (patch)
treeea6c07600664a781fdfcf9226704caf59961d320
parentc0e80820010cc5b0fdea1eb69bafef7f575e3201 (diff)
Enable DERP relay fallback in headscale configHEADmain
Remove the sed that commented out the default DERP map URL, keeping DERP relays available as fallback when NAT traversal fails. Retain the auto_update_enabled=false setting for the DERP map. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-rwxr-xr-xserver.sh3
1 files changed, 0 insertions, 3 deletions
diff --git a/server.sh b/server.sh
index 41b88ce..060ca1e 100755
--- a/server.sh
+++ b/server.sh
@@ -5,7 +5,6 @@
5# docs: 5# docs:
6# this script assumes the ip addresses is pointed to the current machine, and this script runs on 0.0.0.0 6# this script assumes the ip addresses is pointed to the current machine, and this script runs on 0.0.0.0
7# configuration is kinda manual cuz the official packaging is for .deb and i want rhel based system 7# configuration is kinda manual cuz the official packaging is for .deb and i want rhel based system
8# fallback (Designated Encrypted Relay for Packets) is disabled. if NAT traversal fails, there will be no connection
9set -e 8set -e
10 9
11die() { echo "Error: $1" >&2; exit 1; } 10die() { echo "Error: $1" >&2; exit 1; }
@@ -106,8 +105,6 @@ cp /var/tmp/config-example.yaml /etc/headscale/config.yaml
106rm -f /var/tmp/config-example.yaml 105rm -f /var/tmp/config-example.yaml
107sed -i "s|server_url: http://127.0.0.1:8080|server_url: http://${PUBLIC_IP}:8080|" /etc/headscale/config.yaml 106sed -i "s|server_url: http://127.0.0.1:8080|server_url: http://${PUBLIC_IP}:8080|" /etc/headscale/config.yaml
108sed -i "s|listen_addr: 127.0.0.1:8080|listen_addr: 0.0.0.0:8080|" /etc/headscale/config.yaml 107sed -i "s|listen_addr: 127.0.0.1:8080|listen_addr: 0.0.0.0:8080|" /etc/headscale/config.yaml
109# Disable DERP relays — all nodes have public IPs, force direct WireGuard connections only
110sed -i 's| - https://controlplane.tailscale.com/derpmap/default| # - https://controlplane.tailscale.com/derpmap/default|' /etc/headscale/config.yaml
111sed -i 's| auto_update_enabled: true| auto_update_enabled: false|' /etc/headscale/config.yaml 108sed -i 's| auto_update_enabled: true| auto_update_enabled: false|' /etc/headscale/config.yaml
112chown -R headscale:headscale /etc/headscale 109chown -R headscale:headscale /etc/headscale
113 110