Skip to main content

.env reference

Docker Compose setups use .env files for environment variable substitution. Variables defined in .env are available as ${VAR} in compose files.

The advanced setup requires a .env file with all variables below. The quick start setups use minimal .env files (typically only CHAT_KEEP_ALIVE_TIMEOUT).


Ports​

DIAL_CHAT_HOST_PORT​

Host port for DIAL Chat.

Default: 3000

DIAL_CORE_HOST_PORT​

Host port for DIAL Core API.

Default: 8080

DIAL_ADMIN_FRONTEND_HOST_PORT​

Host port for the Admin Panel frontend.

Default: 3100

KC_PORT​

Host port for Keycloak. Also used as the internal container port.

Default: 8180


Networking​

COMMON_HOST​

Hostname used in URLs for inter-service communication and Keycloak issuer configuration.

Default: localhost

note

The Admin Backend uses COMMON_HOST in the Keycloak issuer URL (providers.keycloak.issuer). This must match the hostname the browser uses to obtain tokens, because the iss claim in JWT tokens reflects the issuer URL seen by the client.


Auth secrets​

NEXTAUTH_SECRET​

NextAuth.js session encryption key. Used by both DIAL Chat and Admin Frontend.

Generate with:

openssl rand -base64 32

AUTH_KEYCLOAK_SECRET​

Keycloak client secret for OIDC authentication. Used by both DIAL Chat and Admin Frontend.

This value must match the client secret configured in the Keycloak realm. See realm-config.json.


Encryption​

DIAL_CORE_ENCRYPTION_SECRET​

AES encryption secret for DIAL Core blob storage prefix hashing. Maps to encryption.secret in settings.json.

DIAL_CORE_ENCRYPTION_KEY​

AES encryption key for DIAL Core blob storage prefix hashing. Maps to encryption.key in settings.json.


Keycloak​

KC_ADMIN_PASSWORD​

Initial Keycloak admin password. Set during first startup via KC_BOOTSTRAP_ADMIN_PASSWORD.


Database​

H2_DATASOURCE_ENCRYPTED_FILE_KEY​

Admin Backend H2 database file encryption key.

H2_DATASOURCE_MASTER_KEY​

Admin Backend H2 database master key.

H2_DATASOURCE_PASSWORD​

Admin Backend H2 database password.


Example .env file​

From the advanced Docker Compose setup:

# Ports
DIAL_CHAT_HOST_PORT=3000
DIAL_CORE_HOST_PORT=8080
DIAL_ADMIN_FRONTEND_HOST_PORT=3100
KC_PORT=8180
COMMON_HOST=localhost

# Secrets
NEXTAUTH_SECRET=<generate-with-openssl-rand-base64-32>
AUTH_KEYCLOAK_SECRET=<keycloak-client-secret>
DIAL_CORE_ENCRYPTION_SECRET=<random-string>
DIAL_CORE_ENCRYPTION_KEY=<random-string>
KC_ADMIN_PASSWORD=<keycloak-admin-password>
H2_DATASOURCE_ENCRYPTED_FILE_KEY=<random-string>
H2_DATASOURCE_MASTER_KEY=<random-string>
H2_DATASOURCE_PASSWORD=<random-string>
warning

Replace all <placeholder> values with unique random strings before starting. Never reuse secrets across environments.

Further reading​