Cannot get v2 working as reverse proxy with docker & LE "no args for matcher Host"

I am trying to migrate from v1.7 to v2.4 using docker containers and Lets Encrypt certs.

Here are my config files:

    address = ":80"
      to = "websecure"
      scheme = "https"

    address = ":443"

  dashboard = true

  email = ""
  storage = "acme.json"

  watch = true
  network = "web"

  filename = "traefik_dynamic.toml"


  users = [

  rule = "Host(``)"
  entrypoints = ["websecure"]
  middlewares = ["simpleAuth"]
  service = "api@internal"
    certResolver = "lets-encrypt"

Docker run:

docker run -d \
        --name test \
        --restart unless-stopped \
        --network traefik_entrypoint \
        -l traefik.http.routers.internal.rule=Host\(``\) \
        -l traefik.http.routers.internal.tls=true \
        -l traefik.http.routers.internal.tls.certresolver=lets-encrypt \
        -l traefik.port=80 \

I get this error in the docker logs and on the dashboard:

level=error msg="no args for matcher Host" entryPointName=websecure routerName=internal@docker

What am I doing wrong?

Your backticks are not escaped with your docker run ... command so command substitution is occurring and resulting in an empty string.

Inspect your container and you will see:

            "Labels": {
                "traefik.http.routers.internal.rule": "Host()"
1 Like

Thank you!!!
Silly mistake, I assumed it was an issue with how I was setting up Traefik, not a bash issue facepalm

1 Like