Setting up Multiple Instances of Discourse as Subdomains

AI-generated summary

In a discussion titled “Setting up Multiple Instances of Discourse as Subdomains,” Hugo_Roger seeks advice on splitting a single Discourse forum into multiple independent instances under subdomains (e.g., topic1.discourseforum.com), each representing unrelated topics. He asks whether multiple Discourse instances can coexist under one domain and whether users can be linked across instances via single sign-on (SSO), similar to Stack Exchange. tophee confirms that running multiple instances under subdomains is technically feasible, as Discourse treats domains and subdomains identically, but cautions against splitting logically unrelated forums only to reconnect them via SSO, questioning the rationale. Stranik inquires whether categories can be mapped to subdomains via nginx, while Hugo_Roger clarifies that the original categories were unrelated and that the visual appeal of categories didn’t meet expectations. He reiterates his intent to separate topics into distinct subdomains and asks for confirmation that this approach poses no technical issues. tophee questions why unrelated topics were initially grouped and now require SSO linkage, to which Hugo_Roger clarifies he only wants to unify user accounts, not content. Hugo_Roger asks if anyone has implemented such a setup, and Stranik admits they haven’t but finds the idea potentially useful for future use cases.

Hi everyone,

I have a few questions and was wondering if you could help me clearing some doubts.

I have discourse set up under a main domain and not under a subdomain. I have recently changed my mind and instead of having my forum categories in one place, I would like to have them set up as subdomains, my questions are:

can I set up multiple instances of discourse under one domain? As in, Category of computer, nature, life and science. Can I set up four subdomains and one discourse instance in each subdomain? do I need to remove discourse from my main domain?

Also, is there a way to link users between more than on instance? As in, allow users to have rep and other things per site but be able to operate as a single sign on in all instances? Similar to how SE is steup? Is this something possible?

Best,
Roger

So you’re saying that you want to split up your forum into multiple, entirely separate fora? If so, I’d think twice (or three times). If you originally had planned to make it one forum with categories, I assume that those categories do have something in common (they’re different aspects of the same thing) and in that case it’s clear that it should be one forum.

Yes, it’s possible. For discourse it makes no difference whatsoever whether it is running under a domain or a subdomain or whether there are a million other discourse instances in other subdomains. Domains are just a way of creating a human-friendly way of identifying the server on which discourse is running.

In principle, you could probably set up your instances as SSO clients of some SSO provider (or make one instance the SSO provider for the others), but as mentioned earlier, I think this will probably cause more problems than it solves.

And what means can be made so that categories would be like subdomains?

For example:

https://discourse.org/c/plugin -> https://plugin.discourse.org/

nginx?

Thank you very much for your response!

nope.. they re entirely different not related.. initially the idea was to set up set it up as subdomains.. but i tried with categories and it doesn’t look as good as i thought it would.

so yeh it would me..

topic1.dicousrseforum.com
topic2.discouseforum.com
topic3.discourseforum.com

so you agree there is no issue in doing that?

exactly. thts wht i mean

If they’re unrelated, why did you first plan to put them into the same forum and now want to connect them back together via SSO?

I am talking about connecting the users not the topics/categories..

have you ever done it?

No. I ask in advance. Such an opportunity will probably be useful.