Impossible to install NodeBB!
-
Hi, Last time I was able to install NodeBB on Google cloud after many attempts to test it before I use it for a real website. Now I want to install it again so I can connect a domain for a real website but it has become impossible to install it. I tried more than 20 times but no luck. I followed the Ubntu 22.04 & 20.04 installation instructions but nothing seems to work. The Digitalocean installion guide is totally not working. I think the instructions are outdated and need some update. When I was installing NodeBB the only two things I changed are (1) I changed v2 to v3, (2) I used the official MongoDB installation guide because when I followed the guide by NodeBB.org it kept saying "you have broken packages". Once I put the "./nodebb setup'' command and the process started it goes up to the section where it asks for MongoDB database name. Then it takes a while without asking more input like email address and says ''NodeBB Setup Aborted''. When I put the ''./nodebb start'' command it initiates the process but takes forever without doing anything. I followed each and every step of the guide but it is totally impossible to install Nodebb. I'm not sure if it is related to the current update or something else. What do you think is the issue?
-
@Cannybird Your MongoDB instance is bound to the loopback interface. You should access it under
127.0.0.1
instead of your server external IP address. When running setup (or now in yourconfig.json
) you should change your MongoDB ip to127.0.0.1
Similarly if you run
mongosh mongodb://35.233.236.85:27017
it probably won't work.If you want MongoDB to respond on any IP, you can bind it to
0.0.0.0
instead, but unless you're planning on accessing it directly from a remote location, you probably don't want to do that (or at least should lock the port down using some firewall).@dave1904 said in Impossible to install NodeBB!:
According to the docs, first install mongodb then nodejs. But not sure if it makes any difference.
It doesn't, fortunately (or at least, really shouldn't - if you MongoDB installation affects your NodeJS install, something went really wrong)
-
Did you configure mongodb as written in the docs? Check step 7:
-
@dave1904 I missed that section. I used this NodeBB & this Mongodb installation guides. Actually when I used the command "nano /etc/mongodb.conf'' it was not opening the .conf file so I googled how to open it and found "sudo nano /etc/mongod.conf" command. With that command I was able to open the .conf file and put ''security:
authorization: enabled". But last time I was able to install NodeBB with the same installation guide I followed. Anyways I am going to create another Google cloud instance and try again. By the way should I install Node.js or mongoDB first?
-
@Cannybird Your MongoDB instance is bound to the loopback interface. You should access it under
127.0.0.1
instead of your server external IP address. When running setup (or now in yourconfig.json
) you should change your MongoDB ip to127.0.0.1
Similarly if you run
mongosh mongodb://35.233.236.85:27017
it probably won't work.If you want MongoDB to respond on any IP, you can bind it to
0.0.0.0
instead, but unless you're planning on accessing it directly from a remote location, you probably don't want to do that (or at least should lock the port down using some firewall).@dave1904 said in Impossible to install NodeBB!:
According to the docs, first install mongodb then nodejs. But not sure if it makes any difference.
It doesn't, fortunately (or at least, really shouldn't - if you MongoDB installation affects your NodeJS install, something went really wrong)
-