Self-host Traefik
v3.7.19Cloud-native reverse proxy with automatic service discovery
- Stars
- 65 556
- Ports
- 80 (HTTP entrypoint (web)), 8080 (Dashboard/API (insecure mode)), 443 (HTTPS entrypoint (websecure))
traefikWhat is Traefik?
Traefik is a reverse proxy and load balancer designed for microservice deployments. It connects to orchestrators such as Docker and Kubernetes to automatically detect services and generate routing rules on the fly. Core capabilities include automatic HTTPS via Let's Encrypt with wildcard certificates, multiple load balancing strategies, circuit breakers, a web dashboard, WebSocket/HTTP/2/gRPC support, metrics export to Prometheus and other systems, structured access logs, and a REST API. It runs as a single Go binary or Docker image. Configuration uses static files or CLI flags plus dynamic provider data. The project is actively maintained with frequent releases following semantic versioning.
Traefik alternatives
traefik-crowdsec-bouncerSelf-hosted HTTP service that integrates CrowdSec decisions with Traefik v2 ForwardAuth middleware to block malicious IPs before they reach your services.Comparetraefik-crowdsec-bouncer with Traefik
tsbridgeA self-hosted reverse proxy using Tailscale's tsnet to expose many services on a Tailnet from one process, configured via TOML or Docker labels.Comparetsbridge with Traefik
netgoatNetGoat is an open-source, self-hosted Go reverse proxy and free Cloudflare alternative with domain routing, WAF rules, rate limiting, TLS/ACME and bot challenges.Comparenetgoat with Traefik
nginx-proxySelf-hosted Nginx reverse proxy for Docker: this open-source container writes vhost configs from running containers and reloads them, with HTTPS and load balancing.Comparenginx-proxy with Traefik
DockTailOpen-source, self-hosted Go agent that watches Docker labels and publishes containers as native Tailscale Services, with HTTPS, TCP, PROXY protocol and Funnel support.CompareDockTail with Traefik
nginx-loveSelf-hosted open-source platform for managing Nginx reverse proxies with ModSecurity WAF, Let's Encrypt SSL, load balancing, JA4 bot detection, and multi-user RBAC.Comparenginx-love with Traefik
docker-traefik-cloudflare-companionSelf-hosted Docker companion that automatically creates and updates Cloudflare CNAME records for containers managed by Traefik reverse proxy.Comparedocker-traefik-cloudflare-companion with Traefik
LoStackLoStack is a self-hosted Docker and Traefik proxy manager automating service routing, SSO via Authelia, with a 100+ package depot for one-click installs.CompareLoStack with Traefik
All self-hosted alternatives to Apigee → All self-hosted alternatives to Gravitee → All self-hosted alternatives to Kong →
Should you self-host Traefik?
Traefik scores 86/100 on selfhost.directory (how scoring works) and ranks #1 of 23 in Reverse Proxy. It has 65 556 GitHub stars, +389 in the last 30 days.
It shipped 40 stable releases in the past year. The latest, v3.7.19, came out on 12 November 2026.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Go.
Its closest alternative on selfhost.directory is Kong (81/100, 44 381 stars). Traefik scores higher overall. See Traefik vs Kong side by side.
Features
- Access logging
- Automatic HTTPS with Let's Encrypt
- Automatic service discovery
- Canary deployments
- Circuit breakers and retries
- Dynamic configuration reload
- GitOps-native declarative configuration
- Load Balancing
- Metrics export
- Middleware system
- Plugin Ecosystem
- REST API
- Single Binary Deployment
- Web Dashboard
- WebSocket, HTTP/2, gRPC support
Traefik README
Traefik (pronounced traffic) is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy. Traefik integrates with your existing infrastructure components (Docker, Swarm mode, Kubernetes, Consul, Etcd, Rancher v2, Amazon ECS, ...) and configures itself automatically and dynamically. Pointing Traefik at your orchestrator should be the only configuration step you need.
FAQ
How can I make Traefik return 503 instead of 404 for unmatched routes?
Create a catchall router with the lowest priority that routes to a service with no servers, which will return 503 for all unmatched requests.
Why does Let's Encrypt wildcard certificate renewal with DNS challenge fail?
This can be due to CNAME support issues. Try disabling CNAME support with the LEGO_DISABLE_CNAME_SUPPORT=true environment variable.
Why are some resources (routers, middlewares, services) not created or applied?
Check the logs for errors. If a resource is dropped after dynamic configuration evaluation, an error in the logs will indicate what went wrong.
What does the 'field not found' error mean?
This error occurs when an unknown property is encountered in the static or dynamic configuration. Validate your config with the JSON Schema for static or dynamic configuration.
Why is my TLS certificate not reloaded when its contents change?
With the file provider, configuration updates only trigger when watched files are modified. If certificate contents change without the config file changing, you must force a reload (e.g., using touch on the config file).
What are the default forwarded headers when proxying HTTP requests?
By default, Traefik adds X-Forwarded-For, X-Real-Ip, X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Proto, and X-Forwarded-Server headers.
Why does Traefik return 503 Service Unavailable?
Traefik returns 503 when a router matches but there are no healthy servers available to handle the request.
Why does Traefik return 502 Bad Gateway?
Traefik returns 502 when an error occurs while contacting the upstream service.
Why is Traefik answering 404 Not Found?
Traefik returns 404 when a request reaches an entrypoint with no matching routers, or when no HTTP/HTTPS router can match the request. This is because Traefik's routing is dynamic and it cannot assume a missing route is temporary.
More in Reverse Proxy
traefik-certs-dumperOpen-source CLI that extracts Traefik's ACME certificates into .crt/.key files from acme.json or Consul, etcd, Zookeeper and BoltDB, with watch mode and Docker images.
Traefik ManagerSelf-hosted web UI for managing Traefik reverse proxy — create routes, services, middlewares, certificates, and monitor logs and CrowdSec without editing YAML by hand.
tsdproxyTSDProxy is an open-source, self-hosted reverse proxy that automatically exposes Docker containers on Tailscale with zero sidecars and automatic HTTPS.
TykSelf-hosted open-source API and AI gateway proxying REST, GraphQL, gRPC, TCP and MCP traffic with auth, quotas, plugins and analytics.
Vinyl CacheVinyl Cache is a web application accelerator also known as a caching HTTP reverse proxy. It is designed to be installed in front of any server that speaks HTTP and configured to cache the contents, significantly speeding up delivery.
Vouch-ProxyOpen-source, self-hosted SSO proxy that fronts Nginx sites with OAuth/OIDC logins from Google, GitHub, Okta and any OpenID Connect IdP.
wiredoorOpen-source, self-hosted ingress exposing HTTP/TCP/UDP from private networks via WireGuard tunnels, with full control over endpoints and routing.
ZoraxyOpen-source reverse proxy manager for self-hosted services, with a web UI, ACME TLS, TCP/UDP forwarding, an uptime monitor and a built-in SSH terminal.
zrokOpen-source zero-trust tunneling tool for sharing web apps, TCP/UDP services and folders through firewalls; self-host your own instance or use zrok.io.
agentgatewayOpen-source, self-hosted HTTP and gRPC gateway routing LLM, MCP, A2A and service traffic in one binary, with auth, policy, guardrails, cost controls and observability.- Apache HTTP ServerApache HTTP Server (httpd) is a fast, reliable, and extensible open-source web server for modern operating systems, supporting virtual hosts, reverse proxy, load balancing, TLS/SSL, HTTP/2, and dynamic module loading.
apisixOpen-source, self-hosted API and AI gateway built on NGINX and etcd, with hot-loaded plugins, dynamic routing, load balancing and rate limiting.


0 comments