Skip to main content
This reference lists the environment variables used to configure the Midaz ledger service — the source-available (ELv2) double-entry engine that serves the onboarding and transaction APIs on a single port. 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, multi-tenancy, service discovery, and event streaming — see the BYOC configuration reference. This page focuses on what is distinctive to the ledger.
Midaz is mid-consolidation. What you deploy today is the ledger service (unified onboarding + transaction routes) plus a standalone CRM service. The consolidated single-binary layout — which folds CRM and Fees into the ledger process and pulls Tracer into the same repository — is rolling out. The CRM and Fees variables below apply to the standalone CRM service today, and to the ledger process once consolidation lands in your environment. The former onboarding, transaction, and mdz components no longer exist as separate deployables.

Ports and health endpoints

The ledger runs one HTTP process. See the health and readiness reference for the probe contract. The ledger uses OTLP push for telemetry and does not expose a /metrics scrape endpoint.

Deployment and TLS

Application

Database (PostgreSQL)

The ledger keeps two logical databases — onboarding and transaction — each with a primary and a replica connection block. The variables share one shape; replace {MODULE} with ONBOARDING or TRANSACTION. Replica variables carry a _REPLICA_ infix (for example DB_ONBOARDING_REPLICA_HOST).

Document store (MongoDB)

Namespaced per module: MONGO_ONBOARDING_*, MONGO_TRANSACTION_*, and — on the consolidated binary — MONGO_CRM_* and MONGO_FEES_*. All share one shape; replace {NS} with the namespace. They may point at one MongoDB deployment (separate logical databases) or dedicated hosts.

Cache (Redis / Valkey)

Message broker (RabbitMQ)

Used by the transaction module for balance operations and event fan-out.

Throughput

Tracer integration

Optional seam that lets the ledger reserve spending limits against Tracer before committing a transaction. Leave TRACER_BASE_URL unset to disable.
With TRACER_BASE_URL set, the seam uses the default grpc transport unless you set TRACER_TRANSPORT=rest. The gRPC transport requires the Tracer service to expose its reservation gRPC seam — set TRACER_GRPC_PORT on Tracer (see Tracer environment variables). Under TRACER_TLS_MODE=mtls, the client certificate, key, and CA paths above are required.

CRM and Fees

These variables apply to the standalone CRM service today, and to the ledger process once CRM and Fees fold into it. They protect account-holder PII and configure the field-encryption backend.

Shared configuration backbone

The following blocks are identical across Lerian products and are documented in full in the BYOC configuration reference. They default off; a single-tenant BYOC deployment can ignore all of the optional ones.
  • Access Manager authenticationPLUGIN_AUTH_ENABLED, PLUGIN_AUTH_HOST. Enable in production.
  • Multi-tenancyMULTI_TENANT_*. Off by default; enables per-tenant database resolution.
  • Service discoverySD_* (Consul). Off by default.
  • Event streamingSTREAMING_* (lib-streaming producer). Off by default on the ledger.
  • OpenTelemetryENABLE_TELEMETRY, OTEL_*. Telemetry is OTLP push.