Bobcares

Debian Certbot NGINX | Installation Steps

by | Jan 16, 2023

Using Certbot, secure NGINX on Debian systems with the below steps. Bobcares, as a part of our Server Management Services, offers solutions to every query that comes our way.

Secure NGINX On Debian Using Certbot

 

debian certbot nginx

 

The below steps help us to secure NGINX on Debian using Certbot:

  • Firstly, we’ve to access the server running the HTTP page with sudo privileges using SSH.
  • Then install and set up snapd.
    sudo apt update
    
    sudo apt install snapd Install the core snap:
    
    sudo snap install core
    
    sudo snap refresh core
    
    
    
  • Now we’ve to confirm the snapd is up-to-date.
    sudo snap install core; sudo snap refresh core

     

  • We must now delete any Certbot packages installed using an OS package manager.
    sudo apt-get remove certbot
    
    sudo dnf remove certbot
    
    sudo yum remove certbot
    
    
    
  • Now we’ve to install Certbot.
    sudo snap install --classic certbot

     

  • We must make sure the Certbot command can execute by using the below code on the command line.
    sudo ln -s /snap/bin/certbot /usr/bin/certbot

     

  • We can either get and install the certificates or just get the certificates.

    $ sudo certbot --nginx                            //To Install A Certificate

    $ sudo certbot certonly --nginx       //To Get A Certificate

  • The system’s Certbot packages include a cron job or systemd timer that will automatically renew the certificates before they expire. Unless the configuration changes, we won’t need to run Certbot again. Run the following command to test certificate automatic renewal:
    sudo certbot renew --dry-run

     

    The following places have the command to renew Certbot installed:

    /etc/crontab/
    
    /etc/cron.*/*
    
    systemctl list-timers
  • Finally, we’ve to make sure the Certbot worked and the site was set up properly by visiting https://ourwebsite.com/ in the browser and check for the lock icon in the URL bar.

[Looking for a solution to another query? We are just a click away.]

Conclusion

To conclude, we have shown the steps from our Tech team to secure NGINX on Debian using SSL certificates from Certbot software.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.