Configuration
Configure deployment secrets, identity, networking, password-manager limits and product settings.
On this page
Docker Compose production uses .env; local development uses .env.dev. Helm reads its values and the Kubernetes Secret named by existingSecret. Recreate affected containers or roll out workloads after changing their environment.
Required connection settings#
HOSTandHTTP_PROTOCOL: the console's public hostname and URL scheme.DATABASE_HOST,DATABASE_PORT,DATABASE_NAME,DATABASE_USER,DATABASE_PASSWORD: PostgreSQL connection settings.REDIS_HOST,REDIS_PORT,REDIS_PASSWORD: queue and cache connection settings.SECRET_KEY: Django's signing key, at least 50 random characters.NEXTAUTH_SECRET: the frontend secret included in the Compose environment template.
Use the existing credentials when attaching an existing database. Do not commit environment files or copy a development template's example secrets into production.
Root-key providers#
MATII_SERVER_KEY_PROVIDER selects how the root encryption key is loaded:
env: provideSERVER_SECRETas 32 random bytes encoded as 64 hexadecimal characters.aws_kms: provideSERVER_SECRET_KMS_CIPHERTEXTand the AWS identity and region needed to decrypt it.vault_transit: provideSERVER_SECRET_TRANSIT_CIPHERTEXT, the Vault or OpenBao address, Transit key, and authorised authentication settings.
Remove the plaintext SERVER_SECRET when selecting a KMS provider. The backend refuses a configuration that supplies both. Backend secret-file support uses the corresponding <NAME>_FILE setting, such as SERVER_SECRET_FILE.
MATII_ALLOW_INSECURE_SECRETS=true exists for development with published example values. Keep it disabled in production. Root-key rotation and backups require a coordinated procedure; see Operations and Backup & recovery.
Sign-in and provisioning#
ENABLE_PASSWORD_AUTH: enables local password authentication when local sign-in is in use.SSO_PROVIDERS: the local sign-in providers enabled by the deployment, with their provider credentials.MATII_AUTH_ISSUER: enables the Matii Auth integration.MATII_AUTH_URL: optional internal address for backend-to-backend identity requests.MATII_AUTH_PUBLIC_URL: address browsers use for the identity service.MATII_AUTH_CLIENT_ID,MATII_AUTH_CLIENT_SECRET,MATII_AUTH_AUDIENCE: token-exchange client configuration.MATII_AUTH_WEBHOOK_SECRETS: signing secrets accepted for identity lifecycle events.MATII_AUTH_EXCLUSIVE: defaults totrue; uses Matii Auth as the exclusive sign-in system when configured.MATII_GROUP_SYNC: defaults totrue; mirrors identity groups into teams.MATII_SESSION_AGE_SECONDS: console session lifetime, default 43,200 seconds.
Follow Sign-in, SSO & MFA before changing identity settings on an existing installation.
Network and integration access#
MATII_TRUSTED_PROXIES specifies which proxy addresses may supply client-IP headers. Set it to the actual ingress or load-balancer ranges so network policies and audit records use the correct client address.
MATII_SSRF_PROTECTION defaults to true. Integration destinations on private or internal networks must be explicitly permitted by hostname or CIDR in MATII_EGRESS_ALLOWLIST.
MATII_DISABLED_SYNC_SERVICES hides and refuses new syncs for the listed platform IDs. It does not stop existing syncs; review those separately when retiring a platform.
Password Manager#
Deployment settings set the outer limits; an organisation's Password Manager → Admin → Policy can impose additional restrictions.
MATII_PM_ENABLED: enables the module, defaulttrue.MATII_PM_EXTENSION_IDS: comma-separated extension IDs allowed to connect. An empty value disables extension authorisation, not the web console.MATII_PM_ACCESS_TOKEN_SECONDS: extension access-token lifetime, default 600 seconds.MATII_PM_REFRESH_TOKEN_DAYS: extension refresh-token lifetime, default 30 days.MATII_PM_MAX_DEVICES: connected-device limit per member, default 10.MATII_PM_MAX_ITEMS: personal-vault item limit, default 10,000.MATII_PM_MAX_ATTACHMENT_MB: maximum file size, default 10 MB.MATII_PM_MAX_VAULT_ATTACHMENT_MB: attachment storage per vault, default 500 MB.MATII_PM_BREACH_API_URL: password-breach range API. Set an empty value to disable it or supply your own compatible mirror.MATII_PM_TOMBSTONE_RETENTION_DAYS: deletion-marker retention, default 90 days.MATII_PM_EVENT_RETENTION_DAYS: security-event retention, default 365 days.
Encrypted attachment request bodies need roughly 1.4 times the original file size. Align ingress and nginx body limits with your attachment limit.
Logs, metrics and maintenance#
MATII_LOG_FORMAT=json enables structured logs. MATII_METRICS_TOKEN enables the protected Prometheus /metrics/ endpoint. With no token configured, metrics are disabled.
MATII_WEBHOOK_DISABLE_AFTER_FAILURES defaults to 200 consecutive delivery failures. MATII_JIT_MAX_HOURS limits temporary grants, default 720 hours. MATII_BYOK_CACHE_SECONDS controls the organisation-key cache, default 300 seconds.
Schedule the jobs described in Operations; environment variables alone do not start a scheduler.
Names and links#
Operators can configure MATII_PRODUCT_NAME, MATII_SHORT_NAME, MATII_SUPPORT_URL, MATII_TERMS_URL, MATII_PRIVACY_URL, MATII_RELEASES_REPO and MATII_STATUS_PAGE_URL. Apply shared branding settings to both frontend and backend.
MATII_DOCS_URL replaces the built-in documentation base with an external site using the same page slugs. Leave it unset to use these guides. MATII_CLI_DOWNLOAD_URL points to your CLI release mirror and enables the console's installer endpoint.