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-variables

    This 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 with mongo for MongoDB.
      • redis__password=<password>
      • redis__host=myredishost.example.com
    • Mongo Only:
      • mongo__username=mongousername

  • Community Rep

    Only one is NODE_ENV afaik.



  • NODE_ENV is a nodejs variable, not a NodeBB variable.


  • Admin

    The ones you listed override the config.json. The underscores are hash__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.


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.