The article explains how to install and manage Certbot, a free tool for automating SSL/TLS certificates from Let’s Encrypt Certification Authority, on Ubuntu Linux. The software includes plugins for web servers like Apache and Nginx. Installation methods include using the apt command or Snap package manager. After installation, users can create and renew certificates with commands specific to their web server. Detailed instructions for installing test and valid certificates are provided.
This article explains how to install and manage Certbot on Ubuntu Linux.
Certbot is a free, open-source software tool for automating obtaining and installing SSL/TLS (Secure Sockets Layer/Transport Layer Security) certificates from the Let’s Encrypt Certificate Authority.
It includes plugins with specific web servers, including Apache and Nginx.
There are multiple ways to install Certbot on Ubuntu Linux. The quickest way to install it is to use the apt command. However, installing it using the Ubuntu repositories might not install the latest version.
Another way to install Certbot is via the Snap package manager. Installing it from Snap will install a newer version than the one in the Ubuntu repositories.
Install Certbot via Ubuntu repositories
Run the command below if you prefer to install Certbot from the Ubuntu repositories. As mentioned above, the version installed here won’t necessarily be the latest.
sudo apt install certbot
Once installed, you can verify the version installed.
To uninstall Certbot, run the commands below.
sudo apt purge certbot && sudo apt autoremove
Install Certbot via the Snap package manager
Another way to install Certbot is to use Snap.
Snap is a package management system developed by Canonical for Linux operating systems. It allows developers to easily distribute and update their software on different Linux distributions without worrying about compatibility issues.
To install Certbot via Snap, run the command below.
sudo snap install --classic certbot
Once installed, create a symbolic link from the Certbot Snap location
Run the command below to create the link.
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Check the version installed.
With Certbot installed, you can automatically create and renew certificates from the Let’s Encrypt Certificate Authority.
First, start with a test certificate to ensure your web server configuration is correct before proceeding with an actual valid certificate.
To install a test certificate for a Nginx web server, run the command below.
sudo certbot --nginx --test-cert
Run the command below to get a valid certificate if the test succeeds.
sudo certbot --nginx
These posts should help you.
- Create a certificate using Certbot for the Apache web server
- Create a certificate using Certbot for the Nginx web server
- Create a wildcard certificate using Certbot
- Revoke and delete a certificate using Certbot
That should do it!
This post showed you how to install and manage Certbot on Ubuntu Linux. Please use the comments form below if you find any errors or have something to add.