Skip to main content

Advanced Server Configuration

Configuring with 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

Configuring with Environment Variables

Values in the config.yml may be set using system environment variables. 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.

Setting the IQ Server application port

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

Set a default value to use when the environment variable is not set

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.

Nesting environment variables are also supported. In the following example, the ${IQ_HOST} resolves to PROD and ${IQ_PORT_PROD} resolves to 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.