Traefik does not recognize any of my routes nor services

I have the following Traefik setup:

  • Docker network with multiple services. Right now I just wish traefik to forward/proxy all traefik/syncly request to the service fastapi.

Here's my docker-compose.yml for Traefik:


  traefik:
    image: traefik:v3.3
    container_name: syncly_traefik
    ports:
        - "80:80"
        - "443:443"
        - "8080:8080"
    networks:
      - syncly_network
    volumes:
      - ./traefik/traefik.toml:/etc/traefik/traefik.toml
      - ./.logs:/var/log/traefik.log
      - ./traefik/certs:/certs

And my traefik.toml:

# traefik.toml

[api]
  dashboard = true
  insecure = true

[entryPoints]
  [entryPoints.http]
    address = ":80"

[log]
level = "DEBUG"

[accessLog]
  addInternals = true

[http.routers]
  [http.routers.fastapi]
    service = "fastapi"
    rule = "PathPrefix(`/syncly`)"
    entryPoints = ["http"]

  [http.routers.traefik]
    rule = "PathPrefix(`/traefik`)"
    service = "api@internal"
    entryPoints = ["http"]

[http.services]
  [http.services.fastapi.loadBalancer]
    [[http.services.fastapi.loadBalancer.servers]]
      url = "http://syncly_web:8000"

I can without problems reach syncly_web from the traefik container:

However, entering localhost/syncly leads me to nowhere.
In addition, the service is not availalbe in the dashboard:

It doesn't appear at Errors tab either. The route also doesnt appear at HTTP Routers, nor does the oen with PathPrefix('/traefik')

http is Traefik dynamic config. Place it in a separate config file and load it in static config via providers.file (configuration doc). Compare to simple Traefik external example.

Best practice is to run all target services in Docker containers and use Traefik configuration discovery via labels. See simple Traefik example.

Traefik dashboard is reachable at /dashboard/ and requires /api (doc), it will not respond to /traefik, unless explicitly configured so (doc):

api:
  # Customizes the base path:
  # - Serving API under `/traefik/api`
  # - Serving Dashboard under `/traefik/dashboard`
  basePath: /traefik

Note that api.insecure=true creates an additional entrypoint on port 8080 without any auth.