Self-Hosting
Deployment Guide
Keep'em provides Docker images for straightforward deployment. This guide covers the Docker Compose approach for small to medium deployments.
Docker Compose
The repository includes a docker-compose.yml that brings up all required services:
- Keep'em application
- PostgreSQL with pgvector
- MinIO (S3-compatible storage)
- Redis
git clone https://github.com/keepem/keepem.git
cd keepem
cp .env.example .env
# Edit .env with your configuration (AI provider keys, etc.)
docker-compose up -dEnvironment Configuration
Key environment variables:
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string |
REDIS_URL | Redis connection string |
S3_ENDPOINT | Object storage endpoint |
S3_BUCKET | Bucket name for video storage |
OPENAI_API_KEY | For transcription and embeddings |
ANTHROPIC_API_KEY | For AI chat responses |
JWT_SECRET | Secret for signing viewer session tokens |
Running Migrations
On first deployment, run database migrations:
docker-compose exec app ./keepem migrateUpdating
Pull the latest image and restart:
docker-compose pull
docker-compose up -d
docker-compose exec app ./keepem migrateProduction Considerations
For production deployments, consider:
- Use a managed PostgreSQL instance (RDS, Cloud SQL) instead of Docker-hosted PostgreSQL
- Put a CDN in front of your object storage for video delivery
- Set up automated backups for your database and object storage
- Configure monitoring and alerting
- Use Kubernetes for high-availability deployments