Skip to main content
This reference lists the environment variables that configure the Midaz ledger service. Midaz is the source-available (ELv2) double-entry engine. It serves the onboarding and transaction APIs on a single port. You set these variables at deploy time, through Helm values, Docker Compose, or your orchestrator’s environment. A required variable that you do not set makes the server fail on startup. Every Lerian product shares a set of configuration blocks: TLS posture, OpenTelemetry, Access Manager authentication, multi-tenancy, service discovery, and event streaming. The BYOC configuration reference documents these blocks. This page focuses on what is distinctive to the ledger.
Consolidation has landed. You deploy the ledger service (unified onboarding + transaction routes), and CRM and Fees are compiled into that same ledger process — the ledger binary reads the CRM and Fees variables below. Tracer lives in the same repository and ships as its own optional service. The former onboarding, transaction, and mdz components no longer exist as separate deployables. The Helm chart still carries a legacy standalone crm deployment, disabled by default.

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)

The MongoDB variables use one namespace 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)

The transaction module uses RabbitMQ for balance operations and event fan-out.

Throughput

Tracer integration

The optional seam lets the ledger reserve spending limits against Tracer before it commits a transaction. Leave TRACER_BASE_URL unset to disable it.
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, you must set the client certificate, key, and CA paths above.

CRM and Fees

The ledger process reads these variables — CRM and Fees are compiled into the ledger binary. They protect account-holder PII and configure the field-encryption backend.

Shared configuration backbone

The following blocks are identical across Lerian products. The BYOC configuration reference documents them in full. They default off. A single-tenant BYOC deployment can ignore all 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.