# Multiple Forums in a Single Installation

**URL:** https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832
**Category:** Self-hosting
**Created:** [September 28, 2016, 11:16pm UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832 "2016-09-28T23:16:37Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![JupiterFlux](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@JupiterFlux](https://meta.discourse.org/u/JupiterFlux)
#### Post date: [September 28, 2016, 11:16pm UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832/1 "2016-09-28T23:16:37Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 29, 2016, 1:24am UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832/2 "2016-09-29T01:24:16Z")

</div>

> [@Multisite configuration with Docker](https://meta.discourse.org/t/multisite-configuration-with-docker/14084):
>
> warning While multisite is supported in the Discourse application, this is an advanced sysadmin setup. If you don’t know what you’re doing, do not set up multisite. The Discourse team is unable to provide multisite configuration support. If you wish to host multiple domains on a singled Docker setup, you’ll need a multisite configuration. Here are the basic building blocks for one. Understand hooks Multisite is a fairly advanced topic. Before attempting a multisite build, spend some time…

---

<div class="post-metadata">

### Author: ![JupiterFlux](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@JupiterFlux](https://meta.discourse.org/u/JupiterFlux)
#### Post date: [September 29, 2016, 2:05am UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832/3 "2016-09-29T02:05:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 29, 2016, 5:18pm UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832/4 "2016-09-29T17:18:06Z")

</div>

It does answer your question, I think.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [September 29, 2016, 5:50pm UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832/5 "2016-09-29T17:50:56Z")

</div>

My take from

> [@JupiterFlux](#):
>
> uses the same database

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.

---

<div class="post-metadata">

### Author: ![JupiterFlux](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@JupiterFlux](https://meta.discourse.org/u/JupiterFlux)
#### Post date: [September 30, 2016, 12:03am UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832/6 "2016-09-30T00:03:12Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![JupiterFlux](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@JupiterFlux](https://meta.discourse.org/u/JupiterFlux)
#### Post date: [October 10, 2016, 3:43pm UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832/7 "2016-10-10T15:43:26Z")

</div>

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.)

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [October 10, 2016, 4:07pm UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832/8 "2016-10-10T16:07:21Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![JupiterFlux](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@JupiterFlux](https://meta.discourse.org/u/JupiterFlux)
#### Post date: [October 10, 2016, 5:09pm UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832/9 "2016-10-10T17:09:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![JupiterFlux](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@JupiterFlux](https://meta.discourse.org/u/JupiterFlux)
#### Post date: [October 27, 2016, 1:28am UTC](https://meta.discourse.org/t/multiple-forums-in-a-single-installation/50832/10 "2016-10-27T01:28:22Z")

</div>

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](http://web.site.com) and direct those to a second Docker and Discourse setup?
