How to Install NodeBB on Debian Latest?

NodeBB is an open-source forum software that allows users to create online forums with ease. This tutorial will guide you through the steps to install NodeBB on Debian Latest.

Prerequisites

Before installing NodeBB, it is important to ensure that your Debian system has the following prerequisites:

  1. Node.js
  2. MongoDB
  3. Git

If you haven't already installed these, you can use the following commands to do so:

sudo apt update 
sudo apt install nodejs npm git mongodb 

Step 1: Clone NodeBB repository

First, clone the NodeBB repository from their official GitHub account. You can run the following command to do so:

git clone -b v1.16.x https://github.com/NodeBB/NodeBB.git nodebb 

This will download NodeBB to a directory named 'nodebb.'

Step 2: Install NodeBB

Navigate to the NodeBB directory using the following command:

cd nodebb 

Then install NodeBB and its dependencies using npm with the following command:

sudo npm install --production 

The installation process may take some time, depending on your system's specifications.

Step 3: Configure NodeBB

After installation is complete, the next step is to configure NodeBB.

First, configure the NodeBB URL in the 'config.json' file. Open the file using the following command:

nano config.json 

Then, replace the URL with your own domain name or IP address.

Next, set up MongoDB by creating a database and a user with the required permissions.

mongo 
> use nodebb 
> db.createUser({user: "nodebbuser", pwd: "your_password_here", roles: [{role: 'readWrite', db: 'nodebb'}]}); 

Then, configure the database URL in the 'config.json' file by replacing the URL with the following line:

"mongo": {"host": "127.0.0.1", "port": "27017", "username": "nodebbuser", "password": "your_password_here", "database": "nodebb"} 

Once these changes are made, save and exit the file.

Step 4: Start NodeBB

Finally, start NodeBB using the following command:

./nodebb start 

After starting NodeBB, you can access it in your browser at the URL you configured in Step 3.

Conclusion

In this tutorial, we have learned how to install NodeBB on Debian Latest. With NodeBB, you can easily create online forums to engage with your community.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!