How to make reachable for docker traefik?

Hi all

I am running Traefik inside a docker container, the image is from
Now, I have a running container:

nginx:mainline-alpine "/bin/sh -c 'envsubs…" 3 hours ago Up 3 hours>9080/tcp, 80/tcp,>9443/tcp mailcow_nginx-mailcow_1

that I would to include into Traefik. The Configuration of the mailcow_nginx-mailcow_1 service is:

  # Add the router
      service = "service-mailcow"
      rule = "Host(``)"

      certResolver = "sslresolver"

    # Add the service
            url = ""

when calling in the browser, the service is not reachable. I think the problem is, that Traefik has not access to

The Traefik container has been started as follows:

version: "3.7"

# Network                                                        #
    external: true

# Router                                                         #
    image: "traefik:v2.2"
    container_name: "traefik"
    restart: always
      - edge-router
      - "80:80"
      - "443:443"
      # The Web UI (enabled by --api.insecure=true)
      - "8080:8080"
      - ./traefik.toml:/etc/traefik/traefik.toml
      - ./letsencrypt:/letsencrypt
      - ./routing:/etc/routing/
      - /var/run/docker.sock:/var/run/docker.sock:ro

My question is, how to make reachable for Traefik?


The best advise is, don't do that. Use the docker provider and let docker and traefik handle it.
Your configuration would be a set of labels on your container.

If you really must(cannot stop this container for $REASON) then you need to use either the local hosts IP (not localhost) or the docker router ip(this is the default route when you run a container, ip route list match

1 Like

Thanks so much for your advice.