nodeBB requires nodeJS, git and mongoDB to be installed on the ubuntu server. NodeJS is the Javascript server, mongoDB is the database and git allows to copy the code from the online git repository to the web server.
NodeJS installation
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
MongoDB installation & configuration
>sudo apt-get install mongodb-server
>mongo
>use nodebb
>db.createUser({user: “mongoadmin”,pwd: “yourpass”,roles: [“readWrite” ]})
>use admin
>db.createUser( { user: “admin”, pwd: “yourpassword”, roles: [ { role: “readWriteAnyDatabase”, db: “admin” }, { role: “userAdminAnyDatabase”, db: “admin” } ] } )
>exit
>echo “auth=true” >> mongodb.conf
>sudo systemctl restart mongodb
nodeBB script installation
>sudo apt-get install nodejs && sudo apt-get install npm git
>cd yourfolder
>git clone -b v1.10.x https://github.com/NodeBB/NodeBB.git nodebb
>cd nodebb
./nodebb setup
>nano config.json // in the url replace the localhost with the IP, hostname that you will use to access the forum. example: “url”: “http://192.168.1.203:4567″,