How to renew letsencrypt ssl certificate in cent os aws ec2 ?
Please go to the folder where you already installed letsencrypt (first time),
path may be,
/etc/letsencrypt in my case.
Inside that You can find a file called letsencrypt-auto.
Run the below command inside letsencrypt-auto folder:
Could not find letsencrypt-auto folder ?
In my case it is found in /letsencrypt/letsencrypt path
You can also use this below find command to search letsencrypt folder:
find / -name “letsencrypt”
here / tells to search from the main directory with the name “letsencrypt”, you will get the search results something like this if it is found in your system,
Make sure to stop your nginx/apache servers, if you are running any background processes like pm2/forever, then please stop those things as well to renew the ssl letsencrypt certificates without any issue.
If you using nginx and node files (say angular applications) then run the below command with the correct path for proper ssl renewal:
./letsencrypt-auto certonly –webroot -w /usr/share/nginx/html -d saveji.com -d www.saveji.com
Then start nginx/apache/pm2/forever whichever you stopped then check the date of the certificate.
You will get the success message similar to this:
Congratulations! Your certificate and chain have been saved at:
Your key file has been saved at:
Your cert will expire on 2019-02-11. To obtain a new or tweaked
version of this certificate in the future, simply run
letsencrypt-auto again. To non-interactively renew *all* of your
certificates, run “letsencrypt-auto renew”
– If you like Certbot, please consider supporting our work by:
Note: I tried around 15 days before it expires, in that case it did not renew my existing certificate, it just created the new certificate starting from today to 90 days. Please give the correct folder name in nginx ssl configurations, if similar case happened to you guys as well.
584 total views, 6 views today