Prerequisites
-
An Ollama server that the KiwiFS process can reach. KiwiFS calls its
/api/embedendpoint. -
An embedding model pulled into Ollama:
Terminal
Configure KiwiFS
1
Edit the config
.kiwi/config.toml
2
Start the server
Terminal
3
Rebuild on demand (optional)
To embed everything ahead of time, or to start over, stop the server and run:
Terminal
--vector makes the command fail fast if vector search isn’t configured.Settings
The SQLite store needs no API key and no separate service. Like every index in
.kiwi/state/, it’s derivative data that kiwifs reindex rebuilds from your markdown files.
Choose the Ollama URL
base_url depends on where KiwiFS and Ollama run.
Same host
Same host
.kiwi/config.toml
KiwiFS in Docker, Ollama on the host
KiwiFS in Docker, Ollama on the host
On Linux, map Ollama listens on
host.docker.internal to the host gateway.docker-compose.yml
.kiwi/config.toml
127.0.0.1 by default. Start it with OLLAMA_HOST=0.0.0.0 so the container can reach it.Both in one Compose project
Both in one Compose project
Use the Ollama service name as the host name.Pull the model inside the Ollama container:
docker-compose.yml
.kiwi/config.toml
docker compose exec ollama ollama pull nomic-embed-text.Tune for your machine
Keep
worker_count = 1 for the first reindex of a large knowledge base, and raise it later only if CPU, memory, and Ollama latency stay stable.
Test semantic search
Terminal
Troubleshooting
KiwiFS can't reach Ollama
KiwiFS can't reach Ollama
Check the URL from the machine or container that runs KiwiFS. The KiwiFS image has BusyBox
wget but not curl.Terminal
The model is missing
The model is missing
Terminal
The first reindex failed partway
The first reindex failed partway
Keep the same config, raise
timeout, and run kiwifs reindex --root ./knowledge again. Vectors are rebuilt from the markdown files, so nothing is lost.A full vector rebuild, from kiwifs reindex or the server’s startup backfill, stops after 10 minutes. If a large knowledge base can’t finish in that time, raise worker_count as far as your machine allows or use a smaller embedding model.Results look wrong after changing the model
Results look wrong after changing the model
Vectors from different models aren’t comparable. After changing
model, run kiwifs reindex, which clears the vector store before embedding every page again.