Skip to main content

Advanced Server Configuration

Configuration via Java System Properties

This advanced server configuration uses Java system properties.

In unusual cases where the config.yml cannot be modified easily, or you wish to temporarily override a value within it, an advanced option allows overriding values within it bypassing special Java system properties when starting IQ Server.

Property overrides must start with prefix dw. - followed by a dot-separated path to the configuration value being overridden.

Example Java Command Overriding Logging Level with System Properties

java -Ddw.logging.level=TRACE -jar nexus-iq-server-*.jar server config.yml 2> stderr.log

Example Java Command Overriding baseUrl with System Properties

java -Ddw.baseUrl=http://iq.example.com -jar nexus-iq-server-*.jar server config.yml 2> stderr.log

Configuration via Environment Variables

The config.yml can be set to consume environment variables.

For example, you could set the IQ Server application port to the value of an environment variable IQ_PORT as follows

server:
  applicationConnectors:
    - type: http
      port: ${IQ_PORT}

You can also set a default value, to be used if the environment variable is not set as follows

server:
  applicationConnectors:
    - type: http
      port: ${IQ_PORT:-8070}

Note

When an environment variable is not set and/or does not have a default value, the IQ Server will use the variable as a string literal.

You can nest environment variables, for example with IQ_HOST=PROD and IQ_PORT_PROD=8070

server:
  applicationConnectors:
    - type: http
      port: ${IQ_PORT_${IQ_HOST}}

then ${IQ_HOST} would resolve to PROD and ${IQ_PORT_PROD} would resolve to 8070.