How To Renew Your Let's Encrypt SSL Certificate AUTOMATICALLY (with crontab)

preview_player
Показать описание
Learn how to automatically renew your website's Let's Encrypt SSL certificate without having to lift a finger. Since Let's Encrypt certs expire after 3 month, we will install a cronjob to execute the "certbot renew" command on a weekly basis which will check to see if the SSL certificate needs to be renewed. If so, certbot will automatically renew the cert for you. This tutorial will work on most Apache and Nginx web servers.

Check out my vlog channel @TonyFlorida

#letsencrypt #certbot
Рекомендации по теме
Комментарии
Автор

Tony, please look into three things, and perhaps issue an addendum or update. These instructions are otherwise incomplete and will leave your viewers hanging. Until then, here are the issues I saw, and readers may be able to bootstrap themselves from here.

1. Use "certbot --dry-run renew", emphasis on --dry-run, when demonstrating and doing your own testing. Otherwise it doesn't take too many times of doing it without --dry-run to get temporarily blacklisted by their servers.

2. The crontab technique doesn't work for all Linux distros. I believe that the systemd systems ignore the crontab and use different scripts to do the renewal checks.

3. When the certificate is actually renewed and replaced after 60 days, the httpd process (i.e. Apache, OpenLiteSpeed, or Nginx) needs to be told to reload its files, typically with systemctl.

stevemeacham
Автор

First of all, your videos are great!
Regarding certbot -renew at crontab, when the server is not changed frequently, e.g. website that is changed once per several months and backed up only after changes, if it is ever restored from the backup, its certificate would be old and obsolete till the next Sunday.
So in order to avoid the manual renew after restore, I would add the following rule:
@reboot sleep 300 && certbot -renew -n -q
(sleep 300 to prevent the case that Let'sEncrypt server would try to access the site before the web-server is up and running)

EliNetmask
Автор

Great video Tony thank you, subscribed without hesitation

tomsvideos
Автор

Thanks for sharing your knowledge man. Great content.

SabedoriaUniversal
Автор

just got the email to renew my certificate; thank you!

MegaDT
Автор

Thanks for posting this info - really saved my bacon!

KearlHat
Автор

I specially came here to find this vid, as I had setup of certs more than 3 months ago after watching your another video. However, apparently now certs get automatically renewed on expiry day. As I had not set any such cron tab also was late and had not run any command, and when i checked, in mid jun (when expiry was due) the certs have already been automatically refreshed / renewed for next 3 months.

Can you please confirm this. I am using them on apache2

KShahzad
Автор

does it keep the same certificate and private key as well?

KwazyGambling
Автор

Plz make a video how to remove one of the website from multiple websites on single server.

mirowahedali
Автор

I run Apache on multiple ports 8081 8082 .... can I do a certbot wildcard SSL and use it for all those site?
<VirtualHost *:81>
<VirtualHost *:82>
<VirtualHost *:90>

I do GoDaddy DNS with port redirection on my router

How would I go about making it automatic

DoubleD
Автор

I have a Ubuntu with OpenLiteSpeed, i added this code
0 1 * * * certbot renew --quiet --post-hook "systemctl restart lsws"
to crontab to check everyday at 1 AM if it should renew
Will this code work ?

yorgovanis
Автор

Hey Tony. Do you know any tool to manage several SSL Certificates and see which want needs to be updated? Like a SSL Certificate manager, all in one?

mauriciof.santamariagarcia
Автор

Hi, I am having a problem with the cyber panel. please advise me what to do...I keep getting emails that "Automatic Let's Encrypt renewal for [domain] was attempted and failed. Thank you

worldofnissanka
Автор

My SSL is expired, how to renew using ftp ? I'm not familiar with server

rahulkalal
Автор

Will this work on LiteSpeed servers? If not, then please suggest me how to do that.

RiddhamManna
Автор

How can we cron renew a certificate on openlitespeed server?

roklo
Автор

cd sites-available/
no such file or directory, how to solve ? hosting namecheap

nickijenns
Автор

can you make a tut how to remove bitnami ntcert ?

gabrielmolocea
Автор

hi bro, when i do the renewal the system give me this message "Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.." i´ve open this port on my firewall, i need help please. thanks

gustavomha
Автор

Hello, I have an EC2 instance on AWS and was able to install Let's Encrypt SSL Certificate. However, I wanted to have it automatically renewed and installed without me checking every 3 months. Does this auto renew done by certbot also auto installs it? Or do I still have to re-install the certificate manually? There's a step on certbot that tells me that I would still have to re-install the renewed certificate so it's still like checking back every 3 months.

Great vid, btw! :D

NeilPatrickAlvarez