Complete List of possible Environment Variables
-
I've been searching both this forum and the documentation site and I have been unable to find a list of all the possible environment variables that can be passed to NodeBB on startup.
Some of them can be found here:
https://community.nodebb.org/topic/4325/set-up-nodebb-via-environment-variablesThis config.json documentation is here: https://docs.nodebb.org/en/latest/configuring/config.html
Can somebody please provide the complete list?
These are the variables I know of because I'm using them:
url=http://localhost:4567/forum
Used to tell NodeBB where to run, also to define a subfolder.defaultTheme
: Override default (Persona) theme. This has to be set to the npm package name of the theme you want to default to.database=redis|mongo
Used to define which Database to use (redis or Mongo).redis__database=#
where # is the number of the redis database to use. Note: 2 underscores between redis and database.- For these replace
redis
withmongo
for MongoDB.redis__password=<password>
redis__host=myredishost.example.com
- Mongo Only:
mongo__username=mongousername
-
Only one is
NODE_ENV
afaik. -
The ones you listed override the
config.json
. The underscores arehash__value
in the config (that's how nconfig works), so just look into the config file and that's pretty much what you can override -
On that note, a fully written out "demo"
config.json
file (or even a couple of them, one for Mongo and one for Redis) would be a nice to have in the documentation article about the nodebb config (in addition to the explanations of what each entry does).I'm willing to throw that together if others would find it useful.