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
- docker-compose.yml
- env.example, saved as
.env
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
| Database | In .env | Start command |
|---|---|---|
| SQLite | DATABASE_DRIVER=sqlite | docker compose up -d |
| PostgreSQL | DATABASE_DRIVER=postgres, DB_PASSWORD, DATABASE_URL | docker compose --profile postgres up -d |
| MySQL | DATABASE_DRIVER=mysql, DB_PASSWORD, DATABASE_URL | docker 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 amysql://URL.
3. Review the important settings
| Setting | Why it matters |
|---|---|
COOKIE_SECURE=true | Required behind HTTPS |
MCP_ENABLED=true | Turns on the MCP endpoint for Codex and Claude Code |
SETTINGS_ENCRYPTION_KEY | Needed to save secrets such as the SMTP password from Studio; back it up |
TRUSTED_PROXIES | Set it behind a reverse proxy, or every client shares one rate-limit budget |
DEMO_MODE | Keep 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.