Two NodeBB instances on same server
-
The question of having two completely different nodebb forums, (with seperate databases), running on same server has been asked previously... but I am confused on something.
I have zero experience of docker, is docker absolutely required to have two instances, or can the two setups can just be put in seperate directories?
If so does the Nodebb code need to be installed twice, or can they both point to the same codebase? -
@eeeee Docker isn't required for two separated installations. You can just place the NodeBB files inside another directory, use a different database name, and in the config, use a different port than the default.
-
@phenomlab Thanks! So for 2 forums would it need two sets of the nodebb source files?
Just thinking that if they could both use the same source code, then when upgrading, both forums would increment version from one upgrade process? -
@eeeee Sure. When NodeBB tries to load the values in
config.json
, it checks nconf valueconfig
first. You can send inconfig
as an environment variable to point to the path of a different config file.e.g.
config=configA.json ./nodebb start
So you can have multiple configs in the same folder, and launch separate processes off of the same file structure.
If I run
config=what.json ./nodebb dev
on my local machine, it will launch the web installer, sincewhat.json
does not exist. -
There's are other reasons to have two separate NodeBB installs:
- you may want to run different sets of plugins
- uploaded files are stored within the NodeBB directory, best to keep those separate
- plugins like emoji and customize store files specific to a certain forum, and all plugin files are within the NodeBB folder