# Environment Variables

{% tabs fullWidth="true" %}
{% tab title="Server (required)" %}
Required environment variables for [server-app](https://docs.decisionrules.io/doc/decisionrules-applications/server-app "mention") application.

<table data-full-width="true"><thead><tr><th width="238">Variable name</th><th>Description</th><th width="139">Mandatory</th><th>Example value</th></tr></thead><tbody><tr><td>REDIS_URL</td><td>Redis URL</td><td></td><td>redis(s)://host.docker.internal:6379</td></tr><tr><td>MONGO_DB_URI</td><td>Mongo URL</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></td><td>http://localhost:80/<strong># (# is mandatory)</strong></td></tr><tr><td>LICENSE_KEY</td><td>License key string</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><p>MONGODB (default)<br>COSMOSDB</p><p>COSMOSDB_VCORE<br>DOCUMENTDB</p></td></tr><tr><td>API_URL</td><td>Lets the server know it's own address for Rule Flow and dependant rule solves.</td><td></td><td>https://api.decisionrules.io</td></tr><tr><td>AI_ENGINE_URL</td><td>URL to <a data-mention href="../../decisionrules-applications/decisionrules-ai-engine">decisionrules-ai-engine</a></td><td>If you use AI assistant features</td><td>http://localhost:8084</td></tr></tbody></table>

{% endtab %}

{% tab title="Server (optional)" %}
Optional environment variables for [server-app](https://docs.decisionrules.io/doc/decisionrules-applications/server-app "mention") application.

<table data-full-width="true"><thead><tr><th width="301.70703125">Variable name</th><th>Description</th><th width="108">Version</th><th>Example value</th></tr></thead><tbody><tr><td>MONGO_TLS_CA_FILE</td><td>Path to file with one or more certificate authorities to trust when making a TLS connection.</td><td>>= 1.18.4.4</td><td>/certificates/ca.pem</td></tr><tr><td>MONGO_TLS_CERTIFICATE_KEY_FILE</td><td>Path to the client certificate private key file. This key is often included within the certificate file itself.</td><td>>= 1.18.4.4</td><td>/certificates/private.pem</td></tr><tr><td>BRAND_LOGO_URL</td><td>Custom brand Logo URL. Feature must be enabled in license key. <br><br>Learn more in the <a href="white-labeling">Brand Logo Guide</a></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>SHOWCASE</td><td>Turn on or off showcase mode</td><td></td><td>true/false</td></tr><tr><td>WORKERS_NUMBER</td><td>Sets number of workers (threads) of application OR set "auto" to allocate all CPU cores</td><td></td><td>1 OR auto</td></tr><tr><td>BI_MONGO_DB_URI</td><td>If you have a separate database cluster for Business Intelligence App</td><td>>= 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></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></td><td>okta.com/HASH_STRING</td></tr><tr><td>SAML_CERT</td><td>Public certificate of provider. In RAW format as single line without BEGIN CERTIFICATE and END CERTIFICATE</td><td></td><td>MIIC8DCCAdigAwIBAgIQap4GhMRA26tJGFD.....</td></tr><tr><td>SAML_CALLBACK_URL</td><td>Callback URL where provider send response</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></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></td><td>5000</td></tr><tr><td><del>WORKFLOW_TIMEMOUT</del> (deprecated from 1.23.1)</td><td>Time in milliseconds after which the process of solving a <strong>workflow</strong> is stopped. Variable name is WORKFLOW_TIMEMOUT because there is typo in code and it is replaced with DECISION_FLOW_TIMEOUT from version 1.23.1.</td><td>>=1.19.0</td><td>10000</td></tr><tr><td>DECISION_FLOW_TIMEOUT</td><td>Time in milliseconds after which the process of solving a <strong>workflow</strong> is stopped. </td><td>>=1.23.1</td><td>10000</td></tr><tr><td>RF_NODE_LIMIT</td><td>Integer of desired rule flow nodes, default value is 30</td><td></td><td>30</td></tr><tr><td>SWAGGER_HOST</td><td>Host of the server application which will use swagger</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></td><td>mydomain.com, yourdomain.io</td></tr><tr><td>ALLOWLIST</td><td>Cultural-neutral synonym for WHITELIST.</td><td></td><td>mydomain.com, yourdomain.io</td></tr><tr><td><del>TELEMETRY</del> (deprecated from 1.17.0)</td><td>It turn on/off telemetry, which measures endpoint execution duration (for example: Solver API)</td><td>>= 1.8.1</td><td>On = 1, off = 0</td></tr><tr><td>EXAPI_MAX_CNT_LEN</td><td>Defined maximal response content length in bytes</td><td></td><td>3000</td></tr><tr><td>EXAPI_MAX_BODY_LEN</td><td>Defined maximal body size for request in bytes</td><td></td><td>10000</td></tr><tr><td>EXAPI_MAX_REDIRECTS</td><td>Defines maximal redirects that called URL can perform</td><td></td><td>5</td></tr><tr><td>EXAPI_TIMEOUT</td><td>Defines API connection timeout in milliseconds</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>>= 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 env variable is set</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>>= 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>>= 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>>= 1.17.0</td><td>false</td></tr><tr><td>TIMEZONE</td><td><p>Default time zone for date functions. Default is: </p><pre><code>Europe/Prague
</code></pre></td><td>>= 1.13.1</td><td>Full list is available here: <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">https://en.wikipedia.org/wiki/List_of_tz_database_time_zones</a></td></tr><tr><td>REDIS_CACERT</td><td>CA certificate for TLS connection with Redis</td><td>>= 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>>= 1.16.2</td><td>5</td></tr><tr><td>MONGO_MAX_POOL_SIZE</td><td>MongoDB connection maximal pool size</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>>=1.17.1</td><td>50000000</td></tr><tr><td>MEASUREMENTS</td><td>Logs the duration of each phase of the solving to the X-Measurements header in every HTTP response</td><td>>= 1.18.4.3</td><td>true/false</td></tr><tr><td>REDIS_MODE</td><td>Specifies the mode in which the application should connect to the redis. Link to Redis Connection Modes documentation.</td><td><p></p><p>>= 1.19.2</p></td><td>NORMAL/CLUSTER</td></tr><tr><td>READER_REDIS_URL</td><td>Redis URL for reader endpoint.</td><td>>= 1.19.2</td><td>redis(s)://host.docker.internal:6379</td></tr><tr><td>REDIS_CACERT_PATH</td><td>Path to file withCA certificate for TLS connection with Redis</td><td>>= 1.19.2</td><td>/certificates/redis.pem</td></tr><tr><td>REDIS_REJECT_UNAUTHORIZED</td><td>Terminate the redis connection if the specified certificate verification fails</td><td>>= 1.19.2</td><td>true/false</td></tr><tr><td>IN_MEMORY_RULE_COUNT</td><td>Number of rules to store directly in memory of the server container. This allows for much faster response times when solving large rules. ( <mark style="color:red;"><strong>Setting this too high could cause the server to run out of memory.</strong></mark> On average a large rule takes up ±25MB of memory i.e.: storing 100 large rules would take up 2.5GB of memory. ) </td><td>>=1.19.5</td><td>25</td></tr><tr><td>TRACE_REQUEST</td><td>If enabled, all http requests will be logged to the console</td><td>>=1.19.5.1</td><td>true/false</td></tr><tr><td>AUDIT_PARTITION_KEY_FORMAT</td><td>Specify the format of a partition key to be included in each audit log document. The partition key is useful for defining partitions for the audit logs. Use custom string with the expressions "TIME_KEY", "SPACE_ID" and "RULE_ID". When not defined, partition keys will be null.</td><td>>=1.20.0</td><td>time:TIME_KEY|space:SPACE_ID|rule:RULE_ID</td></tr><tr><td>AUDIT_PARTITION_KEY_TIME_PERIOD</td><td>Defines the time period in hours during which the TIME_KEY value in the audit log partition key will remain the same. This is useful for defining partitions based on the timestamp of the audit log creation. If the period is longer, the partition will contain more audit logs. Default value is 12.</td><td>>=1.20.0</td><td>24</td></tr><tr><td>CONNECTION_TIMEOUT</td><td>Specifies the time in milliseconds of inactivity a server needs to wait for additional incoming data before a socket will be destroyed.</td><td></td><td>60000</td></tr></tbody></table>
{% endtab %}

{% tab title="Client" %}
Environment variables for [client-app](https://docs.decisionrules.io/doc/decisionrules-applications/client-app "mention") application.

<table data-full-width="true"><thead><tr><th>Variable name</th><th>Description</th><th>Mandatory</th><th>Example value</th></tr></thead><tbody><tr><td>API_URL</td><td>URL on which backend API is accessible</td><td>Yes</td><td>http://localhost:8080</td></tr><tr><td>BI_API_URL</td><td>URL on which Business Intelligence API is accessible</td><td>No, but the features related to Business Intelligence won't work</td><td>http://localhost:8082</td></tr><tr><td>NGINX_PORT</td><td>Custom port on which the container will run</td><td>No</td><td>80</td></tr></tbody></table>
{% endtab %}

{% tab title="Business Intelligence" %}
Environment variables for [decisionrules-business-intelligence](https://docs.decisionrules.io/doc/decisionrules-applications/decisionrules-business-intelligence "mention") application.

<table data-full-width="true"><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 env 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><tr><td>CONNECTION_TIMEOUT</td><td>Sets the request header and keepAlive timeouts in miliseconds.<br>This is useful when your deployment is dealing with frequent <strong>502</strong> code errors. The default is 5000.</td><td>No</td><td>60000</td></tr></tbody></table>
{% endtab %}

{% tab title="AI Engine" %}
Environment variables for [decisionrules-ai-engine](https://docs.decisionrules.io/doc/decisionrules-applications/decisionrules-ai-engine "mention") application.

More infor about AI Assitant is here: [ai-assistant](https://docs.decisionrules.io/doc/ai-assistant "mention")

All available models are available here: <https://distribution.decisionrules.io/ai/models/page>

<table data-full-width="true"><thead><tr><th>Variable name</th><th>Description</th><th>Mandatory</th><th>Example value</th></tr></thead><tbody><tr><td>AIA_PROVIDER</td><td>Fallback AI provider</td><td>No</td><td>google-vertex</td></tr><tr><td>AIA_FAMILY</td><td>Fallback AI provider family</td><td>No</td><td>google</td></tr><tr><td>AIA_MODEL</td><td>Fallback AI model</td><td>No</td><td>gemini-3-flash-preview</td></tr><tr><td>AIA_SECRET</td><td>Secret or API key for the fallback AI provider configuration</td><td>No</td><td><code>your-provider-secret</code></td></tr><tr><td>AIA_ADDITIONAL_DATA_JSON</td><td>Optional provider-specific JSON configuration</td><td>No</td><td><code>{"project":"my-project","location":"global"}</code></td></tr></tbody></table>
{% endtab %}

{% tab title="Kafka" %}
**Defined on** [server-app](https://docs.decisionrules.io/doc/decisionrules-applications/server-app "mention") **application.**

<table data-full-width="true"><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_CLUSTER_CLIENTID</td><td>A logical identifier of an application.</td><td>Yes</td><td>"my-app"</td></tr><tr><td>KAFKA_CLUSTER_BROKERS</td><td>Broker definition</td><td>Yes</td><td>"my-broker:9092, my-broker2:9092"</td></tr><tr><td>KAFKA_CLUSTER_SSL</td><td>SSL on/off</td><td>Yes</td><td>"true"</td></tr><tr><td>KAFKA_CLUSTER_SASL_MECHANISM</td><td>Definition of Kafka SASL mechanism.</td><td>Yes</td><td>"plain"</td></tr><tr><td>KAFKA_CLUSTER_SASL_USERNAME</td><td>SASL username</td><td>No</td><td>"my-username"</td></tr><tr><td>KAFKA_CLUSTER_SASL_PASSWORD</td><td>SASL password</td><td>No</td><td>"top-secret-password"</td></tr><tr><td>KAFKA_CLUSTER_SASL_AUTHID</td><td>SASL authorization identity for aws mechanism</td><td>No</td><td>"IDIDIDIDID"</td></tr><tr><td>KAFKA_CLUSTER_SASL_ACCKEYID</td><td>SASL access key for aws mechanism</td><td>No</td><td>"KEYKEYKEY"</td></tr><tr><td>KAFKA_CLUSTER_SASL_SECRETKEY</td><td>SASL secret access key for aws mechanism</td><td>No</td><td>"SECRETKEY"</td></tr><tr><td>KAFKA_CLUSTER_SASL_SESSIONTOKEN</td><td>SASL session token for aws mechanism</td><td>No</td><td>"SESSIONTOKEN"</td></tr><tr><td>KAFKA_GROUP_TOPIC_1</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>
{% endtab %}
{% endtabs %}


---

# 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/other-deployment-options/docker-and-on-premise/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.
