New

EmeraldHost 2.0 is here: faster, more intuitive, and made for everyone - the new panel!

Learn more
Guides
Services & ToolsInstall Certbot

How to install Certbot on your Linux VPS

Step-by-step guide to install Certbot on a Linux VPS with Apache2 or Nginx - secure your website with SSL certificates on Ubuntu/Debian.

2 min read
May 16, 2025

Instructions for installing Certbot for Apache2 and Nginx on a Linux VPS.

With Certbot you can set up free TLS/SSL certificates from Let's Encrypt.

  1. Update system
    First update the system of your server. Open the console and enter the following command:

    apt update && apt upgrade -y
    
  2. Install Snap
    Install Snap by entering the following commands in the console:

    sudo apt install snapd
    sudo snap install core
    sudo snap refresh core
    
  3. Install Certbot
    Install Certbot via Snap:

    sudo snap install --classic certbot
    
  4. Enable command
    Make the Certbot command available system-wide:

    sudo ln -s /snap/bin/certbot /usr/bin/certbot
    
  5. Use Certbot
    Run Certbot for your web server:

    • For Apache2:
    sudo certbot --apache
    
    • For Nginx:
    sudo certbot --nginx
    
  6. Check certificates
    You can find certificates under:

    /etc/letsencrypt/live/<your-domain>/
    

    Show status:

    sudo certbot certificates
    
  7. Automatic renewal
    Certbot automatically creates a cronjob. You can use the following command to test whether the automatic renewal works correctly:

    sudo certbot renew --dry-run
    

Certbot via APT

  1. Update system
    First update the system of your server. Open the console and enter the following command:

    apt update && apt upgrade -y
    
  2. Install Certbot
    Install Certbot for your web server:

    • For Apache2:
    sudo apt install certbot python3-certbot-apache
    
    • For Nginx:
    sudo apt install certbot python3-certbot-nginx
    
  3. Use Certbot
    Run Certbot for your web server:

    • For Apache2:
    sudo certbot --apache
    
    • For Nginx:
    sudo certbot --nginx
    
  4. Check certificates
    You can find certificates under:

    /etc/letsencrypt/live/<your-domain>/
    

    Show status:

    sudo certbot certificates
    
  5. Automatic renewal
    Certbot automatically creates a cronjob. You can use the following command to test whether the automatic renewal works correctly:

    sudo certbot renew --dry-run
    
Written byEmeraldHost Team
Last updated on Mar 19, 2026 Edit on GitHub

Did this article help you?

Your feedback helps us improve our guides.

Help shape the guides

€10.00 in credit for every new guide, €5.00 for every improvement.

Contact Support

Create a support ticket and our team will get back to you as soon as possible – personal and professional.

Go to Support
1257 members online

Discord Community

Connect with other players, get quick help from the community, and stay up to date with the latest news.

Join Discord

Join our Discord community 1257 members online right now