Files
umbrel-apps/tailscale/docker-compose.yml
T
Luke Childs be578a37de Fix Tailscale subnet routing for kernel TUN mode
Tailscale was defaulting to iptables mode inside the container, which installed subnet-router forwarding and masquerade rules into iptables-legacy on umbrelOS. Docker and umbrelOS use the nftables-backed firewall path, so forwarded subnet traffic could still hit the nftables FORWARD policy and fail before NAT.

Forcing nftables makes Tailscale install its ts-forward and ts-postrouting rules into the same firewall backend used by Docker.

This was working fine previously since we used userspace networking mode.
2026-06-30 15:56:17 +07:00

24 lines
880 B
YAML

version: "3.7"
services:
web:
# Host networking plus kernel TUN mode lets tailscaled create the host
# tailscale0 interface and routes. umbrelOS host services, such as CIFS
# mounts used by network backups, need those routes to reach tailnet peers.
network_mode: "host"
image: tailscale/tailscale:v1.98.3@sha256:854b77123b9536adae2e97f5a5fdb1790ed03438b911ab7f07780155e0af6ce2
restart: on-failure
stop_grace_period: 1m
environment:
- TS_DEBUG_FIREWALL_MODE=nftables
# Required for tailscaled to manage the host TUN interface and route table.
cap_add:
- NET_ADMIN
- NET_RAW
devices:
- /dev/net/tun:/dev/net/tun
# Keep tailscaled in kernel TUN mode so host routes are available.
command: "sh -c 'tailscale web --listen 0.0.0.0:8240 & exec tailscaled'"
volumes:
- ${APP_DATA_DIR}/data:/var/lib