How to Set Up Discourse in a Subdirectory for Self-Hosting?

AI-generated summary

MihirR is seeking guidance on setting up Discourse in a subdirectory (e.g., www.xyz.com/forum) for self-hosting, noting that it can be challenging and asking for recent methods, difficulty level, pitfalls, and best practices. NateDhaliwal recommends a guide on meta.discourse.org, highlighting that subdirectory setups require significant configuration and suggests using a separate domain or the Discourse Enterprise plan, which supports subdirectories natively. pfaffman advises against subdirectories altogether, stating that subdomains are the preferred and more reliable approach. MihirR acknowledges the advice but clarifies that their domain will primarily host Discourse, implying a preference for subdirectory setup despite the complexity.

I’m looking for guidance on setting up Discourse in a subdirectory or folder, such as www.xyz.com/forum. I’ve read that configuring Discourse in a subdirectory can be challenging, so I’m wondering if there are any recent updates or simplified methods to achieve this. Additionally, I plan to self-host Discourse and would appreciate detailed insights into the setup process. Specifically, I’d like to know the level of difficulty involved and whether there are any potential pitfalls or best practices to follow.

Any help or resources you can share would be greatly appreciated!

Hey there, you can take a look at this guide.

Note the advanced-setup tag.
Doing this would require lots more configuration, of course. It would be easier to just do it on another domain.

Or, you could host your forum with Discourse on the Enterprise plan. They support forums hosted in a subdirectory.

Virtually no one thinks using a subfolder is a good idea anymore. You’ll be much happier with two subdomains.

You are right, but is it possible tho. Cause majorly the domain would be having just Discourse