Already have Discourse droplet, can I add MediaWiki

Posted July 18, 2020 416 views
Ubuntu 16.04

I currently have a discourse droplet running on Ubuntu 16.04.2 x64 (2GB mem, 60GB disk). It’s been running almost 3 years now.

If I want to add a MediaWiki to it, how should I go about doing that? I currently have a mediaWiki up and running on another server, but want to transfer it over to consolidate.

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
2 answers

Hi there @GreatMoustache,

It would depend on how your Discourse is currently setup. Is it running inside a container and if so on what ports? Do you already use Nginx as a reverse proxy or Apache?

Besides that, what you could do is use Nginx and have 2 separate Nginx server blocks, one for Discourse and one for MediaWiki.

You can take a look at this article here on how to get started with Nginx server blocks:


by Justin Ellingwood
When using the Nginx web server, server blocks (similar to the virtual hosts in Apache) can be used to encapsulate configuration details and host more than one domain off of a single server. In this guide, we'll discuss how to configure server blocks in Nginx on an Ubuntu 16.04 server.
  • How do I find out any of that information? I don’t think nginx is installed. I’m guessing it was just bought and setup with maybe a 1 click install of discourse?

    I’ve managed to figure out the command for app list, and all that it lists is OpenSSH.

    All the guides are.... not super helpful b/c they assume you already KNOW how things are setup, and I don’t, and nothing tells me how to find that out.

    I’m worried that if I start to install nginx on it now, it might mess things up.

    I’m guessing if it comes down to it, I can do a full back-up of discourse, then wipe the droplet, and start with nginx and 2 server blocks....

    • Hi there @GreatMoustache,

      One way to check if Nginx is installed is to run the following command:

      • sudo systemctl status nginx

      Also, you could use the netstat command to check what services are listening on port 80:

      • sudo netstat -plant | grep 80

      This would give you more information on what your current setup is and then start from there on how to proceed with further changes.


      • Hey, sorry for the long delay, life got crazy.

        It looks like it was setup via one-click as a docker.

        tcp6  0  0 :::80      :::*     LISTEN    24016/docker-proxy

        nginx doesn’t seem to be installed (sudo: systemct1: command not found)

        • Hi there @GreatMoustache,

          I see, yes so in this case what you could do is start The MediaWiki another container on a different port.

          That way you will have your two applications running in two separate isolated containers.

          Hope that this helps!

          • Hi Bobby
            I’m in a similar situation to OP - Have discourse installed via Docker:

            tcp6       0      0 :::443                  :::*                    LISTEN      29800/docker-proxy  
            tcp6       0      0 :::80                   :::*                    LISTEN      29813/docker-proxy  

            And “Unit nginx.service could not be found.” for the other command

            I want to set up some Drupal websites on the same droplet (previously I’ve only done it on LAMP stacks over at Dreamhost but would like to try out nginx here); if I understood your last comment I should install nginx on another container (means install nginx on docker, which would create another container?) on a different port? does that mean visitors would need to use rather than just Or just that the docker ports (29800/29813 in my example) would be different and I could setup to that container?


          • Hi there @sifaan,

            Yes indeed using Nginx would be one way to go, however what you would need to do in this case is to change the ports that your Discourse Docker container is listening on before you could either install Nginx or run it as a container.

            Basically, you can not have multiple services listening on the same port. So now as your Discourse container is listening on ports 80 and 443, if you try to start Nginx it will fail as the ports are already in use.

            Hope that this helps!

Thanks @bobbyiliev

I was able to use the instructions from Discourse forums here to get nginx installed alongside my discourse;
note that the first comment updates the original post with some additional settings; and I also had to use (details) the _ecc version of the keys and an additional env variable to get my site working properly (at least, it seems to be working)