NodeCG Configuration

NodeCG is configured via a cfg/nodecg.json file with the following schema:

Schema

  • host String The IP address or hostname that NodeCG should bind to.
  • port Integer The port that NodeCG should listen on.
  • baseURL String The URL of this instance. Used for things like cookies. Defaults to HOST:PORT. If you use a reverse proxy, you\'ll likely need to set this value.
  • developer Boolean Whether to enable features that speed up development. Not suitable for production.
  • exitOnUncaught Boolean Whether or not to exit on uncaught exceptions.
  • logging Object Contains other configuration properties.
    • replicants Boolean Whether to enable logging of the Replicants subsystem. Very spammy.
    • console Object Contains properties for console logging.
      • enabled Boolean Whether to enable console logging.
      • level String Lowest importance of messages which should be logged. Must be "trace", "debug", "info", "warn" or "error"
    • file Object Contains properties for file logging.
      • enabled Boolean Whether to enable file logging.
      • path String The filepath to log to.
      • level String Lowest importance of messages which should be logged. Must be "trace", "debug", "info", "warn" or "error"
  • bundles Object Contains configuration for bundles.
    • enabled Array of strings A whitelist array of bundle names that will be the only ones loaded at startup. Cannot be used with bundles.disabled.
    • disabled Array of strings A blacklist array of bundle names that will not be loaded at startup. Cannot be used with bundles.enabled.
    • paths Array of strings An array of additional paths where bundles are located.
  • login Object Contains other configuration properties.
    • enabled Boolean Whether to enable login security.
    • sessionSecret String The secret used to salt sessions.
    • forceHttpsReturn Boolean orces Steam & Twitch login return URLs to use HTTPS instead of HTTP. Useful in reverse proxy setups.
    • local Object Contains local username & password login configuration properties.
      • enabled Boolean Whether to enable Local authentication.
      • allowedUsers Array of objects Which usernames and passwords to allow. Example: {"username": "admin", "password": "foo123"}
    • steam Object Contains steam login configuration properties.
    • twitch Object Contains twitch login configuration properties.
  • ssl Object Contains HTTPS/SSL configuration properties.
    • enabled Boolean Whether to enable SSL/HTTPS encryption.
    • allowHTTP Boolean Whether to allow insecure HTTP connections while SSL is active.
    • keyPath String The path to an SSL key file.
    • certificatePath String The path to an SSL certificate file.
    • passphrase String The passphrase for the provided key file.
  • sentry Object Contains Sentry configuration properties. - enabled Boolean Whether to enable Sentry error reporting. - dsn String Your private DSN, for server-side error reporting. - publicDsn String Your public sentry DSN, for browser error reporting.

Example Config

{
"host": "0.0.0.0",
"port": 9090,
"developer": false,
"bundles": {
"enabled": ["bundle-name"],
"paths": ["C:\\nodecg\\experimental-bundles"]
},
"login": {
"enabled": true,
"sessionSecret": "supersecret",
"steam": {
"enabled": true,
"apiKey": "YYYYY",
"allowedIds": ["11111111111111111", "22222222222222222"]
},
"twitch": {
"enabled": true,
"clientID": "your_app_id",
"clientSecret": "your_app_key",
"scope": "user_read",
"allowedUsernames": ["some_username"]
}
},
"logging": {
"replicants": false,
"console": {
"enabled": true,
"level": "trace"
},
"file": {
"enabled": true,
"path": "logs/server.log",
"level": "info"
}
},
"ssl": {
"enabled": false,
"keyPath": "",
"certificatePath": ""
},
"sentry": {
"enabled": true,
"dsn": "https://xxx:yyy@sentry.io/zzz",
"publicDsn": "https://xxx@sentry.io/zzz"
}
}
Last updated on by Clubwho