Force certbot-auto to generate certificate at a custom path instead of /etc/letsencrypt/live

Hi Team,

Can I force certbot-auto to generate certificate at a custom path instead of /etc/letsencrypt/live

For eg: I want letsencrypt to generate certificate in /home/zahid/letsencrypt/live instead of /etc/letsencrypt/live

Please help!!

Best Regards,
Zahid

Hi @zahid.k11,

You should be able to change this directory with the --config-dir option to certbot-auto.

You can also make this the default by setting config_dir (note the _ rather than - character) in /etc/letsencrypt/cli.ini.

Hi Schoen,

Thanks for your help!!
For Temporary:
So for temporary path change we can use the following. Please confirm:
./certbot-auto certonly --config-dir /home/zahid/letsencrypt/live --webroot -w /var/www/test/ -d zahid.com -d www.zahid.com

For permanent:
Unfortunately, I do not see “cli.ini” under “/etc/letsencrypt/”. Do I need to manually create “cli.ini” and then add the following line to it to change default certificate generation path to " /home/zahid/letsencrypt/live":

config_dir = /home/zahid/letsencrypt/live

Please suggest.

Best Regards,
Zahid

I think both of those will work the way you want. Please let me know if you have trouble!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.