Traefik picking up containers outside its scope

I've been trying to get this working for a day now, I'm trying to create a docker container running traefik, and have it detect other containers in the same network, for this, I created an external network on docker, and added traefik to it and one other test containers. The result was that It attempts to access containers it shouldn't, and complains about there configuration. And yes, I'm sure the docker network exists, since it doesn't send an error and i got the conformation when i ran the command in my CLI

2025-03-27T18:22:04.555029493Z 2025-03-27T18:22:04Z ERR EntryPoint doesn't exist entryPointName=https routerName=https-0-sggwoskcgo08ccksg4cs8g0c-XXX@docker
2025-03-27T18:22:04.555043720Z 2025-03-27T18:22:04Z ERR No valid entryPoint for this router routerName=https-0-sggwoskcgo08ccksg4cs8g0c-XXX@docker
2025-03-27T18:22:04.555083408Z 2025-03-27T18:22:04Z ERR EntryPoint doesn't exist entryPointName=https routerName=https-0-yooooswsw0wg0g0wkkgoo4gs@docker

Compose of the Traefik Container below

services:
  load-balancer:
    image: 'traefik:v3.3'
    restart: unless-stopped
    command:
      - '--providers.docker=true'
      - '--providers.docker.exposedByDefault=false'
      - '--entrypoints.web.address=:80'
      - '--api.dashboard=true'
    ports:
      - "81:80"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - load-balanced-b01
    labels:
      - traefik.enable=true
      - traefik.http.routers.load-balancer-b01.rule=Host(`XXX.XXX.XXX`)
      - traefik.http.routers.load-balancer-b01.entrypoints=web
      - traefik.http.routers.load-balancer-b01.service=api@internal
      - traefik.http.routers.load-balancer-b01.middlewares=auth
      - traefik.http.middlewares.auth.basicauth.users=XXX:XXX
      - traefik.docker.network=load-balanced-b01

networks:
  load-balanced-b01:
    external: true

Am i blatantly missing something?

providers.docker.exposedByDefault=false should be the right setting to only pick up containers with label traefik.enable=true.

Do you by chance have a traefik.yml file that overwrites the command: static config (doc)?

I don't have a traefik.yml, and since I have other containers that use traefik for routing as well, that should be separate from this one they also contain traefik.enable=true, since this is on a larger node that hosts more than just my containers

One more thing to note is, that I'm using coolify. I think it uses traefik for routing aswell, might this be causing an issue?

Of course it could be an issue when running 3 Traefik instances in parallel.

Traefik Docker has the concept of constraints (doc), so you might set a constraint on your providers.docker and also add a matching label for the containers you want to be discovered, besides traefik.enable=true.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.