
Setting Up Let's Encrypt TLS/SSL Certificate on Ubuntu 16.04 with Apache
Let’s Encrypt is a free, automated, and open certificate authority (CA) designed for the public’s benefit. This tutorial guides you through setting up a TLS/SSL certificate from Let’s Encrypt on an Ubuntu 16.04 server running Apache.
Step 1: Install Ubuntu 16.04
- Login to the Client Area:
- Select "Services" > "VPS" at the top of the menu.
- Press the "Manage" button in the service table.
- Click the "Install OS" button.
- Choose Ubuntu 16.04, agree to the warning, and press "Continue."
- Wait for 5-10 minutes and refresh the VPS management page.
Step 2: Prepare the Server
Install necessary packages:
apt-get install software-properties-common python-software-properties
Add the Certbot PPA and update your sources:
add-apt-repository ppa:certbot/certbot
apt-get update
Install Certbot:
apt-get install python-certbot-apache
The Certbot Let's Encrypt client is now ready to use.
Step 3: Set Up the SSL Certificate
Generate the SSL certificate for Apache using Certbot. This command will automatically obtain and install a new SSL certificate for the specified domain:
certbot --apache -d yourdomain.ltd
If you have multiple virtual hosts, run this command for each to generate separate certificates.
Step 4: Verify Certbot Auto-Renewal
Let's Encrypt certificates are valid for 90 days. Certbot automates the renewal process by running certbot renew
twice a day using a systemd timer.
Test the renewal process with a dry run:
certbot renew --dry-run
If there are no errors, Certbot will automatically renew your certificates when necessary and reload Apache to apply the changes.
By following these steps, you can secure your website with a free TLS/SSL certificate from Let’s Encrypt, ensuring encrypted connections for your users.