Traefik + Docker + Let's Encrypt

Hi! I want to run Traefik, so that I only have to give a Docker container a name and it gets exposed to No docker-compose, no labels, no config files.
It already works great with HTTP, but HTTPS is not working and I struggle to find out why. The dashboard displays my cert resolver and shows that TLS is enabled. There are no errors in the log nor the dashboard.

docker run \
  --restart="always" \
  --name="proxy" \
  -p 80:80 -p 443:433 -p 8080:8080 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  traefik \
  --api.insecure=true \
  --providers.docker \
  --providers.docker.exposedByDefault=true \
  --providers.docker.useBindPortIP=true \
  --providers.docker.defaultRule="Host(\`{{ .Name }}\`)" \
  --entrypoints.web.address=:80 \
  --entrypoints.websecure.address=:443 \
  --entrypoints.websecure.http.tls.certResolver=leresolver \ \ \
  --certificatesresolvers.leresolver.acme.httpchallenge.entrypoint=web \

Hi @baum your published port does not match the traefik port. You want -p 443:443

1 Like

Well.... That hurt. Thanks!

1 Like

Did it myself just the other day testing something.

1 Like

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