Git clone /var/discourse mandatory? Install as non-root possible?

The install guide asks you to clone the repository to /var/discourse. Is there anything, which depends on it, or can I clone the repo to a totally different directory and have no problem with any part of discourse not finding the tools (not counting myself to replace the directory mentioning /var/discourse to the choice of my directory)?

And requiring to be root seems to be a bit too much: is being part of the docker group enough?

How about if I would like to serve discourse at a port above 1024 and have an nginx or haproxy or whatever to wire that to the “usual” ports (80/443)? Is that possible?


The install guide is aimed at non-technical people who just want a cheaply hosted Discourse forums, so our launcher script and other tools have a bunch of safe defaults to make their lives easier.

You can use another folder, but will have to adjust paths in some places, like the mounts on the app.yml file. You can run without being root and being on the docker group, but that means that our script won’t be able to automatically create a swap file if needed. Other checks may also fail, like our DNS readyness check. Using a reverse proxy of your choosing is also completely supported, we even ship a template so Discourse will be listening on a unix socket that you can point the reverse proxy to, but this means you should carefully configure the reverse proxy properly, sending correct headers, doing redirects, not buffering responses, etc.

TL;DR Everything is possible as long as you are cool with hacking around on the install.


I installed in another directory. Other than the app.yml you have the nginx.conf files. Then it should be good.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.