SSL certificate not working for a service using Traefik in Docker Swarm

Hello,
I'm experiencing an issue where my Traefik setup is not generating a Let's Encrypt SSL certificate for one of my services. Instead, it uses the default "Traefik Default Cert". My setup includes:

VPS: Hetzner
Service Management: Portainer
Proxy: Traefik v2.11 in Docker Swarm mode
DNS Management: Cloudflare (proxy disabled for the domain)

Here are the key points:

  1. The service is accessible through the domain, but only with the "Traefik Default Cert".
  2. I verified the labels for the service:
- traefik.enable=true
- traefik.http.routers.service.rule=Host(`example.com`)
- traefik.http.routers.service.entrypoints=websecure
- traefik.http.routers.service.tls.certresolver=le
- traefik.http.services.service.loadbalancer.server.port=80
  1. The file acme.json is present and has 600 permissions.
  2. DNS is correctly configured, pointing to the VPS IP. Ports 80 and 443 are open.
  3. Other services on the same setup successfully use Let's Encrypt certificates.

Logs from Traefik do not show clear errors, and I'm unsure what is blocking the certificate issuance.

What could I be missing or misconfiguring? Any suggestions would be highly appreciated.

You mentioned Docker Swarm. Traefik Community Edition is not LetsEncrypt cluster-enabled. If you have multiple Traefik instances, you need to use dnsChallenge and will get individual TLS certs for each server.

Enable and check Traefik debug log (doc) and Traefik access log in JSON format (doc). For TLS issues, search for error and/or acme.

Share your full Traefik static and dynamic config, and docker-compose.yml if used.

Maybe check simple Traefik Swarm example.

Hello, I just solved the problem with another solution, thank you very much for your response.