Deploy
Get Ottoch running in minutes
Docker Compose for both editions — Redis is bundled in the stack. Community edition is free, no license needed.
Community Edition
Docker Compose — free tier
Two services: the app and Redis for rate limiting. SQLite is built-in — no external database needed.
Want to try it with sample data first?
Skip writing your own compose file — ottoch-demo bundles the app, Redis, and one of every supported database (PostgreSQL, MySQL, MariaDB, SQL Server, ClickHouse, SQLite), pre-seeded with a shared sample dataset so you can try real queries across engines before connecting anything of your own.
git clone https://github.com/ottochapp/ottoch-demo cd ottoch-demo cp .env.example .env docker compose up -d
1. Create your compose file
services:
redis:
image: redis:7-alpine
restart: unless-stopped
command: redis-server --save "" --appendonly no --maxmemory 128mb --maxmemory-policy allkeys-lru
app:
image: registry.ottoch.com/ottoch:latest-ce
restart: unless-stopped
depends_on:
- redis
ports:
- "80:80"
- "443:443"
env_file: .env
volumes:
- ottoch_data:/data
volumes:
ottoch_data:
2. Create your .env file
DJANGO_SECRET_KEY=replace-with-a-long-random-string ENCRYPTION_KEY=replace-with-a-fernet-key REDIS_URL=redis://redis:6379/0 DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1 ADMIN_URL=admin/
Generate DJANGO_SECRET_KEY:
python -c "import secrets; print(secrets.token_urlsafe(50))"
Generate ENCRYPTION_KEY:
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
3. Start the stack
docker compose up -d
docker compose logs app
Check the logs for your auto-generated admin credentials on first boot.
Use the credentials from the logs. You'll be asked to change your password on first login.
Settings → LLM Config. Supports OpenAI, Anthropic, Gemini, and any OpenAI-compatible endpoint.
Add a connection, activate the tables you want to expose, then open the dashboard and start chatting.
Configuration
Environment variables
Set these in your .env file alongside the Compose file.
| Variable | Description | Default |
|---|---|---|
DJANGO_SECRET_KEY |
Django secret key — long random string, never reuse across instances | Required |
ENCRYPTION_KEY |
Fernet key — encrypts stored credentials and AI keys at rest | Required |
REDIS_URL |
Redis connection URL for query rate limiting | redis://redis:6379/0 |
DATABASE_URL |
Database URL — CE uses SQLite by default, EE typically uses PostgreSQL | SQLite |
DJANGO_ALLOWED_HOSTS |
Comma-separated list of allowed host headers — add your domain in production | localhost,127.0.0.1 |
ADMIN_URL |
Path to the Django admin — change to something non-obvious (must end with /) | admin/ |
OTTOCH_SITE_URL |
Public URL of your instance | https://ottoch.com |
OTTOCH_OUTBOUND_IPS |
Comma-separated server outbound IPs, shown to users for firewall setup | empty |
LICENSE_KEY_SALT |
License validation salt — Enterprise Edition only | EE only |
SENTRY_DSN |
Sentry DSN for error tracking | optional |
EMAIL_HOST / EMAIL_HOST_USER / EMAIL_HOST_PASSWORD |
SMTP settings for system emails | optional |
Enterprise Edition
Docker Compose with PostgreSQL
Three services: Redis, PostgreSQL, and the app. Includes LDAP/Active Directory, multi-user RBAC, follow-up detection, and license-based activation.
1. Log in to the Enterprise registry
The EE image isn't public — you need the registry username and password we sent you when you purchased your license.
docker login ee-registry.ottoch.com
2. docker-compose.yml
services:
redis:
image: redis:7-alpine
restart: unless-stopped
command: redis-server --save "" --appendonly no --maxmemory 128mb --maxmemory-policy allkeys-lru
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ottoch
POSTGRES_USER: ottoch
POSTGRES_PASSWORD: changeme
volumes:
- pgdata:/var/lib/postgresql/data
app:
image: ee-registry.ottoch.com/ottoch:latest-ee
restart: unless-stopped
depends_on:
- redis
- db
ports:
- "80:80"
- "443:443"
env_file: .env
volumes:
- ottoch_data:/data
volumes:
pgdata:
ottoch_data:
3. .env
DJANGO_SECRET_KEY=replace-with-a-long-random-string ENCRYPTION_KEY=replace-with-a-fernet-key LICENSE_KEY_SALT=replace-with-your-license-salt DATABASE_URL=postgres://ottoch:changeme@db:5432/ottoch REDIS_URL=redis://redis:6379/0 DJANGO_ALLOWED_HOSTS=yourdomain.com ADMIN_URL=your-secret-admin-path/
4. Start the stack
docker compose up -d
docker compose pull will need step 1's login again on any machine it hasn't run on before.
changeme with a real Postgres password in both the db service and DATABASE_URL.
LICENSE_KEY_SALT must match the salt configured in your Ottoch portal. Each customer activates their own license key.
Custom domain
HTTPS with your own domain
Ottoch ships with Caddy, which handles HTTPS automatically via Let's Encrypt.
Create an A record pointing yourdomain.com to your server's IP. TTL of 300s is fine for initial setup.
Set DJANGO_ALLOWED_HOSTS=yourdomain.com and OTTOCH_SITE_URL=https://yourdomain.com, then run docker compose up -d. Caddy obtains an HTTPS certificate automatically on first request.
Backup & restore
Keeping your data safe
Community Edition (SQLite volume)
docker run --rm \ -v ottoch_data:/data \ -v $(pwd):/backup \ alpine \ tar czf /backup/ottoch-backup.tar.gz /data
Creates ottoch-backup.tar.gz in the current directory. Schedule with cron or any backup tool.
Enterprise Edition (PostgreSQL)
docker compose exec db \ pg_dump -U ottoch ottoch \ | gzip > ottoch-$(date +%Y%m%d).sql.gz
Standard pg_dump. Restore with gunzip | psql.
Updates
Staying up to date
Data persists in named volumes. Pull the new image and recreate the container — the volume survives.
Community Edition
docker compose pull docker compose up -d
Enterprise Edition
docker compose pull docker compose up -d
Questions? Need an enterprise license?
We're happy to help you get set up.