From 56121f5e5e4138d6d04265d18f4c37db44354485 Mon Sep 17 00:00:00 2001 From: Laszlo Magyar Date: Mon, 1 Dec 2025 21:38:43 +0100 Subject: [PATCH 1/2] Make always use derp option configurable --- tailscale/DOCS.md | 15 +++++++++++++++ tailscale/config.yaml | 2 ++ .../rootfs/etc/s6-overlay/s6-rc.d/tailscaled/run | 6 ++++++ tailscale/translations/en.yaml | 6 ++++++ 4 files changed, 29 insertions(+) diff --git a/tailscale/DOCS.md b/tailscale/DOCS.md index 1f7d3e2b5..b214eecee 100644 --- a/tailscale/DOCS.md +++ b/tailscale/DOCS.md @@ -72,6 +72,7 @@ advertise_routes: - local_subnets - 192.168.1.0/24 - fd12:3456:abcd::/64 +always_use_derp: false exit_node: 100.101.102.103 log_level: info login_server: "https://controlplane.tailscale.com" @@ -165,6 +166,20 @@ More information: [Subnet routers][tailscale_info_subnets] The app by default will advertise routes to your subnets on all supported interfaces by adding `local_subnets` to the list. +### Option: `always_use_derp` + +When enabled forces all peer communication over DERP by disabling the use of +UDP. + +This option is disabled by default. + +Basically you will never want to enable this option. Try to enable it only, when +you experience that connections to your Home Assistant device regularly freeze +(even when you can ping the device, the web page or the Home Assistant app is +unresponsive), and you have to reload the web page or force stop the Home +Assistant app to make them work again. The root cause can be that your ISP +erroneously drops UDP packets on certain conditions. + ### Option: `exit_node` This option allows you to specify another Tailscale instance as an exit node for diff --git a/tailscale/config.yaml b/tailscale/config.yaml index 9adafcf67..5c018a4fe 100644 --- a/tailscale/config.yaml +++ b/tailscale/config.yaml @@ -33,6 +33,7 @@ options: advertise_connector: true advertise_routes: - local_subnets + always_use_derp: false log_level: info login_server: "https://controlplane.tailscale.com" share_homeassistant: disabled @@ -49,6 +50,7 @@ schema: advertise_connector: bool advertise_routes: - "match(^(?:local_subnets|(?:(?:25[0-5]|(?:2[0-4]|1\\d|[1-9]?)\\d)\\.){3}(?:25[0-5]|(?:2[0-4]|1\\d|[1-9]?)\\d)\\/(?:3[0-2]|[12]?\\d)|[a-fA-F\\d.:]+:[a-fA-F\\d.:]+\\/(?:12[0-8]|(?:1[01]|[1-9]?)\\d))$)" + always_use_derp: bool exit_node: "match(^(?:(?:(?:25[0-5]|(?:2[0-4]|1\\d|[1-9]?)\\d)\\.){3}(?:25[0-5]|(?:2[0-4]|1\\d|[1-9]?)\\d)|[a-fA-F\\d.:]+:[a-fA-F\\d.:]+|[a-fA-F\\d]{8}(?:-[a-fA-F\\d]{4}){3}-[a-fA-F\\d]{12}|auto:any)$)?" log_level: list(trace|debug|info|notice|warning|error|fatal) login_server: url diff --git a/tailscale/rootfs/etc/s6-overlay/s6-rc.d/tailscaled/run b/tailscale/rootfs/etc/s6-overlay/s6-rc.d/tailscaled/run index 12e8114f1..577ef9552 100755 --- a/tailscale/rootfs/etc/s6-overlay/s6-rc.d/tailscaled/run +++ b/tailscale/rootfs/etc/s6-overlay/s6-rc.d/tailscaled/run @@ -33,6 +33,12 @@ if bashio::config.true "userspace_networking"; then options+=(--tun=userspace-networking) fi +# If always_use_derp enabled, set TS_DEBUG_ALWAYS_USE_DERP=true +if bashio::config.true "always_use_derp"; then + export TS_DEBUG_ALWAYS_USE_DERP=true + bashio::log.notice "You have enabled always_use_derp, all traffic will be routed via DERP servers" +fi + # Run Tailscale # If exists, resolv.dnsmasq.conf pointing to the dummy dnsmasq will be mounted in place of the real resolv.conf only for tailscaled # This will prevent the DNS at 100.100.100.100 to call back to hassio_dns causing a loop diff --git a/tailscale/translations/en.yaml b/tailscale/translations/en.yaml index caecb7950..6b7231a90 100644 --- a/tailscale/translations/en.yaml +++ b/tailscale/translations/en.yaml @@ -34,6 +34,12 @@ configuration: your device is connected to) to other clients on your tailnet. The app by default will advertise routes to your subnets on all supported interfaces by adding `local_subnets` to the list. + always_use_derp: + name: Alwas use DERP connection + description: >- + When enabled forces all peer communication over DERP by disabling the use of + UDP. + This option is disabled by default. exit_node: name: Use exit node description: >- From f5a96b29dbf846958c59855ea0f1808318250875 Mon Sep 17 00:00:00 2001 From: David Bishop Date: Mon, 5 Jan 2026 13:02:01 -0800 Subject: [PATCH 2/2] Fix small typo in English translation (#261) --- tailscale/translations/en.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailscale/translations/en.yaml b/tailscale/translations/en.yaml index 6b7231a90..d7bbffc5c 100644 --- a/tailscale/translations/en.yaml +++ b/tailscale/translations/en.yaml @@ -35,7 +35,7 @@ configuration: The app by default will advertise routes to your subnets on all supported interfaces by adding `local_subnets` to the list. always_use_derp: - name: Alwas use DERP connection + name: Always use DERP connection description: >- When enabled forces all peer communication over DERP by disabling the use of UDP.