Renew Your Certificate Periodically
LetsEncrypt Certificates are valid for 3 months only. To setup a schedule to renew the certificates, follow these steps.
- SSH to your Home Assistant computer
Change into your root account by running this command (enter your password if prompted):
Run this command to edit your cron jobs:
You will see the following message if you’re editing the file for the first time. Select nano as it’s the easiest to use (i.e. enter :
no crontab for root - using an empty one
Select an editor. To change later, run 'select-editor'.
2. /bin/nano <---- easiest
Add this line:
15 03 1 */6 * certbot renew
- The above line sets up a cronjob to run a job on the first they of every alternative month at 3:15 am.
- Save the file and exit. If you’re using nano, use CTRL-X to save and quit.