Discourse rebuild fails with port 443 in use

First, like I said:

If you installed it by accident it may be safe to remove.

Looking again trough your pastebin:

  1. Your SMTP user & password is there, please remove

  2. You were setting Discourse to a higher port, so you were using nginx to host anything else right? So you shouldn’t remove the outside nginx

  3. IF you are running a reverse proxy outside the docker container, you can’t use the Let’s Encrypt template inside the docker container. You must get SSL in another way.