# Environment Variables

## DecisionRules Environment Variables

All variables can be set either in the docker-compose configuration file or directly as a command-line parameter before running the containers.

### Server environment variables

<table><thead><tr><th width="238">Variable name</th><th>Description</th><th width="95">Mandatory</th><th width="124">Version</th><th>Example value</th></tr></thead><tbody><tr><td>REDIS_URL</td><td>Redis URL</td><td>Yes</td><td></td><td>redis(s)://host.docker.internal:6379</td></tr><tr><td>SOLVER_REDIS_URL</td><td>Redis URL for solver</td><td>Yes</td><td>Not needed from version 1.6.0, will use REDIS_URL instead</td><td>redis(s)://host.docker.internal:6379</td></tr><tr><td>MONGO_DB_URI</td><td>Mongo URL</td><td>Yes</td><td></td><td>mongodb(+srv)://host.docker.internal:27017</td></tr><tr><td>CLIENT_URL</td><td>Url on which client container is accessible</td><td>Yes</td><td></td><td>http://localhost:80/<strong># (# is mandatory)</strong></td></tr><tr><td>LICENSE_KEY</td><td>License key string</td><td>Yes</td><td></td><td>YOUR LICENSE KEY</td></tr><tr><td>DB_TYPE</td><td>Specify MongoDB type</td><td>If you use CosmosDB or DocumentDB</td><td>Available from 1.8.2</td><td>MONGODB (default)<br>COSMOSDB<br>DOCUMENTDB</td></tr></tbody></table>

### License Key Validation

Your server must have access to host <https://license.decisionrules.io/>. You won't be able to start the container without the connectivity to the license server.

### Optional server environment variables

<table><thead><tr><th width="249">Variable name</th><th>Description</th><th>Mandatory</th><th width="88">Version</th><th>Example value</th></tr></thead><tbody><tr><td>BRAND_LOGO_URL</td><td>Custom brand Logo URL. Feature must be enabled in license key </td><td>No</td><td>1.17.0</td><td>https://example.com.img/logo.ong <strong>OR</strong> <em>data:image/png;base64,iVBORw0KGgoAAAANSUhE...</em> </td></tr><tr><td>API_URL</td><td>For sophisticated On-Premise deployments. Lets the server know it's own address for Rule Flow and dependant rule solves.</td><td>No</td><td></td><td>https://api.decisionrules.io</td></tr><tr><td>SHOWCASE</td><td>Turn on or off showcase mode</td><td>No</td><td></td><td>true/false</td></tr><tr><td>WORKERS_NUMBER</td><td>Sets number of workers (threads) of application</td><td>No</td><td></td><td>1</td></tr><tr><td>BI_MONGO_DB_URI</td><td>If you have a separate database cluster for Business Intelligence App</td><td>No</td><td>From version 1.10.0</td><td>mongodb(+srv)://host.docker.internal:27018</td></tr><tr><td>SAML_ENTRY_POINT</td><td>URL for your identity provider login page</td><td>No</td><td></td><td>https://devX.okta.com/app/name/HASH/sso/saml</td></tr><tr><td>SAML_ISSUER</td><td>Issuer string to supply to IdP</td><td>No</td><td></td><td>okta.com/HASH_STRING</td></tr><tr><td>SAML_CERT</td><td>Public certificate of provider. In RAW format as single line withou BEGIN CERTIFICATE and END CERTIFICATE</td><td>No</td><td></td><td>MIIC8DCCAdigAwIBAgIQap4GhMRA26tJGFD.....</td></tr><tr><td>SAML_CALLBACK_URL</td><td>Callback URL where provider send response</td><td>No</td><td></td><td>https://api.decisionrules.io/saml/callback</td></tr><tr><td>RF_TIMEOUT</td><td>Time in milliseconds after which the process of solving a <strong>rule flow</strong> is stopped</td><td>No</td><td></td><td>5000</td></tr><tr><td>SR_TIMEOUT</td><td>Time in milliseconds after which the process of solving a <strong>scripting rule</strong> is stopped</td><td>No</td><td></td><td>5000</td></tr><tr><td>RF_NODE_LIMIT</td><td>Integer of desired rule flow nodes, default value is 30</td><td>No</td><td></td><td>30</td></tr><tr><td>SWAGGER_HOST</td><td>Host of the server application which will use swagger</td><td>No</td><td></td><td>api.decisionrules.io</td></tr><tr><td>WHITELIST</td><td>List of allowed domains from which it is possible to register or log in. You can setup multiple domains separated with comma.</td><td>No</td><td></td><td>mydomain.com, yourdomain.io</td></tr><tr><td>ALLOWLIST</td><td>Cultural-neutral synonym for WHITELIST.</td><td>No</td><td></td><td>mydomain.com, yourdomain.io</td></tr><tr><td>TELEMETRY</td><td>It turn on/off telemetry, which measures endpoint execution duration (for example: Solver API)</td><td>No</td><td>Available from 1.8.1</td><td>On = 1, off = 0</td></tr><tr><td>EXAPI_<em>MAX</em>_CNT_LEN</td><td>Defined maximal response content length in bytes</td><td>No</td><td></td><td>3000</td></tr><tr><td>EXAPI_<em>MAX</em>_BODY_LEN</td><td>Defined maximal body size for request in bytes</td><td>No</td><td></td><td>10000</td></tr><tr><td>EXAPI_<em>MAX</em>_REDIRECTS</td><td>Defines maximal redirects that called url can perform</td><td>No</td><td></td><td>5</td></tr><tr><td>EXAPI_<em>TIMEOUT</em></td><td>Defines API connection timeout in miliseconds</td><td>No</td><td></td><td>2000</td></tr><tr><td>DT_HTTP_CALL_LIMIT</td><td>Defined limit for http function that can be defined in DT or DTR</td><td>No</td><td>Available from 1.12.0</td><td>100</td></tr><tr><td>LOGGER_TYPE</td><td>Select log output format/logger type<br><br>STRING is default value if not evn variable is set</td><td>No</td><td></td><td>Possible options: <br>STRING<br>JSON</td></tr><tr><td>LOGGER_TIMESTAMP_UTC</td><td>Select log timestamp format<br>If true: YYYY-MM-DDTHH:mm:ss.SSSZ<br>if false: YYYY-MM-DDTHH:mm:ss.SSS(+-)HH:mm</td><td>No</td><td>Available from 1.14.2</td><td>true/false</td></tr><tr><td>REDIS_PING_INTERVAL</td><td>Duration (in milliseconds) for which the server pings the Redis server.</td><td>No</td><td>Available from 1.14.3</td><td>300000</td></tr><tr><td>FLUSH_REDIS_ON_STARTUP</td><td>Whether cache should be flushed when server is starting. Defaults to true.</td><td>No</td><td>Available from 1.17.0</td><td>false</td></tr><tr><td>REDIS_CACERT</td><td>CA certificate for TLS connection with Redis</td><td>No</td><td>Available from 1.14.5</td><td>CA certificate as a single line without BEGIN CERTIFICATE and END CERTIFICATE. For example(MIIC8DCCAdigAwIBAgIQap4GhMRA26tJGFD...)</td></tr><tr><td>MONGO_MIN_POOL_SIZE</td><td>MongoDB connection minimal pool size</td><td>No</td><td>>= 1.16.2</td><td>5</td></tr><tr><td>MONGO_MAX_POOL_SIZE</td><td>MongoDB connection maximal pool size</td><td>No</td><td>>= 1.16.2</td><td>100</td></tr><tr><td>EXPORT_FOLDER_MEMORY_LIMIT</td><td>Memory limit on folder export</td><td>No</td><td>>=1.17.1</td><td>50000000</td></tr></tbody></table>

### Client environment variables

| Variable name | Description                                          | Mandatory                                                        | Version             | Example value           |
| ------------- | ---------------------------------------------------- | ---------------------------------------------------------------- | ------------------- | ----------------------- |
| API\_URL      | Url on which backend API is accessible               | Yes                                                              |                     | <http://localhost:8080> |
| BI\_API\_URL  | Url on which Business Intelligence API is accessible | No, but the features related to Business Intelligence won't work | From version 1.10.0 | <http://localhost:8082> |
| NGINX\_PORT   | Custom port on which the container will run          | No                                                               | From version 1.9.3  | 80                      |

### Audit environment variables

<table><thead><tr><th width="252">Variable name</th><th>Description</th><th>Mandatory</th><th>Example value</th></tr></thead><tbody><tr><td>BI_MONGO_DB_URI</td><td>Mongo URL of Business Intelligence App</td><td>Yes</td><td>mongodb(+srv)://host.docker.internal:27017</td></tr><tr><td>MONGO_DB_URI</td><td>In case you have a separate database cluster for Server App</td><td>No</td><td>mongodb(+srv)://host.docker.internal:27018</td></tr><tr><td>WORKERS_NUMBER</td><td>Sets number of workers (threads) of application</td><td>No</td><td>1</td></tr><tr><td>DB_TYPE</td><td>If you use CosmosDB or DocumentDB</td><td>No</td><td>MONGODB (default)<br>COSMOSDB<br>DOCUMENTDB</td></tr><tr><td>LOGGER_TYPE</td><td>Select log output format/logger type<br><br>STRING is default value if not evn variable is set</td><td>No</td><td>Possible options: <br>STRING<br>JSON</td></tr><tr><td>LOGGER_TIMESTAMP_UTC</td><td>Select log timestamp format<br>If true: YYYY-MM-DDTHH:mm:ss.SSSZ<br>if false: YYYY-MM-DDTHH:mm:ss.SSS(+-)HH:mm</td><td>No</td><td>true/false</td></tr></tbody></table>

### Kafka env variables

<table><thead><tr><th width="197">Variable name</th><th>Description</th><th>Mandatory</th><th>Example value</th></tr></thead><tbody><tr><td>KAFKA_ENABLED</td><td>Turn Kafka on/off</td><td>Yes (Kafka is disabled by default)</td><td>1/0</td></tr><tr><td>KAFKA_<em>CLUSTER_CLIENTID</em></td><td>A logical identifier of an application.</td><td>Yes</td><td>"my-app"</td></tr><tr><td>KAFKA_<em>CLUSTER_BROKERS</em></td><td>Broker definition</td><td>Yes</td><td>"my-broker:9092, my-broker2:9092"</td></tr><tr><td>KAFKA_<em>CLUSTER_SSL</em></td><td>SSL on/off</td><td>Yes</td><td>"true"</td></tr><tr><td>KAFKA_<em>CLUSTER_SASL_MECHANISM</em></td><td>Definition of Kafka SASL mechanism.</td><td>Yes</td><td>"plain"</td></tr><tr><td>KAFKA_<em>CLUSTER_SASL_USERNAME</em></td><td>SASL username</td><td>No</td><td>"my-username"</td></tr><tr><td>KAFKA_<em>CLUSTER_SASL_PASSWORD</em></td><td>SASL password</td><td>No</td><td>"top-secret-password"</td></tr><tr><td>KAFKA_<em>CLUSTER_SASL_AUTHID</em></td><td>SASL authorization identity for aws mechanism</td><td>No</td><td>"IDIDIDIDID"</td></tr><tr><td>KAFKA_<em>CLUSTER_SASL_ACCKEYID</em></td><td>SASL access key for aws mechanism</td><td>No</td><td>"KEYKEYKEY"</td></tr><tr><td>KAFKA_<em>CLUSTER_SASL_SECRETKEY</em></td><td>SASL secret access key for aws mechanism</td><td>No</td><td>"SECRETKEY"</td></tr><tr><td>KAFKA_<em>CLUSTER_SASL_SESSIONTOKEN</em></td><td>SASL session token for aws mechanism</td><td>No</td><td>"SESSIONTOKEN"</td></tr><tr><td>KAFKA_<em>GROUP_TOPIC_1</em></td><td>Definition of Kafka consumer group, request topic and response topic, respectively. To define multiple topic groups, use numbers 1, 2, ..., N. Each record must have different consumer group.</td><td>Yes</td><td>"my-group, my-request-topic, my-response-topic"</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.decisionrules.io/doc/~/changes/VuchuDyabVa3NSXAKjpZ/on-premise-docker/containers-environmental-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
