Keep'emKeep'em
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 -d

Environment Configuration

Key environment variables:

VariableDescription
DATABASE_URLPostgreSQL connection string
REDIS_URLRedis connection string
S3_ENDPOINTObject storage endpoint
S3_BUCKETBucket name for video storage
OPENAI_API_KEYFor transcription and embeddings
ANTHROPIC_API_KEYFor AI chat responses
JWT_SECRETSecret for signing viewer session tokens

Running Migrations

On first deployment, run database migrations:

docker-compose exec app ./keepem migrate

Updating

Pull the latest image and restart:

docker-compose pull
docker-compose up -d
docker-compose exec app ./keepem migrate

Production 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