Skip to main content
Multi-space mode lets one KiwiFS process host multiple independent knowledge bases. Each space has its own root directory, git repo, search index, and .kiwi/ state.

When to use multi-space

  • Separate team wikis on one host (engineering vs product).
  • Per-tenant isolation in self-hosted deployments.
  • A default space plus dynamically provisioned workspaces.

Configure spaces

.kiwi/config.toml
The primary space is the one you serve from --root, optionally named with [space] name. Requests without a space identifier route there. Additional [[spaces]] entries are extra isolated knowledge bases.

Browser URLs

Legacy /page/{space}/{path} links still resolve when {space} is a registered name.

Request routing

Resolution order:
If X-Kiwi-Space is set but the space does not exist, the request fails immediately — no silent fallback to the default.

Space admin API

Dynamic spaces persist to .kiwi/spaces.json under the first space’s root and restore on restart. See Spaces API for curl examples.

Per-space auth

With auth.type = "perspace", API keys scope to a single space:
.kiwi/config.toml

MCP

Use --space <name> when the knowledge root hosts multiple configured spaces:

Configuration

[[spaces]] config syntax.

Spaces API

REST CRUD for space management.
Last modified on August 20, 2026