A tool to automatically sync Tailscale certificates, Traefik routing, and optionally DNS/Funnel exposure for Docker containers โ expose services over your tailnet or Internet via HTTPS, with zero manual label editing required.
TailWhale is a sidecar/companion service + CLI + optional UI that runs alongside Docker & Traefik.
It watches your Docker environment, identifies containers you want to expose, uses Tailscale to issue SSL certificates, and updates a tls.yml file that Traefik watches (hot reloaded).
With MagicDNS enabled, TailWhale generates hostnames for your containers so they are reachable inside the tailnet.
With Funnel, you can expose Traefik itself directly on the Internet with HTTPS automatically handled by Tailscale.
Official website: https://tailwhale.sh
- ๐ Auto-discovery of containers to expose
- ๐ Automatic certificate issuance via Tailscale
- ๐ Dynamic Traefik TLS config (hot reload)
- ๐ฅ CLI & Daemon (watch mode)
- ๐ Optional Web UI / Docker Desktop Extension
- ๐ฑ MagicDNS integration
- ๐ณ Three exposure modes:
- Mode A: Host + Traefik (default)
- Mode B: Per-container sidecar
- Mode C: Funnel on Traefik (public exposure)
- One Tailscale node (the host).
- Containers exposed via Traefik routing.
- Hostname pattern:
<container>.<host>.<tailnet>.ts.net
- Each container runs its own Tailscale sidecar.
- Each container is an independent node.
- Hostname pattern:
<container>.<tailnet>.ts.net
- Tailscale Funnel enabled on Traefik container.
- Exposes Traefik publicly on Internet with TLS managed by Tailscale.
- Hostname pattern:
https://<host>.ts.net
core/โ discovery, naming, mode selectiondocker/โ container list, eventstailscale/โ certs, MagicDNS checks, Funnel setuptraefik/โ TLS file writer (Mode A only)cmd/tailwhaleโ CLIcmd/extension-apiโ REST backend for UIui/โ Next.js frontend
- Tailnet with MagicDNS enabled
- Tailscale installed on host (Mode A)
- Or sidecar Tailscale containers (Mode B)
- Or Funnel enabled on host/container (Mode C)
# one-off sync: discover โ issue cert paths โ write traefik/tls.yml
tailwhale sync \
--host host1 --tailnet tn \
--tls-path traefik/tls.yml --cert-dir /var/lib/tailwhale/certs
# watch: prefer Docker events (when built with tag `docker`), fallback to interval
tailwhale watch \
--host host1 --tailnet tn \
--tls-path traefik/tls.yml --cert-dir /var/lib/tailwhale/certs \
--interval 10s
# list: show resolved services; load containers from JSON for offline dev
tailwhale list --json
tailwhale list --from-file ./examples/containers.jsonMakefile demo
- Run
make demoto list services fromexamples/containers.jsonand write a preview TLS file to/tmp/tailwhale_tls.ymlusingexamples/tailwhale.json.
Config file (optional)
- Pass
--config examples/tailwhale.jsontosync/watchto sethost,tailnet,tlsPath,certDir. - Flag values override file values.
{
"host": "host1",
"tailnet": "tn",
"tlsPath": "traefik/tls.yml",
"certDir": "/var/lib/tailwhale/certs"
}docker tailwhale expose myapp --host myapp.ts.net
docker tailwhale list- Default build uses a fake Docker provider (no external deps).
- To use the real Docker provider, build with tag
docker:Watch mode will then react to Docker events and rewritego build -tags docker ./cmd/tailwhale
tls.ymlatomically.
- A minimal terminal UI is scaffolded behind the
tuibuild tag using Bubble Tea. - Install deps and build:
The TUI lists discovered services and supports
# add dependency once (when you want to build the TUI) go get github.com/charmbracelet/bubbletea@latest # build the TUI binary (tagged to avoid affecting default CI builds) go build -tags tui ./cmd/twui ./twui
rto refresh andqto quit.
- Auto certs with Tailscale
- Dynamic TLS config for Traefik
- CLI toggle for exposure mode (A, B, C)
- Funnel automation (start/stop, status)
- UI for toggling exposure per service
- Integration with Tailscale API (MagicDNS, Funnel)
- Docker Desktop Extension packaging
- Metrics & observability
gantt
title TailWhale Project Timeline
dateFormat YYYY-MM-DD
section MVP
CLI Skeleton (sync, watch, list) :a1, 2025-09-15, 14d
Auto Certs + TLS File :a2, after a1, 14d
section v1.0
MagicDNS Integration :b1, after a2, 14d
Funnel Mode Support (Mode C) :b2, after b1, 14d
section v2.0
UI / Docker Extension :c1, after b2, 21d
Tailscale API Advanced (Funnel, DNS) :c2, after c1, 21d
Metrics + Prometheus Exporter :c3, after c2, 14d
```ics + Prometheus Exporter :c3, after c2, 14d
TailWhale is released under the MIT License.
See the LICENSE file for full details.