Skip to main content

Server and DIAL Core

These environment variables set how the DIAL Chat BFF listens, how it reaches DIAL Core and the themes service, and how it identifies itself. This reference is for platform engineers who deploy Chat; it assumes you know how DIAL Chat is configured.

Server​

VariableDefaultDescription
PORT5000The HTTP port of the BFF, which also serves the frontend.
API_PREFIXapiThe route prefix of every API endpoint. The OIDC callback path /api/v1/auth/callback/<provider> does not follow it, so changing it breaks sign-in.
CORS_ORIGINAUTH_CALLBACK_BASE_URLThe allowed CORS origin of the frontend. Set it only when the frontend is served from another origin.
CHAT_VERSIONThe version in the root package.jsonThe version shown in the footer label, substituted for %%VERSION%% in FOOTER_HTML_MESSAGE, and reported by GET /api/health. Set it from CI/CD to show the deployed build.

DIAL Core​

VariableDefaultDescription
DIAL_CORE_URL—The URL of DIAL Core.
DIAL_API_VERSION2024-10-21The api-version query parameter sent with chat completion requests to DIAL Core.
DIAL_API_KEY—A server-only API key that the BFF sends to DIAL Core as Api-Key for naming conversations with the utility model. User requests never use it; they carry the user's own session token. Store it as a secret.

Every request from the BFF to DIAL Core carries User-Agent: ai-dial-chat/<version>, from CHAT_VERSION, for diagnostics. It contains no user or request data.

Users' usage and limits views report models and applications by default; see USER_USAGE_DEPLOYMENT_TYPES in Features and UI.

Themes service​

VariableDefaultDescription
THEMES_CONFIG_URL—The base URL of the DIAL Chat Themes service. The BFF reads <THEMES_CONFIG_URL>/config.json and proxies its images.
THEMES_SERVICE_TIMEOUT_MS5000The timeout of requests to the themes service, in milliseconds.

When THEMES_CONFIG_URL is unset, Chat logs the failure and uses its built-in light palette.

Outbound proxy​

The BFF honors the standard HTTP_PROXY, HTTPS_PROXY, and NO_PROXY variables, and their lowercase forms, for its calls to identity providers (discovery, tokens, user info, revocation, and JWKS), to the themes service, and to an externally reachable DIAL Core.

HTTP_PROXY=http://proxy.example.com:8080
HTTPS_PROXY=http://proxy.example.com:8080
NO_PROXY=localhost,127.0.0.1,.internal
  • When neither proxy variable is set, requests go out directly.
  • NO_PROXY is read only when a proxy variable is set. List cluster-internal hosts there, such as an internal DIAL Core or identity provider.
  • OIDC requests use only HTTPS_PROXY and do not fall back to HTTP_PROXY.
warning

A proxy variable already present in the container, for example injected cluster-wide, routes every outbound call through the proxy. Add internal hosts to NO_PROXY first.

Custom Core API bridge​

CUSTOM_CORE_API_CONFIG is a server-only allowlist of exact DIAL Core paths — GET, or a configured POST, PUT, or DELETE — that the BFF exposes at /api/v1/custom-api/:operationId and calls with the user's own session. DIAL Core still enforces roles and rate limits.

{"version": 1, "operations": [{"id": "<OPERATION_ID>", "method": "GET", "corePath": "<CORE_PATH>"}]}

Unset, empty, or blank disables the bridge. An invalid value fails startup.

Custom client variables​

CUSTOM_CLIENT_VARIABLES is a JSON object that the BFF returns unchanged as config.customVariables in GET /api/v1/client-config, for a custom frontend or host to read. It is never merged into the built-in configuration or feature flags. Every client receives it, including before sign-in, so never put a secret in it. A malformed value or a non-object falls back to {}.

Example​

PORT=5000
CORS_ORIGIN=https://chat.example.com
DIAL_CORE_URL=http://dial-core:8080
DIAL_API_KEY=<DIAL_API_KEY>
THEMES_CONFIG_URL=http://dial-themes:8080
CHAT_VERSION=1.2.22

Further reading​