Deploy with Docker
Dockerfile (minimal)
Section titled “Dockerfile (minimal)”FROM oven/bun:1RUN bun install -g @cuongtran001/kanna
# Kanna's data directory is always $HOME/.kanna — it is not configurable by a# flag or an env var, so the volume has to be mounted where HOME points.ENV HOME=/dataWORKDIR /dataVOLUME ["/data"]
EXPOSE 3210CMD ["kanna", "--remote", "--no-open"]Build + run
Section titled “Build + run”docker build -t kanna .docker run -d \ --name kanna \ -p 3210:3210 \ -v kanna-data:/data \ kanna --remote --no-open --password changemeThe password is a CLI flag, not an -e variable. Anything after the image
name is appended to CMD.
Check the volume is actually being used
Section titled “Check the volume is actually being used”Worth doing once, because the failure mode is silent — the app works fine until the container is replaced:
docker exec kanna ls /data/.kanna/dataYou should see settings.json and the chat directories. An empty or missing
path means HOME is not pointing at the mount.
The agent runs inside the container
Section titled “The agent runs inside the container”Kanna spawns the claude / codex CLIs as subprocesses, and they inherit the
container’s filesystem and HOME. So a containerised install needs those CLIs
present in the image, and the repositories you want to work on mounted in. It is
the same trade-off as any dev-container setup — the agent can only see what the
container can see.