I was able to install it by following the instructions from here: https://products.containerize.com/discussion-forum/nodebb
I already have node.js installed on my computer. I did not install redis or nginx.
I have a mac, so on Terminal, after I created a directory called "nodebb", I skipped the first few lines of the instructions, and just pointed to the directory I created, by using the "cd" command. I then created another directory called NodeBB inside the nodebb directory. You may skip creating two directories and just create a directory called "NodeBB". I pointed to this directory by using the cd command.
Then this line
"git clone -b v1.15.x https://github.com/NodeBB/NodeBB.git ."
was the key for me.
After I typed that, nodebb was cloned to the directory.
Then I ran "./nodebb setup".
I used mongo for the database.
When prompted, I pasted the connection string that I got from mongodb's site. I substituted "nodebb" for the database part in the string. (I set up mongodb (Cloud Atlas) beforehand). The instructions that come up on Terminal will tell you to call your database "nodebb".
After that step, the program ran automatically and installed the files. It asked me to put in the username and password for mongodb and it also asked me to choose a name for admin and password. You might have to wait a while as it pauses for a long time after "Confirm Password". I thought there was some problem and was tempted to abort the operation, as it was taking a long time, but it did come up with further instructions after a while.
I typed "./nodebb start" when the setup finished and then went to "localhost:4567", and this time, I was able to see a normal board, and could log in as admin.
I write this follow-up in case another mac user has trouble installing nodebb. In the end, setup was pretty straightforward and did not involve a lot of steps. My OS is High Sierra.
The instructions, including the ones for Linux, at the official nodebb site did not work for me.
Connection to MongoDB that is hosted on atlas
-
I was able to get my nodebb install up and working with local version of mongoDB running, but for whatever reason I cannot seem to figure out how to connect and set up my nodebb install to connect to my atlass db and replica set.
I have messed around with the mongo.conf file a bit but am unsure how to add the three mongoDbs to it and how it all needs to be written oout.
Has anyone done this, or is their a better service that atlas that you would suggest. Many thanks!!! So far I have really enjoyed messing with nodebb on a local level and just would like to mess around with a VPS, I am currently using digital ocean for vps.
-
On a side note I am also able to connect to a mLab mongoDB just fine, so it must be the config for connecting to a mongodb with a replica set
really wanted to use Atlas free tier with the replica set...
-
You can put multiple hosts and ports into config.json, alternatively you can put your entire connecting string in
uri
.Example:
{ "mongo": { "host": "127.0.0.1,127.0.0.1", "port":"27017,27018" } }
Or
{ "mongo": { "uri": "mongodb://127.0.0.1,127.0.0.1:27018" } }
More info https://docs.mongodb.com/manual/reference/connection-string/#replica-set-with-members-on-localhost
-
@Adam-Whitlock Have you added the instances IP address in the mongod.conf?
-
I have put the config in like this:
{ "mongo": { "host": "this-is-the-first-shard.mongodb.net,shard2-name-here.mongodb.net,shard3-namehere.mongodb.net", "port":"27017,27017,27017" } }
since they all have the same port number should I do it more like @baris second example with the
{ "mongo": { "uri": "mongodb://127.0.0.1,127.0.0.1:27018" } }
? Thank you for the help
-
Hi everyone,
I'm using mongo through mongo atlas and i can't connect to it with NodeBB. I tried all you guys have told on this topic.
my config.json
{ "url": "http://0.0.0.0", "secret": "f9afd3e8-5384-403a-89a9-5cc08416a543", "database": "mongo", "port": [4567, 4568, 4569], "mongo": { "uri": "mongodb://xxt-shard-00-00-00rd1.mongodb.net,xxx-xxx-xxx-shard-00-00-00rd2.mongodb.net,xxxx-xxx-xxx-shard-00-00-00rd3.mongodb.net:27017", "database": "nodebb", "username": "xxx", "password": "xxx" } }
can you guys give me a tip?
thanks.
-
@deha said in Connection to MongoDB that is hosted on atlas:
ssl: true,
authSource: 'admin',
replicaSet:'Cluster1-shard-0'Easiest thing now, get the 3.4 and older API for apps from Atlas and use the URI in the setup and voila.