Skip to content

Configuration reference

MATVIS delivers the deployment files with the package: the docker-compose.yml and an .env with working defaults for Docker Compose, or the Helm chart with values.yaml and values.secrets.yaml. You do not edit the compose file or the chart. The tables below list the variables you set; every variable not listed keeps the value MATVIS delivers.

Replace <VERSION> with your MATVIS release tag and <REGISTRY> with the registry path MATVIS delivers with your matvis-registry.key wherever the delivered files carry them. On Helm, the same settings are keys in the values files, see Kubernetes (Helm).

Secrets

Fill in every secret before the first start. Generate each one with openssl rand -base64 24, except PSEUDONYM_SECRET, which needs at least 32 bytes: openssl rand -base64 32.

Variable Description
DB_PASSWORD Password of the MATVIS database (any characters)
KEYCLOAK_ADMIN_PASSWORD Password of the Identity administrator
KEYCLOAK_DB_PASSWORD Password of the Identity database
KEYCLOAK_CLIENT_SECRET_USER_API, KEYCLOAK_CLIENT_SECRET_FRONTEND, KEYCLOAK_CLIENT_SECRET_DATA_API Secrets the components sign in to Identity with
JWT_SECRET Signing secret of the Dashboard sessions
PSEUDONYM_SECRET Keys every PII pseudonym. Standard base64 of at least 32 random bytes. Required: the Firewall API refuses to start without a valid one. Changing it changes every token; tokens minted under the previous value are no longer matched.

Admin dashboard user

The first administrator, created on the first start. See Users.

Variable Description
KC_USER_EMAIL Admin dashboard login email
KC_USER_PASSWORD Admin dashboard password
KC_USER_FIRSTNAME Admin first name
KC_USER_LASTNAME Admin last name
KEYCLOAK_ADMIN User name of the Identity administrator

Ports

Only the Dashboard, the Firewall API and ICAP need to be reachable from outside, see Requirements.

Variable Default Description
NEXT_PORT 3000 Dashboard port
USER_API_PORT 8000 Firewall API port
ICAP_PORT 1344 Compose only. Host port of the ICAP server
DATA_API_PORT 8001 Configuration API port, reached only by MATVIS itself

Licensing

Variable Description
KEYGEN_ACCOUNT_ID License account ID (online mode)
KEYGEN_ACTIVATION_TOKEN License activation token (online mode)
LICENSE_KEY License key (online mode)
AIR_GAPPED true to validate against a local certificate instead of online
LICENSE_FILE Path to license.lic (air-gapped mode only)

Database (PostgreSQL)

Variable Description
DB_NAME Application DB name
DB_USER Application DB user
DB_PASSWORD Application DB password (any characters)

The variables below are optional and only needed for a database you operate yourself; unset, the bundled matvis-postgres container is used. See Managed PostgreSQL.

Variable Default Description
BUNDLED_POSTGRES 1 Compose only. 0 leaves the bundled matvis-postgres container out (Docker Compose 2.20 or newer).
DB_HOST matvis-postgres Database host
DB_PORT 5432 Database port
DB_SSLMODE unset TLS mode: disable, allow, prefer, require, verify-ca, verify-full
DB_SSLROOTCERT unset CA bundle path inside the container (/etc/matvis/db-certs/<file> in Compose)
DB_SSLCERT, DB_SSLKEY unset Client certificate and key, when the server requires one
DB_POOL_SIZE 5 Connections per pool (two pools per Configuration API worker)
DB_MAX_OVERFLOW 10 Extra connections per pool under load
DB_CONNECT_TIMEOUT 10 Seconds per connection attempt
DB_WAIT_SECONDS 120 Startup wait for the database before MATVIS exits with an error

Encryption at rest (beta)

Variable Default Description
AICE_ENCRYPTION_ENABLED false true makes MATVIS encrypt sensitive columns at rest. On the next start it creates the data key and encrypts existing rows.
AICE_KEY_PROVIDER env Where the master key comes from. env reads AICE_MASTER_KEY.
AICE_MASTER_KEY unset Base64 of a 256-bit key (openssl rand -base64 32). Keep a backup separate from the database backups.

Performance

Variable Default Description
BACKGROUND_WORKERS 1 in code, 4 in the provided .env and Helm values Number of Configuration API workers
GPU_ACCELERATION False True to run inference on an NVIDIA GPU (16 GB VRAM rec.)
ALLOWLIST_REGEX_TIMEOUT 2 Seconds the Firewall API spends removing allowlisted passages before it skips a match. The content is still scanned.

ICAP

Variable Default Description
ICAP_ENABLED false true makes the Firewall API serve ICAP on port 1344. See ICAP proxy integration.

Logging, syslog & telemetry

Variable Default Description
LOG_LEVEL WARNING Application log level
LOG_FORMAT json json (compact) or pretty (indented, human-readable)
HOST_LOG_DIR /var/log/matvis Host directory to mirror MATVIS logs into
SYSLOG_ENABLED false Forward logs to syslog. The provided .env sets it to true.
SYSLOG_ADDRESS /dev/log Syslog address inside the container
SYSLOG_TCP false true uses a TCP (stream) socket instead of UDP (datagram)
SYSLOG_HOST_SOCKET none Compose only, required. Host syslog socket mounted at /dev/log in each container. The provided .env uses /run/systemd/journal/dev-log.
OTEL_EXPORTER_OTLP_ENDPOINT (empty) OTLP collector URL, telemetry exports only when set
OTEL_EXPORTER_OTLP_PROTOCOL (empty) grpc or http/protobuf
OTEL_EXPORTER_OTLP_HEADERS (empty) Auth headers, e.g. Authorization=Bearer <token>
OTEL_EXPORTER_OTLP_CERTIFICATE (empty) Path to CA cert for mTLS

HTTPS

Set HTTPS_ENABLED=true if a TLS-terminating proxy or load balancer is in front of the deployment; this enables HSTS headers. Leave it unset for plain HTTP deployments.

Topic fine-tuning has no environment variable. You set the example phrases per topic in each configuration in the dashboard, see Content.