Skip to content
Follow
Ubuntu Linux

How to Install Certbot on Ubuntu Linux

Richard
Written by
Richard
Oct 6, 2023 Updated Sep 15, 2026 3 min read
How to Install Nextcloud AIO on Ubuntu Linux
How to Install Nextcloud AIO on Ubuntu Linux

Certbot is a free tool that gets and renews Let’s Encrypt security certificates to protect data sent between visitors and your Ubuntu web server. Snap packages and the apt package manager both let you install Certbot on Ubuntu 20.04 or newer systems.

Advertisement

Snap is the best choice because it gives you the newest version with the latest security updates.

⚡ Quick Answer

Install Certbot on Ubuntu using Snap by running `sudo snap install –classic certbot`. Then, create a symbolic link with `sudo ln -s /snap/bin/certbot /usr/bin/certbot`. This method ensures you get the latest version.

Advertisement

Install Certbot via Ubuntu repositories

Installing Certbot via Ubuntu repositories lets you get the tool using the built-in apt package manager without adding extra software sources. Open your terminal and run sudo apt install certbot to download and set up the program on your system. This method is straightforward, but keep in mind that the version from the official repositories might be older than the release available directly from the developers.

If you prefer using the Ubuntu repositories, follow these steps. Keep in mind, the version installed here might not be the absolute latest.

sudo apt install certbot

Run the commands below to check the installed version or remove the package entirely.

certbot --version

To uninstall Certbot, run the commands below.

Advertisement
sudo apt purge certbot && sudo apt autoremove

Install Certbot via the Snap package manager

Installing Certbot via the Snap package manager gives you the newest version of the tool along with all its required parts in one neat package. Open your terminal and run sudo snap install --classic certbot to set it up on your computer. This approach is often better than older methods because Snap (a universal package manager designed for Linux) handles updates automatically in the background.

Another method for installing Certbot is by using Snap.

Canonical's Snap (a universal package manager designed to bundle software and dependencies together) handles updates seamlessly across different Linux distributions.

To install Certbot via Snap, run the command below.

Advertisement
sudo snap install --classic certbot

After installing, create a symbolic link from the Certbot Snap location /snap/bin/certbot to /usr/bin/certbot. This makes running Certbot commands more convenient.

Run the command below to create that link:

sudo ln -s /snap/bin/certbot /usr/bin/certbot

Now, check the installed version.

certbot --version 

With Certbot installed, you can automatically create and renew certificates from the Let's Encrypt Certificate Authority.

Advertisement

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.

Advertisement

And that's how you install Certbot on Ubuntu.

Conclusion:

  • Certbot is a valuable tool for automating SSL/TLS certificate management on Ubuntu Linux, providing a secure and seamless process.
  • Users can choose between installing Certbot via Ubuntu repositories or the Snap package manager, allowing access to stable and more recent versions.
  • After installation, users can verify the version, uninstall Certbot if necessary, and create symbolic links to streamline accessibility.
  • The installation process also enables the automatic creation and renewal of certificates from the Let's Encrypt Certificate Authority, offering test and valid certificates for Nginx and Apache web servers.
  • Useful resources for creating, revoking, and deleting certificates using Certbot are available for further assistance.
  • Feedback and additional insights are welcome via the provided comments form.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

Advertisement

📚 Related Tutorials

How to Get Free Wildcard SSL Certificates
Ubuntu Linux How to Get Free Wildcard SSL Certificates
How to Install Apache on Ubuntu Linux
Ubuntu Linux How to Install Apache on Ubuntu Linux
How to Install Nginx on Ubuntu Linux
Ubuntu Linux How to Install Nginx on Ubuntu Linux

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *