Install NodeBB 1.10.2 on Fedora 28 with Mongo
- 
 Super simple to install NodeBB on a modern, updated OS. As always with my guides, run this as root.The basicsdnf install -y mongodb-server mongodb nodejs git nano policycoreutils-python-utils systemctl enable --now mongod firewall-cmd --add-port=4567/tcp --permanent firewall-cmd --reload semanage port -a -t mongod_port_t -p tcp 27017 semanage port -m -t http_port_t -p tcp 4567Setup Mongomongo use admin db.createUser( { user: "admin", pwd: "<Enter a secure password>", roles: [ { role: "readWriteAnyDatabase", db: "admin" }, { role: "userAdminAnyDatabase", db: "admin" } ] } ) use nodebb db.createUser( { user: "nodebb", pwd: "<Enter a secure password>", roles: [ { role: "readWrite", db: "nodebb" }, { role: "clusterMonitor", db: "admin" } ] } ) quit()Enable security in Mongonano /etc/mongod.conf # Append at end security: authorization: enabledRestart Mongosystemctl restart mongodVerify admin creds workmongo -u admin -p 'Your Password Here' --authenticationDatabase=admin # can omit the ' if no spaces in password quit()clone nodebb down from github intothe /opt/nodebb folderAs of this writing 1.20.2 is current on this branchgit clone -b v1.10.x https://github.com/NodeBB/NodeBB.git /opt/nodebbChange into the directory and run the setup wizardI will do this again later and get screenshots. the wizard asks a few questions that a novice might not be ready for.cd /opt/nodebb ./nodebb setupAnswer the setup questionsFor this one, you have to answer depending on if you have your FQDN ready or not. 
 If you have your FQDN ready then specify the actual URL. In my casehttps://obelisk.daerma.com
 If not, specify the IP addresshttp://10.254.0.107
  You can just hit enter here as this is randomly generated each time. 
  Specify the database being used. Obviously leave the default of mongo if you are following this guide. 
  You can leave this one blank if you want. If so, you will simply specify the pieces individually. 
  Personally, I like the single connection string. No idea why really, I just do. mongodb://nodebb:YourNodeBBPasswordFromAbove@localhost:27017/nodebbDoing the single connection string will earn you a warning in the log every time NodeBB starts about no mongo username/password. If you enter it properly, you will see this. 
  Now enter the initial Admin user info 
  You should see this if it successfully completed. 
  Start nodebb and show the logI say to use sloginstead ofstartjust to make sure you can see any errors../nodebb slogYou should see a startup log like this. 
  Verify it is up and runningNavigate to your site by IP or FQDN and specify port 4567. 
 http://your.ip.add.ress:4567
 http://nodebb.domain.com:4567 You are all doneNow you can setup your preferred reverse proxy solution, SSL, and anything else you want. If you setup the IP address earlierYou will need to update the /opt/nodebb/config.jsonfile to reflect the correct URL once you have your FQDN and reverse proxy in place.Also remember what I said about warnings. It is because the username and password are blank in the config.json.
  
- 
 NodeBB does not run a a standard port and you will never want it live to the internet this way. So you want to put NginX in front of it as a reverse proxy. 
- 
 Are we supposed to change the permissions on the /opt directory? I tried to run the setup and ran into all kinds of permissions errors. 
- 
 @mattbagan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo: Are we supposed to change the permissions on the /opt directory? I tried to run the setup and ran into all kinds of permissions errors. Try using sudo or switch to root to run the setup. 
- 
 @black3dynamite said in Install NodeBB 1.10.2 on Fedora 28 with Mongo: @mattbagan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo: Are we supposed to change the permissions on the /opt directory? I tried to run the setup and ran into all kinds of permissions errors. Try using sudo or switch to root to run the setup. I can see the confusion. I left a couple sudoin there.I always try to write my guides done as rootto prevent issues like this.For the people the know enough to not want to do something, as root, they generally will not need to ask.
- 
 OP updated to clarify to run as root. 
- 
 I ran through the whole setup with sudo and received the permissions error on ./nodebb setup. 
- 
 @mattbagan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo: I ran through the whole setup with sudo and received the permissions error on ./nodebb setup. What OS are you on? I've never had a problem with this. This guide was created because I had to setup a new instance the other day. The commands above are what is in my command history. 
- 
 @JaredBusch Fedora 28. After I changed the permissions to /opt I was able to run the setup. I am going to try it again later with a new instance. 
- 
 @mattbagan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo: @JaredBusch Fedora 28. After I changed the permissions to /opt I was able to run the setup. I am going to try it again later with a new instance. No changes. 
  
- 
 @mattbagan bingo. SELinux  
- 
 @JaredBusch that makes more sense. Any idea when you are going to finish the guide? I made it to the setup and can't answer some of the questions it asks. 
- 
 @mattbagan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo: @JaredBusch that makes more sense. Any idea when you are going to finish the guide? I made it to the setup and can't answer some of the questions it asks. Where did you get your error? I just did it again with SELinux enforcing and no error to this mpoint. 
  
- 
 nevermind.. The benchpres component puked. 
  
- 
 Good guide, NodeBB is a nice product. 
- 
 @mattbagan I would call this a nodebb problem, or potentially benchpress. Definitely running as rootnegates this issue.
- 
 @StuartJordan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo: Good guide, NodeBB is a nice product. I think so too. That is why I run my D&D forum on it. 
- 
 @JaredBusch Is D&D a game? 
- 
 @StuartJordan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo: @JaredBusch Is D&D a game? Dungeons and Dragons. 
- 
 @scottalanmiller ah gotcha, wasn't that a really popular board game in the 90s if I memory serves me correctly? 



