Skip to main content
Version: 2.0.0

Core

This is the core configuration for server OpenSSO.

config.js
const config = {
// CORE
host: '0.0.0.0', // Host Server (default is 0.0.0.0)
port: 3000, // Port Server (default is 3000)
logger: true, // Server Log (default is true)
trustProxy: false, // Server will trust proxy (default is false)
useWorker: false, // Use CPU as worker. Please don't use this if you're at shared hosting. (default is false)
maxParamLength: 100, // Maximum url parameter query length (default is 100 characters)
// ---
}

Description:

  • host is the ip address for OpenSSO to be accessed, default is using 0.0.0.0.
  • port is the port for OpenSSO to be accessed, default is using 3000.
  • trustProxy is server will trust the proxy, if OpenSSO sitting behind nginx then you can set trustProxy to true. Default is false.
  • logger is the server log, if you set to true then it will log everything, good for debuging. Default is true.
  • useWorker if set to true then OpenSSO will create multiple instance automatically by CPU count.
  • maxParamLength is the maximum url parameter for query length. Default is 100 characters.
For Production

For production, you have to set logger to false to reduce the memory process.

use Worker

Use worker will be a good choice if you run OpenSSO on single dedicated server or virtual private server.

Don't use Worker
  1. On docker environment.
  2. On shared hosting.