Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.33 KB

File metadata and controls

51 lines (38 loc) · 1.33 KB

Configuration

Zim loads one YAML configuration file, then applies ZIM_* environment variables. The first existing file in this list wins:

  1. ~/.config/zim/config.yaml (canonical XDG location)
  2. ~/.zim.yaml (legacy)
  3. ~/.config/zim.yaml (legacy)
  4. /etc/zim.yaml
  5. 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: 0

index.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 create

Zim 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 show

SQLite is the only index backend. The optional index.backend: sqlite setting remains accepted for compatibility; omit it for the default behavior.