Second try at Install still not success

Technical Support
  • Hi,

    I'm trying to install on ubuntu I went through the install guide, but am having issues connecting to the mongodb. I've issued this command:

    > db.createUser( { user: "nodebb", pwd: "<Enter in a secure password>", roles: [ "readWrite" ] } )

    However there is no success when attempting to connect.

    I type:

    mongo -u user -p password

    and it will not authenticate

    I've also tried starting the

    node app --setup

    & it fails to authenticate.

    After creating a nginx vhost, and creating a symbolic link to the directory /var/www/nodebb, chown: to webuser, this is the error in nginx logs

    /var/www/nodebb/" failed (13: Permission denied)

    So it seems this is related to the lack of database connection. I have parsed the conf files of mongodb & nodebb but nothing is popping out.

    Any clues?



    I noticed with the webinstaller it defaults to creation of database (0), I kept this default. Was I supposed to replace this with anything else? When I run the node app --setup it shows the same (0) default, so I didn't think that was an issue.

    Here is the output from that command

    This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
    Press enter to accept the default setting (shown in brackets).
    URL used to access this NodeBB (
    Please enter a NodeBB secret (ec0fa747-0fa5-4e83-acf3-d1e470a0122a)
    Which database to use (mongo)
    2/4 13:11 [7771] - info: Now configuring mongo database:
    Host IP or address of your MongoDB instance (
    Host port of your MongoDB instance (27017)
    MongoDB username (webeindustry)
    Password of your MongoDB database
    Which database to use (0)
    Configuration Saved OK
    2/4 13:12 [7771] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: auth failed
    2/4 13:12 [7771] - warn: NodeBB Setup Aborted.
    MongoError: auth failed
    at Function.MongoError.create (/root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
    at commandCallback (/root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:1136:66)
    at Callbacks.emit (/root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:116:3)
    at null.messageHandler (/root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:291:23)
    at Socket.<anonymous> (/root/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:285:22)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at Socket.Readable.push (_stream_readable.js:111:10)
    at TCP.onread (net.js:531:20)

    Okay it was my goof, I replaced the (0) with "mongo" it's now success in process of creating admin user.

    I'm still getting the 404 error, the root directory ~/nodebb is the webroot, or is this not correct?

    So it resolves when using the 4567 port, I must setup a reverse proxy to push this through 80? Something must be amiss.

    Apparently that is standard behavior for nodebb, so I added the reverse proxy.

    All issues resolved.

  • @webeindustry which version of ubuntu? did you install mongodb?

    sudo apt-get install -y mongodb-org
  • xenial beta 2

    Yes, I installed mongodb. I've got it all sorted. Thanks for replying.

Suggested Topics

  • 0 Votes
    3 Posts

    I understand. However, it's very likely users are the same because almost everyone is connecting via external provider (GitHub mainly)

  • 0 Votes
    2 Posts

    Try using digital ocean instead of open shift as we do not provide support for the latter.

  • Error After Install

    Solved Technical Support
    1 Votes
    15 Posts

    I had the same problem when I was playing with NodeBB on a $2.5 vps from Vultr (=512MB ram). htop shows me that build process uses all available ram and cpu. Deploying on a decent machine/vps would solve the problem, aternatively, I called build steps one at a time ( eg ./nodebb build languages , ./nodebb build 'client side styles' etc) . Hope this helps.

  • 0 Votes
    1 Posts


    i read in another post ( ) that you should be able to use node v6. Since i did not find anything related to which version some should use.

    The current Dockerfile suggest using v4 but the file was updated long time ago.

    The docs also do not really say which version some should use (at least i didnt find it here: Since the docs are mentioning wheezy i suspect they are outdated too.

    I would suspect using v6 would be fine since this is the latest LTS now. Which version should is use?

    Best wishes,

  • 0 Votes
    14 Posts

    This might be just me, but I wouldn't be loading that under root directory. Create a new user and use that for nodebb location under home location. As to nodebb not showing up. What does your nodebb config, and nginx config look like? I don't know what you mean by debian comes with nginx already. Sure might be in the repo but shouldn't come installed, Unless a script you ran installed it for you.