Skip to content

Build from source

Kova’s published GHCR image is built directly from Dockerfile in the repository root. Build it yourself if you need custom patches or want to develop locally.

  • Docker Buildx (with DOCKER_BUILDKIT=1), for building the multi-stage container image.
  • Bun 1.4+ (bun@1.4.5 pinned in package.json), for running tests or the local development servers.
Terminal window
git clone https://github.com/rushlightlab/kova.git
cd kova
cp .env.example .env
# Generate a 32-byte key with `openssl rand -hex 32` and set KOVA_ENCRYPTION_KEY in .env
docker build -t kova:local .

The Dockerfile runs four stages—dependency install (oven/bun:1.4.5-alpine), Vite + React Compiler SPA build, Bun server bundle, and a minimal oven/bun:1.4.5-distroless runtime running as nonroot (65532:65532). You can also run the test stage inside Docker before packing:

Terminal window
docker build --target test -t kova:test .

Start your local build with hardened flags and --env-file .env:

Terminal window
docker run -d --name kova \
--read-only --tmpfs /tmp \
--cap-drop ALL --security-opt no-new-privileges:true \
-p 127.0.0.1:3000:3000 \
-v kova_data:/data \
--env-file .env \
kova:local

To run Kova in watch mode without Docker:

Terminal window
bun install
cp .env.example .env
# Generate and set KOVA_ENCRYPTION_KEY in .env
bun run dev

Turborepo starts:

  • @kova/server API on http://localhost:3000 (with SQLite stored at KOVA_DB_PATH)
  • @kova/web Vite dev server on http://localhost:5173 (proxying /api/* and /s/* to :3000)

Run the full workspace verification suite anytime with:

Terminal window
bun run format:check
bun run lint
bun run typecheck
bun run test
bun run build