Gerando chaves do LetsEncrypt a partir de trás do nginx

Thanks for the advice! I solved this by:

  • going to the nginx configuration file and removing the entire server { listen 443 ... } block I had gotten from the above guide
  • running sudo certbot and enabling LetsEncrypt for the site.

I had tried this before, but gave up on it because certbot was giving me an error. Turns out this was because I was running an old version of certbot. Upgrading it with sudo apt update; sudo apt upgrade fixed the issue.

So in short, the advice at the above link is incorrect. Just take the port 80 block in /etc/nginx/sites-available/discourse.conf, and let certbot handle the SSL stuff.