Start

Docker Compose

A complete docker-compose.yml and .env for Kanesh with SQLite, PostgreSQL or MySQL.

By the end of this page you have Kanesh running with Docker Compose, with every setting in one .env file.

Before you start

  • Docker with the Compose plugin (docker compose version)
  • The Kanesh image. During the preview, build it from source and set KANESH_IMAGE=kanesh.

1. Download the two files

mkdir kanesh && cd kanesh
curl -fsSLO https://YOUR_KANESH_SITE/compose/docker-compose.yml
curl -fsSL https://YOUR_KANESH_SITE/compose/env.example -o .env
chmod 600 .env

2. Pick a database

DatabaseIn .envStart command
SQLiteDATABASE_DRIVER=sqlitedocker compose up -d
PostgreSQLDATABASE_DRIVER=postgres, DB_PASSWORD, DATABASE_URLdocker compose --profile postgres up -d
MySQLDATABASE_DRIVER=mysql, DB_PASSWORD, DATABASE_URLdocker compose --profile mysql up -d

The database services only start with their profile, so SQLite installs run a single container.

Note: MySQL uses a go-sql-driver DSN such as kanesh:secret@tcp(mysql:3306)/kanesh, not a mysql:// URL.

3. Review the important settings

SettingWhy it matters
COOKIE_SECURE=trueRequired behind HTTPS
MCP_ENABLED=trueTurns on the MCP endpoint for Codex and Claude Code
SETTINGS_ENCRYPTION_KEYNeeded to save secrets such as the SMTP password from Studio; back it up
TRUSTED_PROXIESSet it behind a reverse proxy, or every client shares one rate-limit budget
DEMO_MODEKeep false. When true, the owner credentials are shown on the login screen

See Configuration for every variable.

4. Start and claim

docker compose up -d
docker compose cp kanesh:/data/claim-token ./claim-token

Open http://127.0.0.1:8080, paste the token and create the owner.

File storage

Uploads are stored in the database by default. To keep them in S3 or MinIO, set STORAGE_DRIVER=s3 and the S3_* variables. See File uploads and storage.

Next steps

Buy me a coffee