Note: LTS switched to 16.x today. 🐕
Question regarding multiple instances of NodeBB on dedicated server
I'm still learning my way around server administration so forgive me if these questions seem obvious to someone who should know what they're doing running a dedicated server. I know enough to be dangerous, so it's a good thing it's only my own projects and not a client HA!
I'm following the instructions for installing NodeBB via OS (Ubuntu 14.04)
After I get done with my first installation, at what part in the steps will I need to start in order to install a second instance for another website? I ask because I am aware that many of the initial steps are loading dependencies etc. Will it hurt anything if I were to just run through the steps again, or will I end up with multiple instances of the dependent files if that makes sense.
Plus ... when returned to the command prompt after entering the first step I see a file that is being ignored, do I need to be concerned about that file?
N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
Thank you ... Pops
You can't run multiple NodeBB instances on the same port (4567), so each instance should have its own port assigned (and different system path too). As for setting up the proxy, I suggest you to use nginx. Each instance should have its own nginx virtual host set up which then routes to the corresponding NodeBB instance.
However, I'm not sure about the database. Maybe you can run all the instances on the same Redis db, maybe not...
Once you've installed it once, all you need to do is download the nodebb files again into another folder of your VPS, the only things you need to change are what port number nodebb will run on, so instead of 4567 (as your first install is using that) you could use 4568. Then you would also need to change what database you use. So, when you installed nodebb the first time, you used database 0, when you run the setup on your new install, change the 0 to a 1, and you have two databases in redis.
I guess the answer is using another ./nodebb setup inside new folder
info: Now configuring redis database:
Host IP or address of your Redis instance (127.0.0.1)
Host port of your Redis instance (6379)
Password of your Redis database
Which database to use (0..n) (0)
PS : How to add Quotes/ Code ?
A few doubts,
- Copy files from folder to which we have installed ?
The github repo, so you'd have a folder called nodebb with all of the nodebb files in, then a folder called nodebb2, which also contains all the nodebb files.
- Share the command to change port no. please..
./nodebb setup, but change :4567 to something else.
- How to assign new folder / installation to database 2 ?
You answered this in your next post, change the 0 in database to 1.
- Should we run ./nodebb setup after copying the files ( installed ? ) to a new folder ?
You will need to yes in order to set it up, you'll also need to run npm install to get the dependencies installed in that location.