My domain is: Loyaltykey.com and it's using Cloudflare DNS only.
My test domain (clubloyalty.dk) is hosted at a 3rd party and I've created 2 CNAME records. One for the ACME challenge and one for the homepage.
My ACME challenge CNAME record looks like this:
I ran this command:
certbot certonly --cert-name test.clubloyalty.dk --dns-cloudflare --dns-cloudflare-credentials /path/to/cloudflarecreds --server https://acme-v02.api.letsencrypt.org/directory -d "test.clubloyalty.dk" -d clubloyalty.dk
It produced this output: Unable to determine zone_id for clubloyalty.dk using zone names: [u'clubloyalty.dk', u'dk']. Please confirm that the domain name has been entered correctly and is already associated with the supplied Cloudflare account.
... So it looks like the ACME challenge passed, but I cant figure out why it wants to find clubloyalty.dk in Cloudflare. Is my setup even possible when using Cloudflare DNS? Wildcard certificates is not a must-have, but I want certificate renewals to be automatic.
says nothing that this plugin supports such a CNAME solution.
So if you want to create a certificate with clubloyalty.dk, that zone is checked to create _acme-challenge.clubloyalty.dk, not loyaltykey.com.
With such a situation, http validation is easy. There you can use the CNAME, so the ip of your other domain is used (I have the same situation with some customers and subdomain.customerdomain.com CNAME subdomain.server-daten.de - my service).
Hi @JuergenAuer ,
Are you able to elaborate on your setup and what steps you took specifically to make this work?
My LetsEncrypt is running on my NGINX server, which acts as a loadbalancer for multiple web nodes. This makes HTTP validation a little tricky, as my ACME client doesn't have direct access to the codebase.
Can you think of another way to make this work? I'm fairly new to letsencrypt although I've read a lot of documentation.
If you can modify the nginx configuration, and the customer points their domain at your nginx server, that's all you need to onboard your customer domains.
It could be as simple as this - no moving parts at all.
Yes, you can try do this by asking your customers to CNAME both example.com and _acme-challenge.example.com, and use DNS-01 issuance with a delegated zone. (Though that feature is not available in Certbot yet).
In my opinion this would be quite unnecessary and complex. Why ask customers to setup more CNAMEs than just the one?
Your situation is straightforward: A domain is pointed to your server (via CNAME), this means you can issue a certificate using HTTP.
Whether you do this using Certbot's--nginx or --webroot methods, the acme.sh equivalents, or the acme.sh stateless option is up to you. Any way you do it, you don't have to touch your codebase. It's a surface level change to the webserver configuration.
I have a lot of experience with this setup (OpenResty, but it's an extended Nginx)
You have two problems:
Getting the Certificates
Using the Certificates
In terms of getting the Certificates, I am a fan of the HTTP redirect method, but I've found it difficult to troubleshoot issues in the past. Personally, I think the simplest way to handle obtaining certs is...
Only one server runs Certbot, it's invoked with "standalone" mode, and on a higher port (e.g. --http-01-port=80801 )
The Load Balancer / Gateway uses a proxy-pass to send all traffic in /.well-known/acme-challenge to the node which runs Certbot
There are no redirects, just the proxy pass, so I find it much easier to deal with active troubleshooting or logs.
In terms of using the certificates... that's up to you. You could install them on the load balancer and terminate ssl there, or sync them around to nodes. I load them into OpenResty/Nginx dynamically (and open sourced our tool GitHub - aptise/peter_sslers: or how i stopped worrying and learned to love the ssl certificate) Another option is to use a server like caddy as your firewall, and have it automatically procure certificates as needed.
All that being said, I'd figure out exactly how you want to deploy the certificates internally and then work backwards from there. That is the hardest part of a multi-node setup.