NodeBB is a powerful and flexible open-source forum software that can be easily installed on a Ubuntu 24.04 server. In this article, we will guide you through the process of installing NodeBB and setting up an Nginx proxy to allow secure access to your forum.
Step 1: Update the System
Before proceeding with the installation, make sure your Ubuntu server is up to date by running the following commands:
sudo apt update
sudo apt upgrade
Step 2: Install Node.js and Redis
NodeBB requires Node.js and Redis to be installed on your server. You can install them by running the following commands:
sudo apt install nodejs
sudo apt install npm
sudo apt install redis-server
Step 3: Install NodeBB
To install NodeBB, clone the official repository from GitHub and install the required dependencies by running the following commands:
git clone -b v1.x.x https://github.com/NodeBB/NodeBB.git
cd NodeBB
npm install
Replace “v1.x.x” with the latest version of NodeBB available.
Step 4: Configure NodeBB
Next, run the following command to launch the NodeBB setup wizard:
./nodebb setup
Follow the on-screen instructions to configure your forum, such as database settings, administrator account, and email settings.
Step 5: Start NodeBB
After the setup is complete, start NodeBB by running the following command:
./nodebb start
You can access your forum by navigating to http://
Step 6: Set Up Nginx Proxy
To secure your NodeBB forum with SSL, you can set up an Nginx proxy. First, install Nginx by running the following command:
sudo apt install nginx
Next, create a new Nginx configuration file for your NodeBB forum:
sudo nano /etc/nginx/sites-available/nodebb
Add the following configurations to the file:
server {
listen 80;
server_name example.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:4567;
proxy_redirect off;
# Socket.IO Support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
}
}
Replace “example.com” with your domain name.
Enable the Nginx configuration by creating a symbolic link to the sites-enabled directory:
sudo ln -s /etc/nginx/sites-available/nodebb /etc/nginx/sites-enabled/nodebb
Restart Nginx for the changes to take effect:
sudo systemctl restart nginx
Now your NodeBB forum should be accessible via HTTPS at https://example.com.
In conclusion, installing NodeBB with an Nginx proxy on a Ubuntu 24.04 server is a straightforward process that can be completed in just a few steps. By following this guide, you can quickly set up a secure and stable forum platform for your community.