Skip to content

How to Install Certbot on Ubuntu Linux

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

You install Certbot on Ubuntu Linux to automate obtaining and renewing SSL/TLS certificates from Let’s Encrypt.

Certbot is an essential open-source tool that simplifies securing your websites with free certificates, encrypting communication between your server and visitors for platforms like Apache and Nginx.

You can choose between two primary installation methods on Ubuntu: the apt package manager or Snap. While apt is quick, its Certbot version might lag behind the latest release.

For the most up-to-date features and security patches, installing Certbot via Snap is often the preferred route, ensuring you’re running the current version on your Ubuntu system.

⚡ 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.

Install Certbot via Ubuntu repositories

Installing Certbot using Ubuntu’s own software sources is a simple way to get it on your system. This method uses the ‘apt’ command, which is built into Ubuntu, making the install Certbot Ubuntu process straightforward. Just open your terminal and type ‘sudo apt install certbot’ to get started.

If you’d rather use the Ubuntu repositories, here’s how. Keep in mind, the version installed here might not be the absolute latest.

🐧Bash / Shell
sudo apt install certbot

Now, check the installed version.

💻Code
certbot --version

To uninstall Certbot, run the commands below.

🐧Bash / Shell
sudo apt purge certbot && sudo apt autoremove

Install Certbot via the Snap package manager

You can also install Certbot easily using Snap, which is a modern way to manage software on Linux. Snap packages contain everything an app needs, so they’re simple to install and update on different Linux versions. To install Certbot with Snap, open your terminal and run the command: ‘sudo snap install –classic certbot’.

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.

🐧Bash / Shell
sudo snap install --classic certbot

After installing, you’ll want to create a symbolic link from the Certbot Snap location /snap/bin/certbot to /usr/bin/certbot. This makes running Certbot commands easier.

Run the command below to create that link:

🐧Bash / Shell
sudo ln -s /snap/bin/certbot /usr/bin/certbot

Now, check the installed version.

💻Code
certbot --version 

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.

🐧Bash / Shell
sudo certbot --nginx --test-cert

Run the command below to get a valid certificate if the test succeeds.

🐧Bash / Shell
sudo certbot --nginx

These posts should help you.

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.

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

Leave a Comment

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

Exit mobile version