Skip to content

Docker

Use docker run when trying Kova locally or deploying onto a host that already has Caddy, Nginx, or Traefik running.

Terminal window
docker run -d --name kova \
--restart unless-stopped \
-p 127.0.0.1:3000:3000 \
-v kova_data:/data \
-e KOVA_BASE_URL="http://localhost:3000" \
-e KOVA_ENCRYPTION_KEY="$(openssl rand -hex 32)" \
ghcr.io/rushlightlab/kova:0.1.0

Open http://localhost:3000/setup to create your Admin account. If you are connecting to local MinIO, Garage, or RustFS on localhost/LAN, also add -e KOVA_ALLOW_PRIVATE_ENDPOINTS=true.

Keep secrets out of shell history by saving a .env file (chmod 600 .env, never committed to Git) and passing --env-file .env:

.env
KOVA_BASE_URL=https://kova.example.com
# Encrypts saved S3 credentials (32 bytes): openssl rand -hex 32
KOVA_ENCRYPTION_KEY=<generated-64-hex-key>
KOVA_ADMIN_EMAIL=you@example.com
KOVA_ADMIN_PASSWORD=<strong-12+-char-password>
# Only behind a reverse proxy: the proxy's /32 IP, nothing wider.
# KOVA_TRUSTED_PROXIES=127.0.0.1/32
# Uncomment for local/LAN MinIO, Garage, or RustFS endpoints:
# KOVA_ALLOW_PRIVATE_ENDPOINTS=true

Because Kova ships as a distroless image running as non-root 65532:65532, it runs cleanly with a read-only root filesystem, zero Linux capabilities, and --env-file .env:

Terminal window
docker run -d --name kova \
--restart unless-stopped \
--read-only \
--tmpfs /tmp \
--cap-drop ALL \
--security-opt no-new-privileges:true \
--stop-timeout 15 \
-p 127.0.0.1:3000:3000 \
-v kova_data:/data \
--env-file .env \
ghcr.io/rushlightlab/kova:0.1.0

Kova bakes a native HEALTHCHECK calling GET /api/health on port 3000 (returns {"status":"ok","db":"ok"}):

Terminal window
curl -fsS http://127.0.0.1:3000/api/health

Back up /data/kova.db (see Backups & Key Rotation), pull the new version tag, and recreate the container while keeping the same .env (KOVA_ENCRYPTION_KEY) and kova_data volume:

Terminal window
docker pull ghcr.io/rushlightlab/kova:0.1.0
docker stop kova && docker rm kova
# Re-run docker run --env-file .env with the new tag and same kova_data volume
  • Cannot reach container on port 3000: Check docker ps and docker logs kova. Ensure KOVA_ENCRYPTION_KEY is at least 32 decoded bytes (64 hex characters or 44-char base64).
  • INVALID_ORIGIN on login: KOVA_BASE_URL must match the exact scheme, hostname, and port in your browser address bar.
  • Access blocked to private/loopback endpoints: Set KOVA_ALLOW_PRIVATE_ENDPOINTS=true if adding local MinIO, Garage, or RustFS endpoints.