RepositoryGoPTPortugal
AL

almeidapaulopt/tsdproxy

Automatic Tailscale reverse proxy for Docker containers. Zero sidecars. Label-based config. Automatic HTTPS.

1.8kstars
89forks
16issues
2views

Featured achievements

The project's latest awards

2
TINIX TRENDING·Topic: tailscale

#2 Repository of the week

3
TINIX TRENDING·Country: PT

#3 Repository of the week

4
TINIX TRENDING·Topic: https

#4 Repository of the week

TSDProxy - Tailscale Docker Proxy

The easiest way to expose Docker containers on your Tailscale network. One label. Zero sidecars.

GitHub Stars GitHub Issues Docker Pulls License Go Version Release

TSDProxy Demo

Quick Start

Get running in under a minute. One compose file, one label.

Step 1: Create docker-compose.yml

services:
  tsdproxy:
    image: almeidapaulopt/tsdproxy:2
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - tsdproxy-data:/data
      - ./config:/config
    ports:
      - "8080:8080"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    restart: unless-stopped

  myapp:
    image: nginx:alpine
    labels:
      tsdproxy.enable: "true"
      tsdproxy.name: "myapp"

volumes:
  tsdproxy-data:

Step 2: Start it up

docker compose up -d

TSDProxy creates a default config at /config/tsdproxy.yaml on first run. Open the dashboard at http://localhost:8080, click the proxy card, and authenticate with Tailscale.

Your container is now available at https://myapp.<tailnet-name>.ts.net with automatic HTTPS.

For automated (headless) setup, configure an AuthKey or OAuth before adding services.

Key Features

FeatureDescription
Zero sidecarsNo Tailscale container needed per service. One proxy handles everything.
Label-based configAdd tsdproxy.enable=true to any container. Done.
Automatic HTTPSTailscale provisions Let's Encrypt certs for every machine.
Multi-port supportExpose multiple ports per container with granular protocol control.
TCP & UDP proxyingProxy TCP (SSH, databases) and UDP traffic alongside HTTP/HTTPS services.
Port rangesDefine ranges of ports in a single label — e.g. 2222-2230/tcp.
Funnel supportExpose services to the public internet with tailscale_funnel option.
Health monitoringAutomatic backend health probes with recovery and target re-resolution.
Webhook notificationsPush proxy events to ntfy, Discord, Slack, Gotify, or generic webhooks.
REST APIProgrammatic control over proxies — pause, resume, and manage via API.
Role-based accessAdmin and viewer roles with optional admin allowlist.
Dynamic lifecycleContainers start and stop. Tailscale machines appear and disappear.
Live config reloadChange settings without restarting TSDProxy.
DashboardReal-time web UI with SSE streaming, access logs, and status timeline.
List providerExpose non-Docker services via a simple YAML file.

How It Works

graph LR
    A[Docker Containers] -->|tsdproxy.enable label| B[TSDProxy]
    B -->|creates tsnet.Server| C[Tailscale Network]
    C -->|automatic HTTPS| D[Secure URLs]
    D -->|reverse proxy| A

Under the hood:

  1. Container Scanning - TSDProxy watches your Docker daemon for containers tagged with tsdproxy.enable=true.
  2. Machine Creation - When a tagged container appears, TSDProxy spins up a Tailscale machine via tsnet.
  3. Hostname Assignment - The machine gets a hostname from the tsdproxy.name label or the container name.
  4. Port Mapping - TSDProxy maps the container's internal port to the Tailscale machine.
  5. Traffic Routing - Incoming requests to https://myapp.<tailnet>.ts.net are reverse-proxied to the container.
  6. Dynamic Cleanup - When a container stops, its Tailscale machine and routes are removed automatically.

Port Configuration

Expose multiple ports with per-port protocol and options:

labels:
  tsdproxy.enable: "true"
  tsdproxy.name: "myservice"

  # HTTPS on 443 -> container port 80
  tsdproxy.port.1: "443/https:80/http"

  # HTTP on 80 -> container port 8080
  tsdproxy.port.2: "80/http:8080/http"

  # HTTP redirect to HTTPS
  tsdproxy.port.3: "81/http->https://myservice.tailnet.ts.net"

  # TCP proxy for SSH
  tsdproxy.port.4: "22/tcp:22/tcp"

  # UDP proxy (e.g. game server, VoIP)
  tsdproxy.port.5: "5060/udp:5060/udp"

  # Port range (TCP ports 2222 through 2230)
  tsdproxy.port.6: "2222-2230/tcp:2222-2230/tcp"

Docker Images

TagDescription
almeidapaulopt/tsdproxy:2Latest v2 release
almeidapaulopt/tsdproxy:latestLatest stable release
almeidapaulopt/tsdproxy:devLatest development build
almeidapaulopt/tsdproxy:vx.x.xSpecific version

Documentation

Full setup guides, configuration reference, and advanced usage:

almeidapaulopt.github.io/tsdproxy

Key docs: Getting Started | Docker Labels | Port Configuration | List Provider | TCP Proxy | Funnel | REST API | Health Checks | Webhooks | Admin Allowlist | Upgrading from v1

Contributing

Bug reports, feature requests, documentation improvements, and pull requests are all welcome. See CONTRIBUTING.md for guidelines.

If you'd rather support the project financially, sponsorships help keep development going.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Star History Chart

Similar Projects

Discover other similar projects and AI models.

RepositoryGo
moby/moby

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

72.3k
Dec 3, 2026
RepositoryGo
gogs/gogs

The painless way to host your own Git service

48.0k
Nov 26, 2026
RepositoryGo
aquasecurity/trivy

Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more

39.9k
Dec 1, 2026
RepositoryGo
docker/compose

Define and run multi-container applications with Docker

39.2k
Dec 3, 2026
RepositoryGo
dokku/dokku

A docker-powered PaaS that helps you build and manage the lifecycle of applications

32.2k
Nov 30, 2026
RepositoryGo
abiosoft/colima

Container runtimes on macOS (and Linux) with minimal setup

31.9k
Oct 13, 2026
RepositoryGo
kubernetes/kubernetes

Production-Grade Container Scheduling and Management

129.2k
Dec 2, 2026
RepositoryTypeScript
usememos/memos

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

64.8k
Dec 1, 2026
RepositoryGo
fatedier/frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.

110.9k
Nov 10, 2026