Howto change live directory with certbot?

9.6k views Asked by At

I using CentOS7 and certbot for make ssl certificate, but the default directory of certificates is "/etc/letsencript/live/first-host" , how to change the forst-host directory with "/etc/letsencript/default" by example?

I using the certbot:

certbot certonly --standalone -d host1 -d host2 --debug

And the directory:

/etc/letsencript/live/host1/
2

There are 2 answers

2
Stephan Richter On

the elments in the /etc/letsencrypt/live directory are just symlinks to /etc/letsencrypt/archive/....

You can just add another symlink:

sudo ln -s /etc/letsencrypt/live/host1/ /etc/letsencrypt/default
0
gggeek On

According to https://eff-certbot.readthedocs.io/en/stable/using.html#where-are-my-certificates, you should be able to use the cli option --cert-name host1 if you want the generated certificates to be saved in directory /etc/letsencript/live/host1/.

Note that this will also have an impact on all certbot commands which deal with certificate management and renewal.