Hello, I’m new to Discourse and would really like to have it on my server. I also have a nginx configuration that allows to connect to a wordpress website. I do not want to have a subdomain, I just want to have this URL: snapecraft.ddns.net/forum
Because my server doesn’t support PostgreSQL I decided to host the Database on an external free webserver.
How would I do the nginx configuration and the configuration of the DB? Are there some guides?
Thank you so much in advance.
AI-generated summary
A user, Mayus, asks how to install Discourse as a subdirectory (e.g., snapecraft.ddns.net/forum) using an existing Nginx setup and an external MySQL database instead of PostgreSQL. Stephen confirms Docker is required and that a subfolder setup is possible with another Nginx instance, but PostgreSQL must be used within the container. pfaffman advises against using an external PostgreSQL server, emphasizing that Discourse requires PostgreSQL 9.6 and that it should be installed in the Docker container. Mayus confirms root access and asks about the Nginx configuration. pfaffman directs to the official subfolder installation guide. Mayus seeks clarification on the steps. rbrlortie shares experience, noting that subdirectory setup works but requires significant customization and reverse proxy configuration, recommending it only for those with technical resources.
The first question to answer is whether you can run docker on that server. Do you have ssh access as root?
A subfolder install is fine with another instance of nginx but you will still need to install docker with nginx and postgres within the container.
You almost certainly don’t want to do that.
You should search here for the subfolder instructions. The standard install will have postgres in the container.
Thanks for your answers. Yes, I do have root and ssh access.
It’s not that it doesn’t support postgresql its more that we don’t want another database because we already have mysql. Does postgresql need much performance?
Postgres 9.6 is required. If you follow the unfussy instructions it will be installed inside the docker container with discourse, redis, and nginx.
How would my nginx config look like? (The existing one)
You would search for the howto document and follow these instructions: Serve Discourse from a subfolder (path prefix) instead of a subdomain
So I would install it with the standard instructions and then modify the configs?
We are using discourse as a subdirectory. It works but had taken a lot of trial and error by our hosting expert.
I do not know the details. I know that he added reverse proxies and proxy passes to our nginx but that’s all I can say. We followed to documentation that pfaffman linked but even then, depending on your stack there’s a lot of customization to do.
I would not recommend unless you have resources to invest into it.