Multi-webroot and multi-domain certificate locations on disk


I want to use the same certificate across a number of sub-domains. I am using webroot authentication and specifying webroot-domain pairs in the command:

letsencrypt-auto certonly -c /etc/letsencrypt/webroot.ini \
    -w /var/www/ -d \
    -w /var/www/ -d \
    -w /var/www/ -d

The content of my .ini is:

agree-tos = True
renew-by-default = True
authenticator = webroot

This command creates a single certificate and I can configure the webserver for each domain to use that cert via the symlink in live. This is all good stuff.

However, when I added another subdomain to this command the resulting certificate was generated in a different directory: live/, rather than in the previously used directory: live/

Is there anyway to guarantee where the certificate will be generated?

I read that the first domain in the command is what determines the location but I don’t believe this is the case given my observations. If I’ve made a mistake here please let me know.

I originally generated certificates for each sub-domain, so there were entries in my /etc/letsencrypt directory for those sub-domains already. Is there a command to remove the old entries, or is it just a case of manually:

sudo rm live/
sudo rm archive/
sudo rm renewal/

So the question remains, can I guarantee where the certificate will be located in /etc/letsencrypt/?


You can try my client: [updated]Simplest pure bash letsencrypt client, support standalone server now

You can specify the cert path or cert key path like:

CERT_PATH=/path/to/domain.cer  CERT_KEY_PATH=/path/to/domain.key   le   issue    /path/to/webroot/


I have multiple webroots so I don’t understand how I can use your client as it requires: “You must point and bind all the domains to the same webfoot dir”.


After further examination of the source I found these command line arguments:


I’ve tested with another domain and it did exactly what I needed.


I have the same problem, but the suggested solution does not work for me. Here it is the command I run:

letsencrypt certonly --text --test-cert --webroot \ --cert-path=/etc/letsencrypt/ \ --chain-path=/etc/letsencrypt/ \ --fullchain-path=/etc/letsencrypt/ \ --key-path=/etc/letsencrypt/ \ -w /var/www/ -d \ -w /var/www/ -d

I expect that all the files will be placed into /etc/letsencrypt/, but everything is placed into /etc/letsencrypt/live/

Can someone please give the full command line?


So I have about 60-80 domains (three large projects/products with their dommains and subdomains for different services) in different directories (obviously) and I just keep on going “WTF” and also “Are you fucking kidding me?!” while trying to figure out how to renew a certificate. Behind Cloudflare (obviously, everyone uses something, only idiot would expose their servers directly.)

So my question towards the creators of letsencrypt would be… Did you guys try to think about actual production usage?