Running nodebb on multiple ports on a single machine.
Unsolved
Technical Support
-
Hi, I am trying to run nodebb on a single machine on multiple ports as recommended here https://docs.nodebb.org/configuring/scaling/.
This is my config.json
{ "url": "http://localhost:4567", "secret": "****", "database": "mongo", "mongo": { "host": "127.0.0.1", "port": "27017", "username": "nodebb", "password": "*********", "database": "nodebb", "uri": "" }, "redis": { "host":"127.0.0.1", "port":"6379", "database": 0 }, "port": ["4567", "4568", "4569"] }
I then run
./nodebb setup
and my port value in my config.json gets overwritten. I tried to change the config and then run./nodebb start
but still no luck. I am on version 2.6.What am I doing wrong?
-
Your config.json should look like this for multiple ports
{ "url": "http://example.org", "secret": "your-secret-goes-here", "database": "mongo", "port": [4567, 4568, 4569], "mongo": { "host": "127.0.0.1", "port": "27017", "database": "0" }, "redis": { "host":"127.0.0.1", "port":"6379", "database": 0 } }
After
./nodebb setup
modify config.json remove port from url and add the port array. Then use./nodebb start
to start nodebb. It should start up 3 nodejs processes, you can check if it worked withtop
Copyright © 2024 NodeBB | Contributors