Introduction:

SSL certificates need to be renewed regularly to keep your website secure. Certbot, the tool from Let’s Encrypt, automates this process, ensuring your certificates are up to date. In this post, we’ll show you how to use Certbot to renew your SSL certificates, both automatically and manually.

Automatic Renewal:

Certbot automatically sets up renewal for SSL certificates, running a cron job that renews certificates 30 days before they expire.

Testing Automatic Renewal:

You can test the automatic renewal process with the following command:

sudo certbot renew --dry-run

This will simulate the renewal process to check for any potential issues.

Manual Renewal:

If automatic renewal fails or you prefer to do it manually, you can run:

sudo certbot renew

This command will renew any certificates that are close to expiring.

Viewing Installed Certificates:

To see which certificates are installed and their expiration dates, use:

sudo certbot certificates

Renewing a Specific Certificate:

To renew a single certificate for a specific domain:

sudo certbot renew --cert-name yourdomain.com

Conclusion:

Using Certbot to renew SSL certificates is a straightforward process, and it ensures your site remains secure. Whether you rely on automatic renewal or prefer manual control, Certbot makes managing SSL certificates simple.