Let's Encrypt - The Right Way in 2021

Install Certbot

Install snapd.
Remove old version of certbot:

1sudo apt-get remove certbot
2# or
3sudo dnf remove certbot

Install certbot:

1sudo snap install --classic certbot
2sudo ln -s /snap/bin/certbot /usr/bin/certbot

Run it!

1sudo certbot --nginx

Caution!

In case you have an IP access blocking config in nginx, you need to disable it, temporarily at least.
For example, imagine you have this nginx block for IP access blocking:

1server {
2
3  listen 80 default_server;
4  return 444;
5
6}

Then disable it like so:

1mv ip-guard.conf ip-guard.conf.bak
2nginx -s reload

Yay, your certbot should be working for sure! 😎
Happy securing!

comments powered by Disqus