Lurker News

Comments (240) 58 threads

Show all comments

Showing thread 45 of 58

Tomte1 reply#
Does Caddy request separate certificates for domains served through it, or is it handled using SANs?
mholt1 reply#
Both, technically.

CommonName has been deprecated for years, so all of Caddy's certificates (and all of Let's Encrypt's) are SAN certificates. Caddy manages single-SAN certs, in accordance with recommended best practices: https://docs.https.dev/acme-ops#use-one-name-per-certificate
(We learned from experience that single SAN scales better and is less prone to troubles. For example, Caddy sites were not affected by the recent Let's Encrypt revocation incident because it manages only single-SAN certificates. And frankly, that shouldn't matter since you don't have to manage them.)

Tomte2 replies#
Ah, TIL.

I was asking because right now my nginx/certbot setup requests a single certificate for all my domains, and I would like to have them separate.
(I'm sure you can do that with certbot, I just haven't tweaked my setup, yet)

mholt#
I see. Yeah, I think CertBot does that because of limitations in Apache (and possibly nginx as well) with "virtual hosting".

So yeah, Caddy uses one name per certificate by default, and there's no way to change that.

purerandomness1 reply#
A certificate can be issued for as many, or as few domains as you'd like.

Look at certbot's -d parameter, this does not have anything to do with nginx, apache, caddy or any other web server.

Tomte1 reply#
Is that also possible when using --nginx? Or only in "vanilla" mode?
purerandomness4 replies#
The nginx autoconfiguration plugin has no influence on how many domains the certificate you're requesting will be valid for.

Example: We run a SaaS on our client's domains, so for every client, we have to run `certbot -d subdomain.client1.com,client1.ourdomain.com,staging.client1.ourdomain.com,...`
That means we run certbot with ~4 domains (we include staging and other subdomains) for each client we have. This is highly automatable.
Whether you use nginx autoconfiguration or not is up to you.

Continue this thread — 4 replies