Let’s Encrypt SSL has become the preferred solution for website owners who want to protect user data without paying for commercial certificates. By enabling HTTPS on your Nginx server, you can encrypt traffic, improve trust, and meet modern web security standards.
In this guide, you’ll learn how to install Let’s Encrypt SSL on Ubuntu 20.04, configure Nginx for secure connections, and automate certificate renewals to keep your website protected.
Web browsers now expect websites to use HTTPS. Without encryption, sensitive information such as login credentials, contact forms, and payment details can be intercepted during transmission.
Let’s Encrypt offers free, trusted SSL/TLS certificates recognized by all major browsers. In addition to improving security, HTTPS can enhance search engine rankings and increase visitor confidence.
Before proceeding, ensure that:
The easiest way to manage certificates on Ubuntu is with Certbot, an automated utility designed to obtain and renew SSL certificates.
Update your package list and install Certbot:
sudo apt updatesudo apt install certbot
Once installed, Certbot can handle certificate issuance and future renewals with minimal manual intervention.
For enhanced encryption, it’s recommended to generate Diffie-Hellman parameters. These improve the security of key exchanges during SSL/TLS connections.
Run the following command:
sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
Although larger key sizes are available, 2048-bit parameters provide a strong balance between security and performance.
Before requesting certificates, create a validation directory that allows Let’s Encrypt servers to verify domain ownership.
Configure Nginx to serve verification files from a dedicated location. This setup simplifies certificate management and keeps configurations organized.
Next, request certificates using Certbot’s webroot method:
sudo certbot certonly \--agree-tos \--email admin@example.com \--webroot \-w /var/lib/letsencrypt/ \-d example.com \-d www.example.com
After successful validation, Certbot stores the certificate files in the /etc/letsencrypt/ directory.
Once certificates are available, update your Nginx virtual host configuration to use them.
A secure setup should include:
After editing the configuration, reload Nginx:
sudo systemctl reload nginx
Your website should now load securely through HTTPS, displaying the familiar padlock icon in web browsers.
Certificates issued by Let’s Encrypt remain valid for 90 days. Fortunately, Certbot can renew them automatically.
To verify automatic renewal functionality, perform a dry run:
sudo certbot renew --dry-run
If no errors appear, your renewal process is configured correctly.
You can also configure a deployment hook to automatically reload Nginx whenever certificates are renewed, ensuring updates take effect immediately.
Implementing SSL certificates offers several advantages:
These benefits make SSL an essential component of any production website.
Deploying Let’s Encrypt SSL on Ubuntu with Nginx is one of the most effective ways to improve website security. With free certificates, automated renewals, and strong encryption, Let’s Encrypt SSL helps protect visitors while ensuring your site meets modern web standards. Once configured, your Nginx server will deliver secure HTTPS connections with minimal ongoing maintenance.
PHP 8.5 is included in Ubuntu 26.04's default repositories and is the recommended version for…
Ubuntu 26.04 LTS "Resolute Raccoon" arrived on April 23, 2026 with Linux kernel 7.0, GNOME 50,…
Kubernetes is the standard platform for running containerized workloads across multiple servers with self-healing, rolling…
Ubuntu 26.04 LTS "Resolute Raccoon" was released on April 23, 2026 with Linux kernel 7.0, GNOME desktop, and standard security support until April 2031. A clean install gives you a known-good starting point on new hardware, when replacing another operating system, or when an upgrade path is not practical. This guide walks through how to install Ubuntu 26.04: downloading and verifying the ISO, writing a bootable USB drive, completing the installer, and doing the initial setup after the first boot. Before you start: You need a USB drive with at least 12 GB of free space. Back up any existing data on the target machine — the installer can erase the entire disk. Install Ubuntu 26.04: Download the ISO…
The correct timezone affects more than the clock on your screen. It drives cron job scheduling, systemd timer execution, log file timestamps, database record timing, and SSL certificate validity checks. A mismatched timezone can cause scheduled jobs to fire at the wrong hour and make log timestamps impossible to match with real-world events. This guide shows how to change timezone on Ubuntu using the timedatectl command (the recommended approach for servers and remote machines) and through the graphical Date & Time settings on desktop systems. The steps apply to all current Ubuntu releases including 24.04 and 26.04. <strong>Prerequisite:</strong> Only the root user or a user with sudo access can change the system timezone. Check the Current Timezone Before You Change It Run timedatectl with no arguments to see the active timezone and clock status: bashtimedatectl Sample output: Local…
Atom is a free, open-source, cross-platform code editor developed by GitHub. Built on Electron, it uses…