How do I configure Traefik to use ACME for certificate signing? #561
-
Im trying to setup the acme configuration to auto-sign with let's encrypt. After editing my docker-compose.yml (#531) and starting the environment, traefik logs shows an error:
I follow all the steps on traefik documentation and still getting this error.
[...]
container_name: traefik
image: traefik:${TRAEFIK_VERSION:-2.2}
command:
- "--log.level=info"
- "--api.insecure=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.caserver=https://acme-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email=....."
- "--certificatesresolvers.myresolver.acme.storage=acme.json"
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
[...]
Has anyone been able to resolve this issue? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Can you show your homeassistant@docker config? |
Beta Was this translation helpful? Give feedback.
-
Yes, of course:
Edit: Remove uncommented " - traefik.http.services.${WARDEN_ENV_NAME}.loadbalancer.server.port=8080" |
Beta Was this translation helpful? Give feedback.
-
Well, finally i make it works. Instead of editing the certificatesResolvers:
letsencrypt:
acme:
email: xxxxx@gmail.com
storage: /etc/traefik/letsencrypt-acme.json
caServer: https://acme-v02.api.letsencrypt.org/directory
dnsChallenge:
provider: duckdns
resolvers:
- "1.1.1.1:53"
- "8.8.8.8:53" And adding this labels to the - traefik.http.routers.${WARDEN_ENV_NAME}.tls=true
- traefik.http.routers.${WARDEN_ENV_NAME}.tls.certresolver=letsencrypt
- traefik.http.routers.${WARDEN_ENV_NAME}.priority=4
- traefik.http.routers.${WARDEN_ENV_NAME}.rule=Host(`example.duckdns.org`) |
Beta Was this translation helpful? Give feedback.
Well, finally i make it works. Instead of editing the
docker-compose.yml
file, i makes some changes on/opt/warden/config/traefik/traefik.yml
Adding the next lines on bottom:
And adding this labels to the
warden-env.yml
of the project file: