Skip to main content

Environment variables

Environment values override the JSON file and are themselves overridden by explicit command-line values. An invalid value stops startup with environment variable NAME has an invalid value.

Every Jiandu-specific environment alias is generated from the current configuration contract in the complete configuration reference. Search that page for the exact variable name to see its JSON path, type, default, bound, and whether it is a secret-file reference. The published JSON Schema is the machine-readable authority.

Examples:

VariableJSON settingImportant boundary
JIANDU_DATA_DIRdata_directoryMoves applicable local state paths
JIANDU_BINDserver.bindLoopback by default; do not publish plaintext
JIANDU_DATABASE_URL_FILEdatabase.url_fileProtected file path, never an inline URL
JIANDU_WEBDAV_PASSWORD_FILEstorage.password_fileProtected file path, never an inline password
JIANDU_REMOTE_TELEMETRYtelemetry.remote_exportMaster consent; defaults to false
JIANDU_PRODUCT_METRICS_TELEMETRYtelemetry.product_metrics_exportSeparate consent and requires remote export

Deprecated JIANDU_PUBLIC_HOSTNAME, JIANDU_TRUST_TLS_TERMINATION, and JIANDU_TRUSTED_PROXY_CIDRS must appear only as the complete legacy HTTPS set. Never mix them with JIANDU_INGRESS_*. The deprecated singleton JIANDU_OIDC_* variables remain available only for configuration migration; new multi-provider registries are file-only.

Offline PostgreSQL tool overrides​

The backup and restore commands also accept two process-only overrides that are not part of the server configuration schema:

VariablePurpose
JIANDU_POSTGRES_PG_DUMP_PATHAbsolute path to a pg_dump binary matching the PostgreSQL server major
JIANDU_POSTGRES_PG_RESTORE_PATHAbsolute path to a pg_restore binary matching the backup archive and target server major

See Backup and restore before overriding either tool.

Standard OpenTelemetry variables​

Jiandu accepts this bounded standard OTel surface in addition to the aliases generated from the JSON Schema:

ConcernAccepted variablesAccepted behavior
SDK and resourceOTEL_SDK_DISABLED, OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTESResource attributes pass a strict allowlist; Jiandu supplies release, instance, and runtime-role identity
Signal selectionOTEL_TRACES_EXPORTER, OTEL_METRICS_EXPORTER, OTEL_LOGS_EXPORTERnone or otlp only
PropagationOTEL_PROPAGATORStracecontext, optionally baggage; baggage values are discarded
SamplingOTEL_TRACES_SAMPLER, OTEL_TRACES_SAMPLER_ARGAlways-on/off, ratio, and parent-based variants within a finite 0–1 ratio
General OTLP transportOTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_COMPRESSION, OTEL_EXPORTER_OTLP_TIMEOUTOTLP/HTTP protobuf only; optional gzip; bounded headers; system-root TLS
Per-signal OTLP transportOTEL_EXPORTER_OTLP_TRACES_*, OTEL_EXPORTER_OTLP_METRICS_*, OTEL_EXPORTER_OTLP_LOGS_* for endpoint, protocol, headers, compression, and timeoutPer-signal value overrides the general value and cannot relax Jiandu's hard bounds
Trace batchingOTEL_BSP_MAX_QUEUE_SIZE, OTEL_BSP_MAX_EXPORT_BATCH_SIZE, OTEL_BSP_SCHEDULE_DELAY, OTEL_BSP_EXPORT_TIMEOUTMay lower, never raise, configured process ceilings
Log batchingOTEL_BLRP_MAX_QUEUE_SIZE, OTEL_BLRP_MAX_EXPORT_BATCH_SIZE, OTEL_BLRP_SCHEDULE_DELAY, OTEL_BLRP_EXPORT_TIMEOUTMay lower, never raise, configured process ceilings
Metric cadenceOTEL_METRIC_EXPORT_INTERVALBounded by telemetry.metric_export_interval_milliseconds
SDK limitsOTEL_ATTRIBUTE_COUNT_LIMIT, OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_EVENT_COUNT_LIMIT, OTEL_SPAN_LINK_COUNT_LIMITMay lower Jiandu's closed privacy and resource limits

The per-signal * suffixes above are exactly ENDPOINT, PROTOCOL, HEADERS, COMPRESSION, and TIMEOUT.

Remote export still requires JIANDU_REMOTE_TELEMETRY=true. Selecting an exporter or endpoint alone never grants consent. Plaintext export is limited to literal loopback collector addresses unless JIANDU_OTLP_ALLOW_INSECURE=true explicitly acknowledges the transport risk. Unsupported gRPC, certificate, client-certificate, exporter, sampler, propagator, protocol, compression, resource attribute, or out-of-range input fails closed.

Secret handling​

OTLP *_HEADERS values can contain credentials. Keep them in a protected service environment, not a committed file or diagnostic output. They are bounded, excluded from the effective-configuration display, and never attached to telemetry.

For the complete endpoint, privacy, and queue behavior, read Telemetry and plugins. Validate the effective process environment before restart:

jiandu --config /etc/jiandu/jiandu.json --check-config