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:
| Variable | JSON setting | Important boundary |
|---|---|---|
JIANDU_DATA_DIR | data_directory | Moves applicable local state paths |
JIANDU_BIND | server.bind | Loopback by default; do not publish plaintext |
JIANDU_DATABASE_URL_FILE | database.url_file | Protected file path, never an inline URL |
JIANDU_WEBDAV_PASSWORD_FILE | storage.password_file | Protected file path, never an inline password |
JIANDU_REMOTE_TELEMETRY | telemetry.remote_export | Master consent; defaults to false |
JIANDU_PRODUCT_METRICS_TELEMETRY | telemetry.product_metrics_export | Separate 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:
| Variable | Purpose |
|---|---|
JIANDU_POSTGRES_PG_DUMP_PATH | Absolute path to a pg_dump binary matching the PostgreSQL server major |
JIANDU_POSTGRES_PG_RESTORE_PATH | Absolute 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:
| Concern | Accepted variables | Accepted behavior |
|---|---|---|
| SDK and resource | OTEL_SDK_DISABLED, OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES | Resource attributes pass a strict allowlist; Jiandu supplies release, instance, and runtime-role identity |
| Signal selection | OTEL_TRACES_EXPORTER, OTEL_METRICS_EXPORTER, OTEL_LOGS_EXPORTER | none or otlp only |
| Propagation | OTEL_PROPAGATORS | tracecontext, optionally baggage; baggage values are discarded |
| Sampling | OTEL_TRACES_SAMPLER, OTEL_TRACES_SAMPLER_ARG | Always-on/off, ratio, and parent-based variants within a finite 0–1 ratio |
| General OTLP transport | OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_HEADERS, OTEL_EXPORTER_OTLP_COMPRESSION, OTEL_EXPORTER_OTLP_TIMEOUT | OTLP/HTTP protobuf only; optional gzip; bounded headers; system-root TLS |
| Per-signal OTLP transport | OTEL_EXPORTER_OTLP_TRACES_*, OTEL_EXPORTER_OTLP_METRICS_*, OTEL_EXPORTER_OTLP_LOGS_* for endpoint, protocol, headers, compression, and timeout | Per-signal value overrides the general value and cannot relax Jiandu's hard bounds |
| Trace batching | OTEL_BSP_MAX_QUEUE_SIZE, OTEL_BSP_MAX_EXPORT_BATCH_SIZE, OTEL_BSP_SCHEDULE_DELAY, OTEL_BSP_EXPORT_TIMEOUT | May lower, never raise, configured process ceilings |
| Log batching | OTEL_BLRP_MAX_QUEUE_SIZE, OTEL_BLRP_MAX_EXPORT_BATCH_SIZE, OTEL_BLRP_SCHEDULE_DELAY, OTEL_BLRP_EXPORT_TIMEOUT | May lower, never raise, configured process ceilings |
| Metric cadence | OTEL_METRIC_EXPORT_INTERVAL | Bounded by telemetry.metric_export_interval_milliseconds |
| SDK limits | OTEL_ATTRIBUTE_COUNT_LIMIT, OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_EVENT_COUNT_LIMIT, OTEL_SPAN_LINK_COUNT_LIMIT | May 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