Multiple forums on one codebase
-
I currently run several forums (with different domains, databases, and subjects) off of a VPS using Vanilla Forums, which I have set up so that each forum uses the same core files. This makes it easier to update these forums.
I like NodeBB and want to start using it for one of my forums and eventually all of them if it goes smoothly, but I'm wondering, can I run multiple forums off of one NodeBB instance? This would save update hassles and possibly RAM if my noobish understanding of how NodeJS works is correct.
I haven't actually installed NodeBB yet, so you'll have to forgive me if I sound stupid.
-
@lukelarris said:
can I run multiple forums off of one NodeBB instance?
Not at the moment.
sub-categories are going to find their way into NodeBB in (near?) future (since they've got requested multiple times), but they aren't within 0.4.0. -
@lukelarris said:
I like NodeBB and want to start using it for one of my forums and eventually all of them if it goes smoothly, but I'm wondering, can I run multiple forums off of one NodeBB instance? This would save update hassles and possibly RAM if my noobish understanding of how NodeJS works is correct.
The bottleneck with Node tends to be CPU, not RAM, but of course it would still save you RAM running all your forums from the same process
-
@frissdiegurke Not looking for subcategories, I want to run several separated forums on their own domains.
@jonathanmh Thanks for clarifying.
-
@lukelarris
This question, I think, has been asked and answered at Multiple Instances. The gist is, no, you can't, but you could run as many NodeBB instances on the same server. Just that they can't share the same DB. Network installation is something that will be nice to have, I agree.
-
I've just done some tests on this and it seems you can share the codebase by simply linking it within your file-system, just don't link the config.json and some other files (take a look into the .gitignore, I think config.json and those mentioned within the public-folder are the important ones not to link). This way you'd gain a shared code-base that will be easier to keep up to date since you'd need only one update. But you definitely will need to start as many NodeBB instances as you want to have forums.
-
@frissdiegurke This is what I wanted to know, thank you! I don't mind multiple instances as much if I can keep file redundancy down and have a simpler update process for my forums.
-
@lukelarris What you propose is definitely possible. We just haven't tried it.
Notes
- In
app.js
, we listen for a passed-in argument calledconfig
- By default, it looks for a
config.json
present in the root directory - If you ran NodeBB with
./nodebb start --config="/relative/or/absolute/path/to/another/config"
, it should correctly start NodeBB using the second config file. - I don't know what would happen if you pointed
--config
to a non-existant file -- would NodeBB run through the setup script and save the new config? Beats me.
Let me know how you get on!
- In