Setting up NodeBB on cloud 9
-
On the dashboard click on "Create a new workspace"
On the Create a new workspace page, enter a name for the workspace. Enter
https://github.com/NodeBB/NodeBB.git
for "Clone from Git or Mercurial URL".Pick "Node.js" option from the "Choose a template section" and click "Create workspace"
The workspace will be created and you will be redirected to the IDE.
If you want to use the master branch (development branch) of NodeBB then skip the next step.
Type
git checkout v1.x.x
in the terminal to switch to the stable version of NodeBB (use the branch for the latest stable release)Cloud 9 workspaces have MongoDB preinstalled. You need to start it. Follow these instructions to start MongoDB
$ mkdir data $ echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest "$@"' > mongod $ chmod a+x mongod $ ./mongod &
The
&
in the last command lets you exit the MongoDB shell by usingctrl + c
without shutting down the dbMoving on to NodeBB installation and setup...
Run
npm install --production
to install all NodeBB dependenciesNodeBB setup will install the MongoDB dependencies when we pick mongo as the database and it requires a system module to be installed. Run this to install the module
sudo apt-get update sudo apt-get install libkrb5-dev
Run
./nodebb setup
to start the NodeBB setupThe easiest way to get the URL is to use the "Preview -> Preview running application" in the IDE menu.
This will open a browser window right next to the terminal. Copy the url from that window but do not include the
/
at the end. So in my case the URL ishttps://nodebb-pichalite1.c9users.io
-
Use that as the URL and press enter
-
press enter to accept the default secret
-
type mongo and press enter for which database to use (if you are using v0.9.x branch, the default will show up as redis and for master the default is mongo)
-
you can press enter for the rest of the DB related questions or enter the details if you have a db and user setup in mongodb
-
the setup will ask you for admin username, email and password... enter them
You will see this message if everything goes well...
Run
./nodebb start
to start NodeBBUse the URL entered before or click on "Preview -> Preview running application" from the menu to open NodeBB.
Login with the admin username/password you entered during the setup.Cloud 9 freezes the workspaces frequently when you are not using them. Once you go to the IDE for your workspace, run
./mongod &
to startup MongoDB and then run./nodebb start
to start NodeBBEDIT: Looks like cloud 9 is not shutting down mongodb cleanly before going to hibernate.
If you get aexception in initAndListen: 12596 old lock file, terminating
error... try this...$ rm data/mongod.lock $ ./mongod &
-
-
Nice tutorial!
-
I actually used this tutorial a few days ago, and it worked perfectly. (although after all that I really can't give up sublime as my preferred editor, also my computer is a just a touch too slow for a web-based IDE)
That said, awesome tutorial and thanks for contributing
-
OMG thank you! Gonna use this to make a forum for my class
-
any staff online? I need help
-
So I'm attempting to use this walkthrough to setup a gaming forum. I'm having issues with the install.
I have very limited experience, anyone with more knowledge able to do a review of this walk through and fix any issues? It would be greatly appreciated. Thanks.
-
@apple-pro said in Setting up NodeBB on cloud 9:
sudo apt-get -y mongodb-org
It's actually:
sudo apt-get install -y mongodb-org
Also, thanks for the guide. This should replace: https://docs.nodebb.org/installing/cloud/cloud9/ (didn't work for me).
-
[2670] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error: failed to connect to server [127.0.0.1:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
Urgent help required