Multiple Forums in a Single Installation


(Tim) #1

I currently run a Discourse forum, and I’d like to run a second. I’m curious, is it possible to run a second forum from the same Docker container? Preferably within the same installation of Discourse, such that it uses the same database and well, saves on setup time.

If that isn’t possible, is it possible to run two Docker containers on a single server? (Understanding that the server only has just over the required 2 GB actual RAM.) That question is more just to save me money. $200 a year isn’t terrible, but if I don’t have to pay for two servers, it’d be nice to not.

Of course if someone comes along and answers that it is possible, I’d like a tutorial on doing so in whatever form. I do host multiple distinct websites on the server so I already have and am familiar with setting up multiple sites in nginx, so I can handle that part if need be.

(Before anyone mentions it, I understand that the RAM requirement is mostly for installation and updates because the whole container needs to be loaded into memory at once, from what I understand. Correct me if that’s wrong. Everything currently on the server is small, that is, low traffic, especially compared to what I pay (in my opinion) so I’m not concerned about heavy traffic causing issues (and should it eventually do so, then I’d be more than willing to pay for an upgrade)).

Before someone comes and says “search for ‘howto multisite’”, I did and found lots of posts, but those all just seemed to indicate how to configure the “outside of container” web server to host one or more other sites on the same server, which I know how to do. So if someone wants to come and say the only way to do this is to run a second container, that I can set up on my own. I would prefer another site on the same container though.


(Rafael dos Santos Silva) #2

(Tim) #3

Thanks for the reply, but that appears to direct on how to use multiple Docker images for hosting multiple sites. (Correct me if that’s wrong.)

I was looking for a solution to host multiple sites with separate domains in a single docker image/container.

EDIT: It’a a little late. So I’m a bit in a hurry. I’ll give that a more thorough reading over tomorrow. From my brief glance, it doesn’t appear to answer my question.


(Jeff Atwood) #4

It does answer your question, I think.


(Mittineague) #5

My take from

is that what is being asked is if Discourse has a type of “multi-site” feature similar to WordPress multi-site.

That is, some files and database tables would be “common” and shared between the different forums, while others would be unique to each forum.

Kind of a DRY thing.


(Tim) #6

Alright, after reading through that I believe I understand better that it does do what I want, but before I go blindly changing things I’d like to know a bit about what some things do.

Will any of the process (or the end result) require an increase in RAM?

Is there more to that howto? That didn’t seem to be a totally encompassing guide to setting up a second site? If it’s just that I do that, configure that file right and then set up another site like normal, good to know, but then…
What exactly does changing the file do? Just separate the database from each site?
If that is the case, would running a separate site not utilize increased RAM?

I guess some of my confusion comes from the post saying that it runs multiple sites in a “single Docker setup”, but then goes on to talk about separate “containers”, by “Docker setup”, do we mean, an installation of the Docker host software running on a single server, and that a “container” is the… the thing that I would think of as a container and can’t presently think of any other term for, VM perhaps would be the next best term, but as I understand it, that’s not really an accurate term. (Correct me if that’s wrong.)

Thanks for your time by the way, I think it’s great that the same people developing also handle support, and that community members assist too of course.


(Tim) #7

Okay, so… (pardon the resurrecting a mildly old topic, I’ll create a new one if someone wishes)…

Why do I want separate web and data containers and not just a second standalone container?

That is, why would I do the minorly more complicated thing above instead of just installing a second Discourse container on my current setup? (Assuming here the end goal is to have 2 completely isolated setups and I’ll configure Nginx outside of docker to handle multisite configurations myself.)


(Rafael dos Santos Silva) #8

The difference is resource usage. Using multisite you re-use process and uses way less memory.

If you have the resources, go ahead and run two standalones.


(Tim) #9

Good to know. That makes sense I guess. Assuming I don’t try to do upgrades to both at the same time, do you suppose slightly over 2 GB would be enough for 2 forums with around 20 active users each, posting 50 or so posts a day?

If you have no idea, that’s fine. I’m just sort of curious about it. I can do the aforementioned multisite setup if I need to.


(Tim) #10

Okay so I finally got around to actually doing this, and I’m realizing I didn’t understand it as well as I thought. How does modifying the hooks create an additional site and then set it up?

I hate to ask, but my issues first began when I decided to just do a second stand alone installation using a different path. That is, not /var/discourse , but /var/websitediscourse . And a different file in Nginx conf.d .

I don’t normally ask for things to be dumbed down any, but could anyone tell me what needs doing to just have host Nginx listen for incoming connections to web.site.com and direct those to a second Docker and Discourse setup?