Fix: Traefik v2 to v3 Migration — Labels and Config Changes
Traefik v3 routes stop working silently after upgrading. The core label syntax is unchanged, but Docker provider network handling, some middleware options, and v1-style labels all need updating.
V1 Labels That No Longer Work
These Traefik v1 labels were deprecated in v2 but silently ignored. In v3 they do nothing — and Traefik gives no warning:
Remove these from your compose files: traefik.frontend.rule, traefik.backend, traefik.port, traefik.frontend.entryPoints
traefik.enable=true traefik.http.routers.myapp.rule=Host(`app.example.com`) traefik.http.routers.myapp.entrypoints=websecure traefik.http.routers.myapp.tls.certresolver=letsencrypt traefik.http.services.myapp.loadbalancer.server.port=3000 traefik.docker.network=traefik-public
Docker Network Fix
Traefik v3's Docker provider requires explicit network attachment. Create a shared external network and attach both Traefik and your services to it:
services:
traefik:
image: traefik:v3
networks:
- traefik-public
networks:
traefik-public:
external: true
services:
myapp:
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.routers.myapp.rule=Host(`app.example.com`)"
networks:
traefik-public:
external: true
# Create the network once: docker network create traefik-public
Static Config Changes
If you use traefik.yml, remove swarmMode: false from the Docker provider — it moved to a separate Swarm provider and causes a startup error in v3 if left in the Docker block.
Paste your docker-compose.yml to detect Traefik v1 label patterns and get exact v3 replacements.
Open Reverse Proxy Mapper →