Skip to content

Configuration Environment Variables

tonyshearer edited this page Sep 17, 2014 · 5 revisions

Most of the configuration of CDNS takes place centrally in the admin console (point your browser to http://{server-ip}:3000/). However, there are a few deployment settings that are configured on a server-by-server basis using environment variables.

It is optional whether you set these environment variables. If unset, then the default values will be used.

Environment Variable Description Default Value
CDNS_DB_URL The URL used to connect to the database, including username and password. http://admin:cdnsadmin@localhost:5984
CDNS_PORT The port used by cdns-frontend to receive requests from end users. Note that on most Linux platforms if you set this to less than 1024 you will need to start the app as root using sudo (it will setuid back to the original user after binding to the port). 8888
CDNS_CONSOLE_PORT The port used by cdns-backend to serve the admin console 3000
CDNS_CONSOLE_USER The username for logging into the admin console admin
CDNS_CONSOLE_PASS The password for logging into tha admin console admin
CDNS_LOG_LEVEL The level of operations log verbosity. Possible values are error, warn, info, debug. info
CDNS_LOG_DIR The directory to write request logs to. This is only for request logs - operational logging is always direct to STDOUT log
CDNS_LOG_ROTATION_INTERVAL How frequently (in seconds) to open a new request log file. 3600
CDNS_LOAD_BALANCE_PERIOD The load balancer has targets to send a certain proportion of requests to a given CDN. Periodically the actual proportions achieved will be reset to 0. This is to make it easier to recover from a CDN being unavailable for an extended period. This config item controls how often the state is reset (in milliseconds) 60000
CDNS_STICKY_SESSION_TIMEOUT How much inactivity should we allow between requests of a 'sticky session' (in seconds) 30