You'll want to add something like this to your crontab (eg. via sudo crontab -e
):
12 3,15 * * * /root/certbot-auto renew
You can change the numbers if you want, just pick any random number from 0-59 for the first and two from 0-23 for the second. If you prefer to use /etc/crontab
, remember to add the username root
after the last *
.
What command worked for you in the end, to get the certificate? If you used something like ~/certbot-auto --apache
, the above should be all you need to renew automatically; if you used something like ~/certbot-auto certonly ...
then you might need to make some other changes.
Yep, run certbot-auto again. As long as you have an existing <VirtualHost *:80>
for the new site, it should be able to figure out what to do, and the single cron job should be enough to auto-renew both certificates.