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.
What the stack contains
Section titled “What the stack contains”| 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 |
The quick path on AWS
Section titled “The quick path on AWS”cd infra/awsREPO_URL=git@github.com:you/keanan.git \KEANAN_DOMAIN=app.client.com \./deploy.shThe 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.
The manual path, anywhere
Section titled “The manual path, anywhere”Any Linux machine with Docker works the same way:
cd infracp .env.production.example .env# fill in KEANAN_DOMAIN, SECRET_KEY, DB_PASSWORD and UNLEASH_ADMIN_TOKENdocker compose -f docker-compose.prod.yml up -d --buildGrowing beyond one machine
Section titled “Growing beyond one machine”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.
Backups
Section titled “Backups”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.