• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

How to Install NodeBB on CentOS 7

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
40
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Step 1: Update the system
  3. Step 2: Install dependencies for NodeBB
  4. Step 3: Install NodeJS using nvm
  5. Step 4: Install NodeBB
  6. Step 6: Setup an Nginx reverse proxy
  7. Step 7: Modify firewall rules in order to allow visitors’ access:
  8. Step 8: Access NodeBB
  9. Want to contribute?


NodeBB is a modern, open source, and NodeJS-based forum software.

With customers in mind, NodeBB offers community owners powerful features and ease of use to drive community engagement.

In this article, we will be installing NodeBB on CentOS 7.

Prerequisites

  • A newly deployed Vultr CentOS 7 x64 server instance at least 1 GB RAM.
  • Logging in as the root user.
  • The EPEL yum repository.

Step 1: Update the system

Log in to your server via SSH using the sudo user to install epel, update the system, and restart to apply the updates.

yum install epel-release -y
yum update -y && sudo shutdown -r now

Step 2: Install dependencies for NodeBB

Next, we will install all the NodeBB required system dependancies:

yum -y groupinstall "Development Tools"
yum -y install git redis ImageMagick npm

Start redis and make it run at each and every system startup:

systemctl start redis.service
systemctl enable redis.service

Step 3: Install NodeJS using nvm

Use the following commands to install NodeJS v6.9.5—the latest LTS release of NodeJS at the time this article was written.

Note: The second command below will invoke nvm v0.33.0, the latest release of nvm at the time of writing this article. You can always check out the latest release of nvm here and then modify that command accordingly.

cd
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
source ~/.bash_profile
nvm list-remote
nvm install v6.9.5

Step 4: Install NodeBB

Install the latest release of NodeBB, NodeBB v1.4.3, as follows:

cd /opt
git clone -b v1.4.3 https://github.com/NodeBB/NodeBB nodebb
cd nodebb
npm install

After the installation, run the ./nodebb script with the setup flag in order to setup NodeBB:

./nodebb setup

Answer a few questions as follows in order to use the default settings with a redis database. When appropriate, press Enter to accept the default setting shown in brackets.

  • URL used to access this NodeBB (http://localhost:4567) <Enter>
  • Please enter a NodeBB secret (bb3244f1-3a7e-4ee2-bc77-5032fd4c8b00) <Enter>
  • Which database to use (mongo) redis
  • Host IP or address of your Redis instance (127.0.0.1) <Enter>
  • Host port of your Redis instance (6379) <Enter>
  • Password of your Redis database <Enter>
  • Which database to use (0..n) (0) <Enter>
  • Administrator username admin
  • Administrator email address [email protected]
  • Password yourpassword
  • Confirm Password yourpassword

Having NodeBB successfully installed and configured, you can manually start/stop/restart NodeBB by running:

./nodebb start
./nodebb stop
./nodebb restart

Step 5: Keep NodeBB running using forever

Forever is a tool which can keep nodejs-based app running. In production, this is a useful feature.

First, you need to stop NodeBB:

./nodebb stop

Install forever globally:

npm install forever -g

Start NodeBB using forever:

cd /opt/nodebb
forever start app.js

You can confirm that NodeBB is running using a curl command:

curl -I http://localhost:4567

The output should resemble:

HTTP/1.1 200 OK
X-Powered-By: NodeBB
X-Frame-Options: SAMEORIGIN
Access-Control-Allow-Origin: null
Content-Type: text/html; charset=utf-8
Content-Length: 19845
ETag: W/"4d85-cXlw1a5DyxHkfjSEd7Ru5Q"
set-cookie: express.sid=s%3AqoIQ1-JSyw1tvrrhyXiP7Sm5D-gDJ9HT.Aum4qMXBPiCgZ7Il%2BtrePafZJWEt2dIJlS%2BBTRZjWZs; Path=/; Expires=Sun, 26 Feb 2017 15:14:35 GMT; HttpOnly
Vary: Accept-Encoding
Date: Sun, 12 Feb 2017 15:14:36 GMT
Connection: keep-alive

Step 6: Setup an Nginx reverse proxy

Since NodeBB is running on localhost by default, you need to setup an Nginx reverse proxy in order to allow web access.

Install Nginx using YUM:

yum install nginx -y

Modify Nginx settings:

vi /etc/nginx/nginx.conf

Find the location / {} segment within the http {} segment:

http {

    location / {
    }

}

Insert the below lines into the location / {} segment:

    proxy_pass http://127.0.0.1:4567;
    proxy_http_version 1.1;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_cache_bypass $http_upgrade;

The final result should be:

http {

location / {
    proxy_pass http://127.0.0.1:4567;
    proxy_http_version 1.1;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_cache_bypass $http_upgrade;
}

}

Save and quit:

:wq!

Start and enable the Nginx service:

systemctl start nginx.service
systemctl enable nginx.service

Step 7: Modify firewall rules in order to allow visitors’ access:

firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd --reload

Step 8: Access NodeBB

Finally, point your web browser to http://203.0.113.1 to visit the newly created NodeBB website. You can log in using the admin credentials you setup earlier. Feel free to navigate and customize NodeBB after logging in as the administrator.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install Thelia 2.3 on CentOS 7

Next Post

Installing Odoo 10 Community on CentOS 7

Next Post

Installing Odoo 10 Community on CentOS 7

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet