Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renew manually Let's Encrypt SSL certificate

My Let's Encrypt SSL certificate will expire in 0 day (not yet)...

I use it for a website in nginx & a ubuntu 14.04 server in DigitalOcean.

I have found a folder /etc/letsencrypt/, and in the server block:

ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem;

However, I cannot find for example letsencrypt-auto

Does anyone know how to manually renew it?

like image 319
SoftTimur Avatar asked Apr 07 '26 22:04

SoftTimur


2 Answers

Actually, I don't remember how I generated the SSL certificate for the first time. To renew it, by following this thread, I first installed cerbot:

sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot

Then, I need to make sure the path and setting are correct as described in the thread. Then I did

sudo certbot renew

That's it.

like image 166
SoftTimur Avatar answered Apr 10 '26 14:04

SoftTimur


This is one command that worked for me.

certbot certonly --force-renew -d

or for apache

sudo certbot renew --cert-name domain.name.here --pre-hook "service apache2 stop" --post-hook "service apache2 start"
like image 34
SuperNova Avatar answered Apr 10 '26 12:04

SuperNova