How to Renew Let’s Encrypt#

Let’s Encrypt often provides free HTTPS certificates.
The validity of a Let’s Encrypt certificate is 90 days, and it can be extended by another 90 days if renewed before expiry.
The renewal of the certificate can be done an unlimited number of times.

How to renew with Certbot#

Certbot is a tool for managing Let’s Encrypt certificates.
Many people use Certbot to install, renew, and manage certificates.
You can renew them through the following process.

Step1. Stopping a Server Using HTTPS Certificates#

Here is an example of using httpd.
To stop httpd, execute the sudo service httpd stop command.

$ sudo service httpd stop

Redirecting to /bin/systemctl stop httpd.service

Step2-1. Certificate Renewal#

Run the command sudo certbot renew to renew the certificate.

$ sudo certbot renew

Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/xxx.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Renewing an existing certificate for xxx.com and www.xxx.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations, all renewals succeeded:
  /etc/letsencrypt/live/xxx.com/fullchain.pem (success)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Step2-2. Check updated expiration date#

Run the command sudo certbot certificates to check if the expiration has been renewed.

$ sudo certbot certificates

Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: xxx.com
    Serial Number: 
    Key Type: 
    Domains: 
    Expiry Date: 2024-12-02 12:38:55+00:00 (VALID: 89 days)
    Certificate Path: 
    Private Key Path: 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Step3. Restarting the server#

Restart the httpd service by executing the command sudo service httpd start.

$ sudo service httpd start

Redirecting to /bin/systemctl start httpd.service