Let’s Encrypt is a free, automated, and open certificate authority (CA) that provides SSL certificates to help websites encrypt traffic and boost security. Install Let’s Encrypt on your Linux server ensures that your site is protected with HTTPS, preventing data interception during transit.
This is not only crucial for security but also improves your website’s credibility and ranking on search engines, as Google prioritizes HTTPS-enabled sites. Furthermore, the process is automated, so certificates are renewed automatically without manual intervention, reducing maintenance time.
This guide will walk how to install Let’s Encrypt SSL on a Linux server.
What is Let’s Encrypt SSL on Linux?

Let’s Encrypt SSL is a free, automated, and open-source certificate authority that provides SSL/TLS certificates for securing websites. On Linux, Let’s Encrypt simplifies the process of enabling HTTPS encryption by offering an easy-to-use tool called Certbot.
With Certbot, users can automatically generate and renew SSL certificates for their domains, ensuring secure communication between users and web servers. This enhances site security while promoting privacy, and it is widely used due to its convenience and no-cost model.
Prerequisites
Before proceeding with the installation, ensure you have the following prerequisites:
- Root or sudo privileges: Administrative access is required for installation.
- A valid domain name pointing to your server (DNS records must be set correctly).
- A web server is installed, either Apache or Nginx (depending on your setup).
- Firewall configured to allow HTTP and HTTPS traffic (ports 80 and 443 should be open).
- Internet connection for communication with the Let’s Encrypt servers.
Install Let’s Encrypt SSL on a Linux Server
Let’s Encrypt SSL certificates are easy to install and manage using a tool called Certbot. Certbot is the recommended client for interacting with Let’s Encrypt, allowing you to automatically request and install SSL certificates for your web server.
Install Certbot on Your Linux Server
Certbot is the tool that helps you request, install, and renew Let’s Encrypt certificates. Depending on your Linux distribution, the installation process differs slightly.
For Ubuntu/Debian-based systems:
- Update your package list:
sudo apt update
- Install Certbot and the necessary plugin for your web server (Apache or Nginx):
sudo apt install certbot python3-certbot-apache
- For Nginx:
sudo apt install certbot python3-certbot-nginx
For CentOS/RHEL-based systems:
- Install the EPEL repository and Certbot:
sudo yum install epel-release
Install Certbot with the appropriate plugin:
- For Apache:
sudo yum install certbot python3-certbot-apache
- For Nginx:
sudo yum install certbot python3-certbot-nginx
Generate SSL Certificate with Certbot
Once Certbot is installed, you can generate the SSL certificate for your domain.
- For Apache:
sudo certbot --apache
- For Nginx:
sudo certbot --nginx
Certbot will automatically configure SSL for your web server and request the certificate. During this process, you’ll be asked to provide your domain name, email address, and accept the terms of service. Certbot will also automatically configure your server to serve content over HTTPS.
Verify SSL Installation
Once the certificate has been generated, you can verify its installation by visiting your website using https://yourdomain.com
. If everything is working correctly, your browser should display the secure padlock icon.
To verify the certificate from the server side, you can run the following command:
sudo certbot certificates
Additionally, you can use online tools like SSL Labs to check the SSL status and rating of your site.
Configure Automatic Renewal of SSL Certificates
Let’s Encrypt certificates are valid for 90 days, so it’s important to set up automatic renewal to avoid certificate expiration. Fortunately, Certbot automatically configures a cron job to handle renewals.
To check the cron job that Certbot has set up, you can run:
sudo systemctl list-timers
To manually test the renewal process, run the following command:
sudo certbot renew --dry-run
If the dry-run renewal is successful, Certbot will automatically renew your certificate when it nears expiration, ensuring your website remains secure.
Troubleshooting Common Issues
While the installation process is straightforward, you may encounter a few common issues. Here’s how to resolve them:
- Permissions issues: Ensure your web server has the correct permissions to access the certificate files.
- Firewall settings: Make sure that ports 80 (HTTP) and 443 (HTTPS) are open in your firewall.
- DNS issues: Verify that your domain points to the correct IP address on your server.
- Certificate not found: Ensure that Certbot is configured to use the correct configuration file and that the certificate is correctly installed.
For more detailed error messages, check Certbot logs:
sudo cat /var/log/letsencrypt/letsencrypt.log
Conclusion
In this guide, you’ve learned how to install Let’s Encrypt SSL on your Linux server using Certbot. You now have a secure, HTTPS-enabled website that not only protects your users’ data but also boosts your site’s credibility and search engine rankings. With automatic renewal configured, your SSL certificates will be maintained without you having to worry about expiration dates.
Let’s Encrypt offers an easy and free way to implement strong encryption for your site, and with this setup, you’re ready to move forward with a more secure web presence!