How do I setup ngninx on the same droplet as a manual install of Discource (forum)?

Posted January 12, 2019 627 views
NginxUbuntu 18.04

I installed discource, using this tutorial. It worked great but now when I go to, it automatically redirects to my subdomain. Just doesn’t seem to work.

I am now confused on what to do next to be able to create a site, using the same droplet, on my domain.

I installed nginx but it gave me an error code, saying that the “Address already in use.”

All of the tutorials I am reading say to, for example, “Then, configure nginx to serve files from that directory. Open /etc/nginx/sites-available/default in your favorite text editor and update the line with the root directive such that it looks as follows:” I guess my problem might be, I have no idea how to edit get to these file and edit them in a text editor.

Appreciate any and all help y'all can throw my way.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


You need to change the port that discourse listens on it, maybe use 8080 so you can use port 80 for Nginx.

Hope this helps.

  • Hi there, thanks for the help. So, in the app.yml, I need to change this portion:

      - "80:80"   # http
      - "443:443" # https


      - "8080:80"   # http
      - "443:443" # https

    Correct? And then rebuild the container?

    Edit: I did that an when running nginx in the console, it says it can’t bind to the port, so I guess that didn’t work, even after rebuilding?