Skip to main content

Configuration

Jiandu combines settings in this order, with later sources winning:

  1. built-in defaults;
  2. a versioned JSON configuration file;
  3. environment variables;
  4. 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.

A safe editing loop

  1. Copy the repository's example configuration for the same version as your Jiandu binary.
  2. Change one concern at a time.
  3. Keep secrets out of JSON; use the documented file references or your deployment's secret mechanism.
  4. Validate before restarting.
  5. Restart and check both the health endpoint and a real browser workflow.

For a source checkout:

cp server/config/example.json 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.

Go deeper by concern