Configuration
Use this section to turn a working Jiandu installation into a deliberate deployment. It explains how to choose a database and blob store, expose the service through HTTPS, and add sign-in methods. The complete configuration reference remains the place to look up every accepted field and bound.
Jiandu combines settings in this order, with later sources winning:
- built-in defaults;
- a versioned JSON configuration file;
- environment variables;
- command-line options.
Unknown JSON keys and unknown command-line options stop startup. This is intentional: a misspelled security or storage setting should not be silently ignored.
Choose one source for each boundary
A higher-precedence source replaces a complete tagged boundary; it does not safely fill in half of
one. For example, set server.ingress.mode, public_origin, and trusted_proxy_cidrs together in
JSON or set all three JIANDU_INGRESS_* variables together. Jiandu rejects partial or ambiguous
boundaries.
Use the JSON file for durable, reviewable structure. Use environment variables for deployment-owned paths and public, non-secret overrides. Jiandu deliberately accepts sensitive values such as a PostgreSQL URL, WebDAV password, or OIDC client secret only through protected file references.
Omitted settings keep their documented defaults. Copy the minimal example for the backend you want, validate it, and add tuning only when measurements or a concrete policy call for it.
A safe editing loop
- Copy the repository's example configuration for the same version as your Jiandu binary.
- Change one concern at a time.
- Keep secrets out of JSON; use the documented file references or your deployment's secret mechanism.
- Validate before restarting.
- Restart and check both the health endpoint and a real browser workflow.
For a source checkout:
cp server/config/example.json server/jiandu.config.json
./scripts/run.sh -- --config jiandu.config.json --check-config
./scripts/run.sh -- --config jiandu.config.json
All current settings take effect after a restart. The validation command resolves the same precedence rules as startup without opening the service.
--check-config validates syntax, cross-field rules, state paths, and protected secret files. It is
deliberately offline: it does not prove that a database, object store, identity provider, or proxy
is reachable. After starting Jiandu, request /api/v1/health/ready through the real ingress path;
that probe checks the selected database and performs a bounded write/read/delete check against blob
storage.
Go deeper by concern
- Reverse proxy and HTTPS — define the public origin and copy a Caddy, Nginx, or Traefik configuration.
- Document storage — choose local disk, Amazon S3, an S3-compatible service, or WebDAV.
- Database — compare SQLite and PostgreSQL, then configure the selected backend.
- Sign-in and identity — add local passwords, passkeys, OIDC, LDAP/AD, or an expert trusted-proxy integration.
- Capture and email
- Telemetry and plugins
- Complete configuration reference
A production change checklist
For every configuration change:
- Save a verified recovery backup before changing a storage, database, or identity boundary.
- Keep the previous configuration and secret files recoverable.
- Run
--check-configas the same operating-system user and with the same mounts as the service. - Restart only one Jiandu process. PostgreSQL and remote blob storage do not make multiple application replicas supported.
- Check liveness and readiness through the public proxy, then exercise the affected workflow with non-sensitive sample data.
- Confirm that the backend port, database, storage endpoint, and identity assertion headers are not exposed more broadly than intended.