Discourse Install 502 Bad Gateway

If you’ve got an external reverse proxy, then it should be doing the ssl stuff and not Discourse. If you’ve got the ssl and letsencrypt templates in your yml file then that could be the issue, except you said it was working before.