Docker Compose
Docker Compose is the simplest way to self-host XeroML. It runs all services on a single machine and is ideal for development, testing, and small production deployments.
Prerequisites
- Docker Engine 24.0 or later
- Docker Compose v2.20 or later
- A server with at least 4GB RAM and 2 CPUs
Quick Start
# Clone the XeroML repositorygit clone https://github.com/xeroml/xeroml.gitcd xeroml
# Copy the example environment filecp .env.example .env
# Generate secure secretsopenssl rand -hex 32 # Use for NEXTAUTH_SECRETopenssl rand -hex 32 # Use for SALT
# Edit .env with your secretsnano .env
# Start all servicesdocker compose up -dXeroML will be available at http://localhost:3000 after all services start (usually 30-60 seconds).
Environment Configuration
Edit .env with at minimum:
# Required: Application secretsNEXTAUTH_SECRET=<generate with: openssl rand -hex 32>SALT=<generate with: openssl rand -hex 32>
# Required: Database connection (auto-configured for Docker Compose)DATABASE_URL=postgresql://xeroml:xeroml@db:5432/xeroml
# Optional: Email (for account verification)SMTP_HOST=smtp.example.comSMTP_PORT=587SMTP_USER=user@example.comSMTP_PASS=passwordEMAIL_FROM=noreply@yourdomain.com
# Optional: Object storage for mediaLANGFUSE_S3_MEDIA_UPLOAD_ENABLED=trueS3_BUCKET_NAME=your-bucketS3_ACCESS_KEY=...S3_SECRET_KEY=...Services Included
The default docker-compose.yml starts:
| Service | Port | Purpose |
|---|---|---|
web | 3000 | XeroML web application |
worker | — | Background job processor |
db | 5432 | PostgreSQL database |
clickhouse | 8123 | Analytics database |
redis | 6379 | Cache and queues |
minio | 9000 | Local S3-compatible storage |
Updating
# Pull latest imagesdocker compose pull
# Restart with new imagesdocker compose up -d
# Check for migration statusdocker compose logs worker | grep migrationProduction Considerations
For production use with Docker Compose:
- Use a reverse proxy — put Nginx or Caddy in front for TLS termination
- External PostgreSQL — use a managed database (RDS, Cloud SQL) instead of the containerized one
- Persistent volumes — ensure Docker volumes are backed up
- Resource limits — set memory and CPU limits on containers
- Health checks — monitor the
/api/healthendpoint
Troubleshooting
Check service status:
docker compose psdocker compose logs webdocker compose logs workerSee Troubleshooting & FAQ for common issues.