Nginx config files haunt my dreams. Every new service means editing configs, reloading Nginx, and hoping the regex in your location blocks is right.
Traefik changed everything. Add a Docker label, Traefik auto-discovers the service, provisions HTTPS, and starts routing. No config reload. No downtime. Zero manual intervention.
What You Get Free
Open-source (MIT license):
- Auto-discovery — detects Docker/K8s services automatically
- Let's Encrypt — automatic HTTPS certificates, zero config
- Load balancing — round-robin, weighted, sticky sessions
- Middleware — rate limiting, basic auth, headers, redirects, circuit breakers
- Health checks — remove unhealthy backends automatically
- Dashboard — real-time web UI showing all routes and services
- Metrics — Prometheus, DataDog, InfluxDB exporters
- TCP/UDP routing — not just HTTP
- Canary deployments — weighted traffic splitting
- File provider — also works without Docker, with plain config files
Quick Start with Docker
# docker-compose.yml
services:
traefik:
image: traefik:v3.2
command:
- "--api.dashboard=true"
- "--providers.docker=true"
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--certificatesResolvers.letsencrypt.acme.email=you@email.com"
- "--certificatesResolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
- "--certificatesResolvers.letsencrypt.acme.httpChallenge.entryPoint=web"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- letsencrypt:/letsencrypt
whoami:
image: traefik/whoami
labels:
- "traefik.http.routers.whoami.rule=Host(\`whoami.example.com\`)"
- "traefik.http.routers.whoami.tls.certresolver=letsencrypt"
volumes:
letsencrypt:
Add a new service? Just add Docker labels. Traefik picks it up in seconds.
What You Can Build
1. Multi-app VPS — run 10 apps on one server, each with its own domain and HTTPS.
2. Zero-downtime deploys — blue/green with weighted routing.
3. API gateway — rate limiting, auth, CORS for your microservices.
4. SSL termination — automatic HTTPS for everything behind Traefik.
5. Canary releases — send 5% of traffic to new version, increase gradually.
Traefik vs Nginx vs Caddy
Nginx: Most flexible, most config. Best for static sites and complex rules.
Caddy: Simplest config (Caddyfile). Best for quick HTTPS setup.
Traefik: Auto-discovery. Best for Docker/K8s environments with many services.
Need reverse proxy setup? Email spinov001@gmail.com
More free tiers: 59+ Free APIs Every Developer Should Bookmark
Top comments (0)