Great news, but could we have a simple Share to Mastodon button before all that?
Jakub Urbanowicz
Posts
-
January Update on ActivityPub Development -
Change user running nodebb & other startup issues -
Change user running nodebb & other startup issues@B-738 said in Change user running nodebb & other startup issues:
try to use PM2 https://pm2.keymetrics.io
PM2 does much more than just start an app. Do you think I will need to change NginX proxy settings if I start nodebb with it? What if I increase the number of workers with pm2 scale app x?
-
Change user running nodebb & other startup issues@PitaJ said in Change user running nodebb & other startup issues:
You should probably move the NodeBB files out of homeuser's home if You're not planning on homeuser running it.
Yeah, seems so. Could you give me a gist of what steps I would need to take to move nodebb to e.g. /var/www, please?
-
Change user running nodebb & other startup issuesChanging the user is hard. Perhaps I will remove privileges from the existing user instead.
-
Change user running nodebb & other startup issues@B-738 looks great, thanks; I'll try and use it when I get changing nodebb ownership in order.
-
Change user running nodebb & other startup issues@Jakub-Urbanowicz
After reverting ownership to homeuser the forum starts correctly. -
Change user running nodebb & other startup issues@PitaJ said in Change user running nodebb & other startup issues:
There shouldn't be a problem with chown/chmoding the files directly, but you could always make a copy first instead.
Yes, there is a problem. I probably need to make some other changes besides chowning the nodebb directory and files, but I don't know what. I get the following errors
nodebb@sv:/home/homeuser/nodebb$ ./nodebb start node:internal/modules/cjs/loader:1147 throw err; ^ Error: Cannot find module '/home/homeuser/nodebb/nodebb' at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15) at Module._load (node:internal/modules/cjs/loader:985:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: [] } Node.js v20.11.0
-
Change user running nodebb & other startup issuesThank you for your answers. I'll be trying these changes later today and will report back.
-
Change user running nodebb & other startup issuesHi, I've just created my forum at bb.n66.pl using the following setup:
- architecture: arm64 VPS (netcup.de)
- OS: Ubuntu 22.04
- database: Mongodb 7.05
- proxy: NginX as automatically provided by Webinoly
- location: /home/user/nodebb
- coexisting software: WordPress installed using the Webinoly script
Nodebb seems to be working fine and I like it. A big thank you for making it available. But I'm not sure if it's safe running it as a user with sudo privileges. I think I should have created an unprivileged user and set up nodebb as such, which leads me to the following:
Question 1: Would it be OK to change ownership of the entire nodebb directory and its content at this moment when the forum is already set up?
Question 2: I'm starting nodebb with./nodebb start
, but I'm unable to get systemd to start it. I tried snippets (with relevant adjustments for the user and nodebb location) from nodebb docs and other web resources, but they lead to startup failure, or a bad gateway error. Can somebody publish a systemd unit that's actually working?