Skip to content

Self hosting

Keanan is built to be owned. The production stack is one Compose file, and the provided script stands it up on a single AWS instance for about twelve euros per month.

Service Role
web Django API served by Daphne, WebSockets included
celery and beat Reminders, monthly invoices, slide previews
db PostgreSQL 16
redis Cache, channels and task broker
unleash Self hosted feature flags
caddy Automatic TLS, serves the dashboard and media
Terminal window
cd infra/aws
REPO_URL=git@github.com:you/keanan.git \
KEANAN_DOMAIN=app.client.com \
./deploy.sh

The script finds the latest Ubuntu image, creates a key pair and a security group, launches the instance and installs everything through cloud init. When it finishes, point an A record for your domain at the printed IP address. Caddy obtains a TLS certificate the moment DNS resolves.

A t4g.small instance carries a team of ten to fifty comfortably. Move to t4g.medium when you pass that.

Any Linux machine with Docker works the same way:

Terminal window
cd infra
cp .env.production.example .env
# fill in KEANAN_DOMAIN, SECRET_KEY, DB_PASSWORD and UNLEASH_ADMIN_TOKEN
docker compose -f docker-compose.prod.yml up -d --build

The containers are stateless apart from Postgres and media. When a client outgrows a single instance, move the database to RDS by changing the DB_ variables, move media to S3 by setting the AWS_ variables, and run the web and worker containers on any platform you like. No code changes are involved.

A nightly run of export_tenant plus a copy of the archive off the machine is a complete backup. Restoring is described in the migration guide.