Configuration
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.
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 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.