How to Install NodeBB on Elementary OS

In this tutorial, we will guide you through the installation process of NodeBB on your Elementary OS. Before going further, let's first talk about what NodeBB is.

NodeBB is a community forum platform that is built on Node.js. It is powered by Redis and Socket.io, which makes it fast and scalable. NodeBB is open-source and completely customizable, with a plugin system that allows users to add various functionalities to their forum.

Prerequisites

Before we start with the installation process, make sure you have the following prerequisites ready:

Step 1: Update your system

Before installing any new software, it's a good idea to update your system packages. You can do this by running the following commands:

sudo apt-get update
sudo apt-get upgrade

This will update all of the software packages on your server.

Step 2: Install Node.js and Redis

NodeBB requires Node.js and Redis to be installed on your system. You can install them by running the following commands:

sudo apt-get install nodejs npm redis-server

This will install Node.js and npm package manager along with the Redis database server on your server.

To check if Node.js and Redis are installed, run the following commands:

node --version
redis-cli ping

The commands should return the installed version of Node.js and "PONG" for Redis.

Step 3: Install NodeBB

Now it's time to install NodeBB. You can do this by following the below steps:

  1. First, create a directory where you want to install NodeBB. You can create it by running the following command:

    mkdir ~/nodebb
    cd ~/nodebb
    
  2. Next, clone the NodeBB repository by running the following command:

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

    This will clone the latest version of NodeBB to your server.

  3. Install NodeBB's dependencies by running the following command:

    sudo npm install --production --no-optional
    

    The command will install all the required dependencies for NodeBB.

  4. Now it's time to run NodeBB. You can do this by running the following command:

    ./nodebb start
    

    This will start NodeBB on port 4567. You can access NodeBB by navigating to http://yourdomain.com:4567.

    Note: If you want to run NodeBB on a different port, you can specify it by adding the -p option along with the port number. For example, to run NodeBB on port 80, you can run the following command:

    ./nodebb start -p 80
    
  5. To stop NodeBB, run the following command:

    ./nodebb stop
    

Step 4: Configure NodeBB

By default, NodeBB comes with a basic configuration file. You can modify this configuration file to suit your needs. The configuration file is located at ~/nodebb/config.json.

To make changes to the configuration file, you can use a text editor like Nano or Vim. For example, to edit the configuration file with Nano, you can run the following command:

nano ~/nodebb/config.json

Make the necessary changes to the configuration file and save the changes.

Conclusion

Congratulations! You have successfully installed NodeBB on your Elementary OS. You can now customize your forum, install new plugins and themes, and create a community forum as per your requirements.

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!