If you provide an email address to Let's Encrypt when you create your account, we'll automatically send you expiry notices when your certificate is coming up for renewal. We send the first notice at 20 days before your certificate expires, and more notices at 10 days and 1 day before it expires.
Know: How to Properly Enable HTTPS on any website.
Checking certificates dates on Ubuntu Apache Web Server
This command will display the certificates it’s managing, including expiration dates on your Ubuntu Apache Web Server.
sudo certbot certificates
Updating SSL Certificate
First of all run this command containing all of your subdomains including root domain and your email address.
sudo certbot --apache --agree-tos --redirect --uir --hsts --staple-ocsp --must-staple -d mywebsite.in,www.mywebsite.in,mail.mywebsite.in --email [email protected]
After this command this prompt will open: (You have to choose 2)
That right. Based on your check and how your server is responding, I think you’re safe. and Now Your Certificate is renewed.
Setup Auto-Renew for LetsEncrypt SSL Certificates Apache
Did you know? Configuring auto-renew for you Let’s Encrypt SSL certificates means your website will always have a valid SSL certificate.
To automatically renew Let’s Encrypt certificate, simply edit root user’s crontab file.
sudo crontab -e
Then add the following line at the bottom.
@daily certbot renew --quiet && systemctl reload apache2
--quiet flag will suppress normal messages.
If you want to receive error messages, then add the following line at the beginning of crontab file.
sudo systemctl restart apache2