Certbot is a free, open-source software tool that stands out for its simplicity and efficiency. It interacts with the Let’s Encrypt Certificate Authority (CA), handles the validation, and issues certificates, thereby enabling HTTPS for manually-administered websites.
The article assumes that you possess basic Linux knowledge, are familiar with shell usage, and host your website on your VPS.
Step-by-step Certbot Installation on Debian 12
Step 1: Update Your System
Before installing Certbot, ensure your system is up-to-date. Regular system updates provide the latest features, improvements, and security patches. Execute the following commands for updating your system’s package repositories and upgrading the existing packages:
sudo apt update sudo apt upgrade
Step 2: Install Certbot on Debian 12
Now that your system is updated, you are ready to install Certbot. This tool automates the process of obtaining and installing SSL certificates on your server. Use the following command to install Certbot along with its Apache plugin:
sudo apt install certbot python3-certbot-apache
Step 3: Obtain a Certificate
After installing Certbot, the next step is to obtain a certificate for your domain. Execute the following command:
sudo certbot --apache -d your_domain -d www.your_domain
Don’t forget to replace ‘your_domain’ with your actual domain name.
Step 4: Configure Certbot
After obtaining a certificate, you need to configure Certbot to work correctly with your web server. To view a list of the certificates Certbot manages, run the following command:
certbot certificates
Step 5: Set up Automatic Renewal
Let’s Encrypt certificates are valid for 90 days. However, it’s recommended to renew them every 60 days to avoid any downtime due to expired certificates. Check the status of the Certbot timer using the following command:
systemctl status certbot.timer
Step 6: Verify Certbot Auto-Renewal
To ensure the auto-renewal process is set up correctly, perform a dry run with Certbot. This test simulates the renewal process without making any actual changes. Execute the following command:
certbot renew --dry-run
If the dry run is successful, the auto-renewal process has been correctly set up.
For further assistance or more useful information, we recommend checking the official Certbot website.
If you don’t have time to do all this stuff or if this is not your area of expertise, Shape.host services offer a “Cloud VPS” service. Contact us to get the best deal!