• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.1 Latest
Buy Hosting

Complete List of possible Environment Variables

Scheduled Pinned Locked Moved Technical Support
environmentvariablesconfig.json
5 Posts 3 Posters 2.8k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MichaelM
    wrote on last edited by MichaelM
    #1

    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
    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by
    #2

    Only one is NODE_ENV afaik.

    1 Reply Last reply
    0
  • M Offline
    M Offline
    MichaelM
    wrote on last edited by
    #3

    NODE_ENV is a nodejs variable, not a NodeBB variable.

    1 Reply Last reply
    0
  • psychobunnyP Offline
    psychobunnyP Offline
    psychobunny
    wrote on last edited by
    #4

    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

    1 Reply Last reply
    0
  • M Offline
    M Offline
    MichaelM
    wrote on last edited by
    #5

    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.

    1 Reply Last reply
    2

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development