Help with multiple certificate resolvers

Good Evening Everyone,

I've been using Traefik for about a year now using the Letsencrypt ACME http certificate resolver for a domain I have through my business Internet. I recently bought another domain but through Cloudflare this time. I have setup the DNS A, and CNAME's to point back to my IP address. Traefik is working great proxying the connections but the site is using the default Traefik cert. So in my Traefik.yml config I have the certificateResolvers I have the following entries:

certificatesResolvers:
  http:
    acme:
      email: don@laelapssecurity.net
      storage: acme.json
      httpChallenge:
        entryPoint: http
  cloudflare:
    acme:
      email: donald.s.mccoy@gmail.com
      storage: acme.json
      dnsChallenge:
        provider: cloudflare
        resolvers:
          - "1.1.1.1:53"

I would like to use both the http for one domain and the cloudflare entry for a second domain. I'm unable to find any resources on how to setup a deployment with multiple certificate resolvers. It seems like all the tutorials using Cloudflare all just use Cloudflare. I'm running Traefik in a docker but I'm not sending any arguments through the command entry in the docker-compose.yml. Any assistance would be greatly appreciated. If I need to redo my docker-compose file I'm open to that.

I am sorry for creating this notification to you but I'm having the same issue.
I also use a Docker deployment with a yaml File for configuration parameters.

Hopefully someone can help...

Using multiple certificate resolvers works with traefik.
You need a seperate storage file for each resolver, e.g. acmehttp.json and acmecloudflare.json

Choosing which resolver depends on the configuration provider you use. With the docker provider, you could choose the resolver with the
- "traefik.http.routers.routername.tls.certresolver=resolvername"

Regards,
Wolfgang

1 Like