spi, dict, brcode, and core), so its variable set is broad.
The service reads every variable at startup. When systemplane is on (the default), it can override a subset at runtime without a restart. The rest of the variables need a restart to change. For the knobs that behave the same across every Lerian Go service (deployment posture, datastores, telemetry, streaming), see BYOC configuration essentials.
In the tables below, Required marks a variable you must set, always (Yes) or under the condition named. — means no default. The conditions use three terms:
- Live: the BACEN endpoint uses
https. A local environment also accepts anhttpendpoint. - Local environment:
ENV_NAMEisdevelopment,local, ortest. - Protected environment:
ENV_NAMEisproduction,prod,staging,stage,pre-prod,preprod,pre-production, orpreproduction.
Most BACEN-facing variables carry a surface prefix:
BACEN_SPI_* for the SPI settlement transport, BACEN_DICT_* for the DICT client, BACEN_BRCODE_JOSE_* for BR Code JOSE signing, and BACEN_ICOM_* for the inbound long-poll channel.Runtime and server
A protected environment requires the server certificate and key files, or
TLS_TERMINATED_UPSTREAM=true.
Authentication
Lerian SPI authorizes protected routes, including the systemplane admin API, through Access Manager.BACEN callback (inbound from SPI)
Outside a local environment, the rail needs exactly one callback mutual-TLS mode. In direct mode, set
SERVER_TLS_CERT_FILE, SERVER_TLS_KEY_FILE, and SERVER_TLS_CLIENT_CA_FILE. In proxy mode, set TLS_TERMINATED_UPSTREAM=true, the trusted CIDRs, and the header secret.
SPI settlement transport (BACEN_SPI_*)
Connection to BACEN’s SPI settlement endpoint over the RSFN, with the secondary messaging channel and the file-transfer (ARQ) endpoint.
mutual TLS to BACEN
TheBACEN_TLS_* files back the mutual-TLS channel to BACEN. The SPI and DICT clients share them.
Message signing and certificates
Lerian SPI digitally signs its outbound messages. Pick a custody backend withBACEN_SPI_SIGNER_KIND.
Certificate validation (OCSP/CRL)
Payload resolver
These variables control how the service stores and references large SPI payloads.Inbound channel (BACEN_ICOM_*)
Long-poll channel for messages BACEN pushes back to the participant.
Either consumer requires a configured persistence backend,
BACEN_ICOM_ISPB, BACEN_SPI_INTERNAL_CALLBACK_SECRET, and BACEN_CALLBACK_MTLS_HEADER_SECRET. The primary consumer also requires BACEN_ICOM_BASE_URL. The secondary consumer also requires BACEN_SPI_SECONDARY_ENDPOINT.
DICT client (BACEN_DICT_*)
Client for BACEN’s Pix key directory (DICT), including the NP endpoint for batch key-existence checks.
BR Code JOSE signing (BACEN_BRCODE_JOSE_*)
Signs dynamic BR Code payloads (JWS). When BACEN_BRCODE_JOSE_SIGNER_KIND is unset, JOSE is disabled and the public payload endpoints refuse to serve.
PII encryption and hashing
Each key is 32 bytes, raw or base64. Each pepper has at least 32 characters.PostgreSQL
Redis
Outbox and streaming
Lerian SPI publishes events through a transactional outbox and a streaming producer, and consumes settlement events for BR Code. The BR Code settlement consumer runs unconditionally. Streaming has no enable switch:STREAMING_BROKERS is required at startup, including when OUTBOX_ENABLED=false. Each binary requires its own fixed STREAMING_CLOUDEVENTS_SOURCE value, and any other value stops startup. Use the value that Lerian supplies for each binary. Configure STREAMING_COMPRESSION, STREAMING_REQUIRED_ACKS, and STREAMING_EVENT_POLICIES as described in Streaming and outbox.
Schedulers
Background jobs, each with its own switch. The four DICT jobs that default totrue carry regulatory duties, so the dict binary starts its scheduler for them unless SCHEDULER_ENABLED=false. The jobs that default to false also need SCHEDULER_ENABLED=true. DICT discovery and inventory workers have their own controls in the next section.
DICT discovery and inventory
The workers below run independently ofSCHEDULER_ENABLED, each with its own switch.
Rate limiting, idempotency, and connectivity
Systemplane and runtime configuration
See Systemplane for the API, namespaces, and required permissions.
Observability
Documentation
Health and readiness
Lerian SPI exposesGET /health (liveness), GET /readyz (readiness), and GET /version on the main HTTP port. /metrics runs on its own listener when enabled. See Health and readiness for the probe contract.
