Skip to main content
KiwiFS reads .kiwi/config.toml from the knowledge root when the server starts. Every key is optional: a missing key takes the default listed on this page, and a missing file means all defaults. Settings are applied in this order, last one wins:
  1. Built-in defaults.
  2. .kiwi/config.toml.
  3. Environment variables that override specific keys (see Environment variables).
  4. kiwifs serve flags you pass explicitly, such as --port or --auth.
Changes take effect on restart. Auth settings can also be reloaded in place by sending SIGHUP to the server.
Any string value can reference an environment variable as ${NAME}. It is expanded at load time, and an unset variable expands to an empty string. Use this to keep secrets out of the file: api_key = "${OPENAI_API_KEY}".

The starter file

kiwifs init, and kiwifs serve on a folder without a config, writes this file. The rest of the generated file is commented-out examples.
.kiwi/config.toml
[storage] root is informational. The server always uses the folder passed to --root.

Server

.kiwi/config.toml

CORS

.kiwi/config.toml
Origins on localhost, 127.0.0.1, and [::1] are always allowed. Beyond those:
  • With auth off (type = "none"), no other origin is allowed, whatever the lists say.
  • With auth on and both lists empty, any origin is allowed, because every request still needs a token.
  • With auth on and either list set, only listed origins are allowed.

Rate limiting

.kiwi/config.toml
Clients are identified by a hash of their bearer token, or by IP address when they send none. /health, /healthz, /readyz, and /metrics are never limited.
.kiwi/config.toml
See Search. Semantic search is off until you set enabled = true and configure an embedder. The vector store defaults to an embedded SQLite store.
.kiwi/config.toml
Set under [search.vector.embedder]. provider defaults to openai.dimensions sets the vector size for providers that support it.The onnx provider also accepts runtime_path, max_tokens, pooling (mean or cls), normalize (default true), query_prefix, passage_prefix, and tensor-name overrides input_ids_name, attention_name, token_type_name, and output_name.
Set under [search.vector.store]. provider defaults to sqlite (sqlite-vec is an alias).
For a CPU-only VPS running Ollama, see Ollama vector search on a small VPS.

Chunking

Pages are split into chunks before embedding.
.kiwi/config.toml
Changing size, overlap, or context_template affects only chunks embedded afterwards. Run kiwifs reindex to rebuild existing vectors.

Versioning

.kiwi/config.toml
If git is not available, the server logs a warning and runs with none. See Versioning.

Authentication

.kiwi/config.toml
.kiwi/config.toml
kiwifs token create generates and stores scoped keys for you. See Auth tokens.
.kiwi/config.toml
The --auth, --api-key, --oidc-issuer, and --oidc-client-id flags on kiwifs serve override these keys.

Space visibility

.kiwi/config.toml
Visibility only matters when auth is on. It relaxes auth for GET and HEAD requests: Change it at runtime with PUT /api/kiwi/space/visibility.

Multi-space

Serve several independent knowledge bases, each with its own git history and indexes, from one server.
.kiwi/config.toml
You can also add spaces with kiwifs serve --space eng=/data/eng. See Multi-space and the Spaces API.

Content rules

Lint

.kiwi/config.toml

Schemas

.kiwi/config.toml
See Schemas.
.kiwi/config.toml
Frontmatter fields listed in typed_fields are indexed as wiki links with that relation, so they show up in backlinks, the graph, and refactor link rewrites. The default is ["contradicts", "supersedes", "superseded_by"]. See Wiki links.

Write guards

[[validate_write]] rules protect existing files based on their current frontmatter. New files are never affected.
.kiwi/config.toml

Sequence numbers

.kiwi/config.toml
  • [sequences] directories: writes under these folders get a monotonic <!-- seq:N --> marker so gaps are detectable.
  • [format_hooks.auto_sequence]: a new file under directory without field in its frontmatter gets the next number, such as number: 12 for ADRs.

Workflow transitions

.kiwi/config.toml
Per-workflow state machines live in .kiwi/workflows/*.json. See Workflows.

Refactoring

Standing rules for refactor plans from the CLI, REST API, MCP, and the web UI’s Restructure view.
.kiwi/config.toml
Agents that apply a plan over the limits are asked to confirm through MCP elicitation when their client supports it. Otherwise the plan waits in GET /api/kiwi/refactor/pending until someone approves it. See Refactor.

Collaboration

Drafts

.kiwi/config.toml
See Draft spaces.

Webhooks

.kiwi/config.toml
[[webhook_entries]] registers webhooks at startup, skipping any URL that is already registered. events can include write, delete, transition, bulk, and rollback. path_glob defaults to **. Without a secret, one is generated. See Webhooks.

Audit

.kiwi/config.toml
Records every API request with its actor and serves the log at GET /api/kiwi/audit. Off by default. See Audit log.

Maintenance

Janitor

The janitor scans for stale pages, orphans, and broken links on a schedule.
.kiwi/config.toml
To flag runbooks whose last execution is too old or failed:
.kiwi/config.toml
date_field defaults to last_executed and max_age_days to stale_days. Findings appear in kiwifs check, kiwifs janitor, and GET /api/kiwi/janitor.

Backup

Push the git history to a remote on a timer.
.kiwi/config.toml
See Backup sync.

Queries

DataView

.kiwi/config.toml
See DQL.

Similarity profiles

Named nearest-neighbour searches over frontmatter, served by GET /api/kiwi/similar and the kiwi_similar MCP tool.
.kiwi/config.toml

Memory

.kiwi/config.toml
Pages under episodes_path_prefix (default episodes/) are treated as episodic when their frontmatter does not say. See Episodic memory.

Web UI

.kiwi/config.toml
Every switch defaults to true. Set one to false to hide that part of the web UI, for example for a read-only public site.
.kiwi/config.toml
[ui.toolbar] views picks which view buttons appear in the header and in what order: graph, bases, canvas, whiteboard, timeline, kanban, and data. An empty list hides them all.
.kiwi/config.toml
banner lists the frontmatter keys shown as chips under the page title. It defaults to ["tags"], and an empty list hides chips. Colors are token names such as emerald, amber, red, or blue, or hex values.
.kiwi/config.toml
Relative paths are served from the knowledge base. Unset keys keep the KiwiFS defaults.
.kiwi/config.toml
mod is Cmd on macOS and Ctrl elsewhere. Actions include search, new_page, toggle_editor, save, toggle_sidebar, graph, toggle_bases, toggle_timeline, toggle_kanban, toggle_mode, shortcuts_help, undo, focus_tree_filter, and close_overlay.
Add entries to the editor’s / menu that insert a template page:
.kiwi/config.toml
See Web UI.

Assets

.kiwi/config.toml

Import

Settings for Airbyte-based imports.
.kiwi/config.toml
See also Import connections.

Tracing

KiwiFS writes a structured JSON record of what each REST or MCP request did: files read, searches run, and writes made.
.kiwi/config.toml

Environment variables

Any other variable can be pulled into the config with ${NAME}.

CLI reference

kiwifs serve flags and every other command.

Optional features

What is off by default and how to turn it on.

Auth tokens

Create scoped API keys.

Deploy with Docker

Pass config and secrets to a container.
Last modified on October 19, 2026