Renewing Existing certificate at different path with different certificate name

Please fill out the fields below so we can help you better.

My domain is: learn.bloombench.com

I ran this command:

./certbot-auto certonly --domain learn.bloombench.com. --email myEmail@myDomain.com --server https://acme-v01.api.letsencrypt.org/directory --renew-by-default --agree-tos --debug

It produced this output:

The above command always creates a certificate in below folder
/etc/letsencrypt/live/learn.bloombench.com/

My operating system is (include version): Ubuntu 14.04

My web server is (include version): Node

My hosting provider, if applicable, is: GoDaddy

I can login to a root shell on my machine (yes or no, or I don’t know): Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): No

We executed Following command to create a new certificate:

./certbot-auto certonly --domain learn.bloombench.com. --email myEmail@myDomain.com --server https://acme-v01.api.letsencrypt.org/directory --renew-by-default --agree-tos --debug

The above command always creates a certificate in below folder
/etc/letsencrypt/live/learn.bloombench.com/

Now I copy and rename the newly generated certificate (pem files) to my server path : /home/ubuntu/node/key/

Now for renewing I run the following command : ./letsencrypt-auto renew --debug
It renews the certificate at path : /etc/letsencrypt/live/learn.bloombench.com/

Is there a way to directly renew existing (renamed) certificate at my server path : /home/ubuntu/node/key/ ?

Personally I just change the server config to point to /etc/letsencrypt/live/learn.bloombench.comprivkey.pem then I don't need to do anything else.

You could just set up a symlink

ln -s /etc/letsencrypt/live/learn.bloombench.com/privkey.pem /home/ubuntu/node/key/keyname.ext

where keyname.ext is whatever you want to call it ....

Does that provide a solution for you ?

1 Like

@Hemanshu1belani, I would recommend following @serverco’s suggestion when using Certbot because we don’t really expect Certbot files to be moved outside of its database in /etc/letsencrypt. While there should be ways to do so, they are a bit tricky and not well-documented yet. With @serverco’s technique, your links will automatically still point at the most current version of the certificate under /etc/letsencrypt after renewing.

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