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

CORRECT v3 Labels
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:

docker-compose.yml — Traefik service
services:
  traefik:
    image: traefik:v3
    networks:
      - traefik-public
networks:
  traefik-public:
    external: true
docker-compose.yml — Application service
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 →

Frequently Asked Questions

Why do my Traefik routes stop working after upgrading to v3?
The most common causes are: (1) using old v1-style labels like traefik.frontend.rule that v3 silently ignores, (2) missing Docker network configuration — v3 requires explicit network attachment, (3) swarmMode: false left in the Docker provider static config. Use ConfigClarity's Reverse Proxy Mapper to detect v1 labels automatically.
Do I need to recreate my Docker network when upgrading to Traefik v3?
No — if you already have an external Docker network for Traefik, keep it. Just ensure all services that need proxying are attached to it and have the traefik.docker.network label set explicitly.
What happened to allowEmptyServices in Traefik v3?
allowEmptyServices was removed in v3. Traefik v3 handles empty services differently — it no longer requires this option to start when backends are unavailable. Simply remove it from your static config.

Related Glossary Terms