Zim loads one YAML configuration file, then applies ZIM_* environment variables. The first existing file in this list wins:
~/.config/zim/config.yaml(canonical XDG location)~/.zim.yaml(legacy)~/.config/zim.yaml(legacy)/etc/zim.yaml- Built-in defaults when no file exists
Environment variables have the highest precedence. Replace dots with underscores, for example server.port becomes ZIM_SERVER_PORT.
library:
path: ~/.cache/zim
server:
host: localhost
port: 8080
read_timeout: 30
write_timeout: 30
idle_timeout: 60
search:
max_results: 50
non_interactive: false
json_output: false
index:
path: ""
vector_index: exact
parallel: true
batch_size: 1000
worker_count: 0index.path defaults to index.sqlite inside the configured library. worker_count: 0 selects the available CPU count. Set parallel: false to force one indexing worker.
Create the canonical file with:
zim config createZim creates the parent directory and writes the file with owner-only permissions. It asks before replacing an existing file. Inspect the effective values and selected file with:
zim config showSQLite is the only index backend. The optional index.backend: sqlite setting remains accepted for compatibility; omit it for the default behavior.