Self-host
The same Docker image as the hosted version. Run it in your own AWS, GCP, or on-prem environment with your own PostgreSQL, S3, and SMTP.
System requirements
- CPU
- 2 vCPU for the API and 1 for the worker, minimum.
- RAM
- 4 GB for the API + 2 GB for the worker, minimum.
- PostgreSQL
- 16+ with the
pgvectorextension (optional, only needed for AI). - Redis
- 7+ for queues and caching.
- S3-compatible storage
- AWS S3, GCS, MinIO, Wasabi.
- SMTP
- Any SMTP provider, or the Resend/SES API.
Running it with Docker Compose
# Log in to get access to the image
docker login ghcr.io -u {your-username}
# Download the compose file
curl -O https://raw.githubusercontent.com/pegalio/deploy/main/docker-compose.yml
# Create a .env with DATABASE_URL, REDIS_URL, S3_*, SMTP_*
cp .env.example .env
nano .env
# Bring it up
docker compose up -dEnvironment variables
The full list lives in .env.example. At minimum:
DATABASE_URL— the PostgreSQL connection string.REDIS_URL— the Redis connection string.S3_*— endpoint, region, bucket, access keys.SESSION_SECRET— at least 32 characters.BASE_URL— your installation's public URL.SMTP_*— for magic links and notifications.
In production, make sure to change SESSION_SECRET to a long random value. The default is rejected in production mode and the server won't start.
HTTPS and a reverse proxy
Put a reverse proxy (Nginx, Caddy, Traefik) in front of the container. Caddy will issue a Let's Encrypt certificate automatically:
firstvalue.your-company.com {
reverse_proxy localhost:3001
}
onboard.your-company.com {
reverse_proxy localhost:3002
}Backups
It's enough to back up PostgreSQL and the S3 bucket. Redis is just cache and queues — you don't need to back it up (queues recover; the cache just rebuilds).
Updates
Releases ship every sprint, patches weekly. Use semantic tags (:0.42, :latest). Database migrations run automatically when the container starts.