Skip to main content
This reference lists the environment variables used to configure Reporter, the service that generates regulatory, compliance, and accounting reports from configurable templates. Reporter ships as a single binary, and RUN_MODE selects its active surfaces: the API manager, the report worker, or both. You set these at deploy time, through Helm values, Docker Compose, or your orchestrator’s environment. Variables marked as required cause the server to fail on startup if not set. For the configuration blocks that every Lerian product shares (TLS posture, OpenTelemetry, Access Manager authentication, service discovery, and event streaming), see the BYOC configuration reference. This page focuses on what is distinctive to Reporter.

Run mode and ports

RUN_MODE decides which surfaces the process serves. Run the API and worker as one process (all) for small deployments, or split them into separate deployables (api and worker) to scale report generation independently. See the health and readiness reference for the probe contract.

Deployment and TLS

CORS and proxies

API pagination

Template uploads

Template previews

Report calendar

Database (MongoDB)

Stores report metadata, templates, and run history.

Message broker (RabbitMQ)

Carries the generate-report command queue between the API and the worker.

Object storage (S3-compatible)

Where rendered reports are stored. Works with any S3-compatible endpoint.

Cache (Redis / Valkey)

PDF rendering (worker)

Extraction limits (worker)

Stale-report reaper

A worker stamps a heartbeat on each report it generates. The Manager moves a Processing report whose heartbeat is stale to Error with RPT-0160. Manager and worker must carry the same heartbeat values.

Deadline trigger (Manager)

Regulatory catalog

Without a catalog source, the deployment carries no regulatory documents.

Report datasources

Reports read from PostgreSQL and MongoDB datasources in the persisted registry. Create and manage ordinary entries through the data-source API. The environment block below is an optional bootstrap path. DATASOURCE_{NAME}_CONFIG_NAME makes an environment seed block exist. Reporter scans for keys that match DATASOURCE_*_CONFIG_NAME. The prefix counts as much as the suffix, so a key that only ends in _CONFIG_NAME declares nothing. At Manager startup, a complete block seeds its configName only when no registry entry, including a soft-deleted one, already uses that name. The value is the name your templates use to address the source. Within a block, the variables marked required are the ones Reporter needs before it reads the block. A complete per-datasource seed block follows. Set the global DATASOURCE_CRED_ENC_KEY separately as described above. We recommend using the same name for CONFIG_NAME and {NAME}, with the environment-variable segment uppercased (for example, ONBOARDING for CONFIG_NAME=onboarding). That keeps the schema key intuitive, because SCHEMAS uses the CONFIG_NAME value as its key while every other field uses {NAME}:
A template then addresses that source by its config name, as in {{ onboarding.accounts }}. Use the API to add or update an ordinary datasource. An environment block only seeds a previously absent entry. It never overwrites an API-managed entry or restores a soft-deleted one.

Reserved CRM datasource

plugin_crm is the reserved, environment-managed CRM datasource. Do not create it or PATCH it through the ordinary data-source API: Reporter rejects that path with RPT-0073. A CRM template must use the exact config name plugin_crm and a complete MongoDB block:
Put DATASOURCE_CRM_PASSWORD, CRYPTO_HASH_SECRET_KEY_CRM, and CRYPTO_ENCRYPT_SECRET_KEY_CRM in your secret store. The CRM crypto values must be the same keys already used by CRM. Do not generate replacement keys for Reporter. Keep DATASOURCE_CRED_ENC_KEY stable as well: changing it prevents Reporter from decrypting stored datasource credentials. Manager uses this block at startup to seed plugin_crm and to fill an absent or empty metadata.midazOrganizationId. A non-empty persisted organization ID wins and is not overwritten by the environment. If it is wrong, stop and use the supported engineering recovery path. Do not use the ordinary API to change it. To set these variables with the Reporter chart, see the Reporter chart README. For templates that use plugin_crm, validate the full path: import or save the template, generate a report, confirm CRM fields decrypt, and confirm its records are scoped to the intended Midaz organization.

Shared configuration backbone

The following blocks are identical across Lerian products. The BYOC configuration reference documents them in full. They default off.
  • Access Manager authentication: PLUGIN_AUTH_ENABLED, PLUGIN_AUTH_ADDRESS. Enable in production.
  • Service discovery: SD_* (Consul, and Reporter also accepts the legacy SD_ADVERTISE_* / CONSUL_ADDR aliases). Off by default.
  • Event streaming: STREAMING_ENABLED, STREAMING_BROKERS, STREAMING_CLOUDEVENTS_SOURCE, plus RABBITMQ_REPORT_EVENTS_EXCHANGE for the events exchange and STREAMING_KAFKA_BROKERS for the optional Kafka copy of report.finished and report.partial. Off by default.
  • OpenTelemetry: ENABLE_TELEMETRY, OTEL_*, OTEL_INSECURE_EXPORTER. Telemetry is OTLP push.