UpdateCertificate Script - README


The UpdateCertificate script (Bash) can be used to renew a SSL certificate from Let's Encrypt all 2 months. Those certificates are only valid for 90 days and therefore a cronjob can be used to make an automatic renewal. After the renewal process, an email is sent to the administrator with the status of the operation.


  • Install the software packages sendemail, libnet-ssleay-perl and libio-socket-ssl-perl.
  • You can use the command: apt-get install sendemail libnet-ssleay-perl libio-socket-ssl-perl
  • Copy the update script to your computer.
  • Make the update script executable: chmod +x
  • Edit the configuration part of the script.
  • Start the update script from the command prompt: ./
  • Check if the certificate renewal works in the testmode (dry-run) and if you receive an email.
  • If everything works OK, remove the parameter '--dry-run' from the script.
  • Add a cronjob to execute the script periodically (all 2 months).
  • Example cronjob: 0 0 1 JAN,MAR,MAY,JUL,SEP,NOV * /path/to/script/


This is a free tool and support is not included and guaranteed. Nevertheless I will try to answer all your questions if possible. So write to my email address biegel[at] if you have a question :-)


The UpdateCertificate script is licensed under the MIT License (Expat) which is published on the official site of the Open Source Initiative.