A Docker-based Tailscale DERP server with automatic SSL certificate management via Let's Encrypt and Cloudflare DNS. Supports both IPv4 and IPv6.
- Docker and Docker Compose
- A domain name with Cloudflare DNS
- Cloudflare API token with DNS edit permissions
- Tailscale auth key
- Clone this repository
- Configure your environment variables in .env:
DOMAIN=<Your Domain Name> CLOUDFLARE_API_TOKEN=<Your Cloudflare API Token> TS_AUTHKEY=<Your Tailscale Auth Key>
Start the services:
docker compose up -dThis will start:
- tailscaled: Tailscale daemon
- certbot: Automatic SSL certificate issuance and renewal via Let's Encrypt (Cloudflare DNS challenge)
- derper: Tailscale DERP relay server
443/tcp: HTTPS DERP server9443/tcp: Alternative HTTPS port3478/udp: STUN server
docker compose down