• Home
  • Ubuntu 20.04
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 20.04
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Auto Renew Let’s Encrypt Certificates

Written by Rahul, Updated on March 9, 2020

This tutorial will help you to renew Let’s Encrypt certificates automatically. You don’t need to renew SSL certificates manually each time. The certbot script will take care of this and renew certificates before expiration.

Auto Renew Let’s Encrypt SSL

Certbot comes with a script to renew existing certificates. You can test the renewal script with a single dry run like below.

sudo /usr/sbin/certbot-auto renew --dry-run

If the above test succeeded, then create a cron job that will run the SSL renewal program for configured intervals. Configuring this script once a day is good enough.

Make sure the certbot binary script location as per below command. Let’s edit crontab with the following command.

crontab -e

Add the below command at end of fine and save it.

0 * * * * /usr/sbin/certbot-auto renew

Some of the sysadmin’s keep script name certbot, So change the script name as per your setup.

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

1 Comment

  1. Avatar J.B. Reply
    December 11, 2020 at 10:07 am

    Hi Rahul, can this also be used in a kubernetes environment? If yes, where should this cronjob be running? Regards, J

Leave a Reply Cancel reply

Popular Posts

  • How To Install Python 3.9 on Debian 10
  • Download Ubuntu 20.04 LTS – DVD ISO Images
  • Linux Run Commands As Another User
  • How to Check PHP Version (Apache/Nginx/CLI)
  • How To Install and Configure GitLab on Ubuntu 20.04
  • How to Install PyCharm on Ubuntu 20.04
  • How to Check Ubuntu Version with Command or Script
  • How to Set all directories to 755 And all files to 644
© 2013-2021 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy