renew Let's Encrypt SSL certificate
Keep your HTTPS certificate valid
· by Aron Kovacs
1. what is Let's Encrypt?
Let's Encrypt is a free, automated certificate authority that provides SSL/TLS certificates. These certificates expire every 90 days and need to be renewed to keep your site secure.
2. login to your server
First, SSH into your dedicated web server:
ssh root@your.server.ip.address
Replace "your.server.ip.address" with your actual server IP address. You'll need root access or sudo privileges.
3. verify certbot is installed
Make sure certbot is installed on your system:
certbot --version # check if certbot is installed
If not installed, you can install it:
apt-get install certbot # for Ubuntu/Debian
yum install certbot # for CentOS/RHEL
4. stop nginx
Temporarily stop nginx to free up port 80/443 for certificate renewal:
systemctl stop nginx # stops the nginx service
This is necessary because certbot needs to bind to port 80 to verify domain ownership.
5. renew the certificate
Run the renewal command:
certbot renew # renews all certificates
For a dry run (test without actually renewing):
certbot renew --dry-run # test renewal process
6. start nginx again
Once renewal is complete, restart nginx:
systemctl start nginx # starts nginx back up
Verify nginx is running:
systemctl status nginx # check nginx status
7. complete workflow
Here's the complete process in order:
ssh root@your.server.ip.address
systemctl stop nginx
certbot renew
systemctl start nginx