Fedora 33+
This was tested on Fedora 33. It will likely work on slightly older or newer verisons, with zero changes.
Fedora does not natively support MongoDB because of the license. Therefore, this guide will use PostgreSQL.
First you need to make sure that Fedora is up to date, you can do so using this command:
Now, you install the base software stack:
Initialize the PostgreSQL database
Enable and start the database
Update the firewall to allow the needed connections
Tell SELinux to allow the webserver to connect to the local network
Create user and database to be used by NodeBB * This spews an error about changing directories, but still creates.
sudo -u postgres psql -c "create user nbbuser with encrypted password 'SomeLongPasswordForTheUser'"
sudo -u postgres psql -c "create database nodebbdb"
sudo -u postgres psql -c "grant all privileges on database nodebbdb to nbbuser"
Set a password for the admin user (postgres)
Update PostgreSQL to use database user login information.
Restart PostgreSQL
Create application directory.
Next, clone the NodeBB repository: * As of the creation of this guide, the current branch is v2.x * Update accordingly
Note
To clone the master branch you can use the same command with out the "-b v2.x" option.
It is bad practice to run NodeBB as a privileged user, so create a user
Set ownership of the NodeBB folder to the user that will be running the application
Change directory and then initiate the setup script by running the app as the nodebb user with the setup flag:
The wizards will ask what database to use, make sure you specify postgres and then use the same information as used above when the database was created.
Lastly, we run the forum, again as the nodebb user.
NodeBB can also be started with helper programs, such as forever.
Take a look at the options here.