Home Ubuntu Linux How to Install Certbot on Ubuntu Linux
Ubuntu Linux

How to Install Certbot on Ubuntu Linux

How to Install Certbot on Ubuntu Linux
Richard
Written byRichardTech Writer, IT Professional
Oct 6, 2023 Updated Mar 19, 2026 4 min read Reviewed Mar 19, 2026

This article explains how to install and manage Certbot on Ubuntu Linux.

Certbot is a free, open-source software tool for automating the acquisition and installation of 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

If you prefer to install Certbot from the Ubuntu repositories, run the command below. As mentioned above, the version installed here won’t necessarily be the latest.

🐧Bash / Shell
sudo apt install certbot

Once installed, you can verify the version installed.

💻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

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

Once installed, create a symbolic link from the Certbot Snap location /snap/bin/certbot to /usr/bin/certbot.

Run the command below to create the link.

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

Check the version installed.

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

That should do it!

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.

Frequently Asked Questions

What is Certbot and why do I need it?

Certbot is a free, open-source tool that automates the process of obtaining and installing SSL/TLS certificates from Let's Encrypt. It helps secure your website by enabling HTTPS, which protects user data and improves search engine rankings.

How can I install Certbot on Ubuntu Linux?

You can install Certbot on Ubuntu using two main methods: via the Ubuntu repositories with the command 'sudo apt install certbot' or using the Snap package manager with 'sudo snap install --classic certbot'. The Snap method typically provides a newer version.

How do I verify the Certbot installation?

After installing Certbot, you can verify the installation by running the command 'certbot --version' in your terminal. This will display the version of Certbot that is currently installed on your system.

Can I uninstall Certbot if I no longer need it?

Yes, you can uninstall Certbot by running 'sudo apt purge certbot && sudo apt autoremove' if you installed it via the Ubuntu repositories. If you used Snap, you can remove it with 'sudo snap remove certbot'.

How do I create a certificate using Certbot for Nginx?

To create a certificate for Nginx using Certbot, first run 'sudo certbot --nginx --test-cert' to test your configuration. If successful, use 'sudo certbot --nginx' to obtain a valid certificate.

Was this guide helpful?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights 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.

2452 articles → Twitter

📚 Related Tutorials

How to Install Swift on Ubuntu 24.04
Ubuntu Linux How to Install Swift on Ubuntu 24.04
How to Install Memcached on Ubuntu Linux
Ubuntu Linux How to Install Memcached on Ubuntu Linux
How to Install Postfix on Ubuntu 24.04
Ubuntu Linux How to Install Postfix on Ubuntu 24.04
How to Install TeamViewer via Command Line on Ubuntu
Ubuntu Linux How to Install TeamViewer via Command Line on Ubuntu

Leave a Reply

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