Skip to main content
KiwiFS runs on Kubernetes as a single-replica Deployment backed by a PersistentVolumeClaim. The project doesn’t ship a Helm chart, so this page gives plain manifests you can adapt.
Run exactly one KiwiFS pod per knowledge root. KiwiFS serializes writes inside one process and takes an exclusive lock on the data directory, so a second pod on the same volume fails to start.

Deployment, Service, and storage

Terminal
strategy: Recreate stops the old pod before starting the new one, so an upgrade never has two pods competing for the volume. On first start, KiwiFS initializes an empty volume as a new knowledge base. The image runs as the non-root user kiwi. If the volume isn’t writable by that user, set securityContext.fsGroup on the pod to the user’s group ID, which docker run --rm --entrypoint id ameliaanhlam/kiwifs prints.

Configuration and secrets

Keep config.toml in a ConfigMap and secrets in a Secret. config.toml can read secrets from environment variables with ${VAR}, which you then fill from the Secret.
Mount only the file, with subPath, so the rest of /data/.kiwi stays on the writable volume. Because the config file already exists, KiwiFS skips its first-start initialization, so run kiwifs init in an init container. It only creates files that are missing.
kiwifs-deployment.yaml (excerpt)
KiwiFS reads config.toml at startup. A subPath mount doesn’t pick up ConfigMap edits, so restart the Deployment after changing it with kubectl rollout restart deployment/kiwifs.
KiwiFS only reads a few environment variables directly: KIWI_BACKUP_REMOTE, KIWI_BACKUP_INTERVAL, KIWI_BACKUP_REBASE_BEFORE_PUSH, and KIWI_PUBLIC_URL. Everything else, including API keys, must be referenced from config.toml.

Health probes

Health endpoints don’t require authentication, even when auth is on.

NFS for other pods

KiwiFS includes a userspace NFSv3 server, so other pods can mount the knowledge base as a native volume. It doesn’t need privileged mode or kernel NFS support.
1

Enable NFS on the KiwiFS pod

By default NFS accepts localhost only. Set --nfs-allow to the CIDRs your nodes mount from, since the kubelet performs the mount from the node.
2

Expose the NFS port

kiwifs-nfs-service.yaml
3

Mount it from another pod

Nodes often can’t resolve cluster DNS names, so use the Service’s ClusterIP as server.
Mount NFS read-only in consumer pods and send writes through the REST API or MCP, so every change gets a commit and an index update.
See Alternate protocols for S3 and WebDAV, which you expose the same way on ports 3334 and 3335.

Multiple spaces

Serve several knowledge bases from one pod by mounting a volume per space and registering each with --space name=path.
Each space has its own files, history, and search index, served under /api/kiwi/<name>/.... See Multi-space.

Ingress

kiwifs-ingress.yaml
Raise proxy-body-size for file uploads, which the import endpoint accepts up to 256 MB, and proxy-read-timeout for document exports, which can take up to five minutes. The web UI and API expect to be served from the root path.

Docker

Image contents, environment variables, and Compose.

Backup sync

Push history to a git remote on a schedule.
Last modified on October 19, 2026