Prerequisites
- Docker version 26.0.0+
- Docker Compose version 2.29.0+
- openssl
Core secrets
Theenv.sh script (next step) generates these automatically. If you need to generate them manually:
Download configuration files
# 1. Download the env.sh installation script
curl -o env.sh https://raw.githubusercontent.com/TracecatHQ/tracecat/1.0.0-beta.48/env.sh
# 2. Download the .env.example template file (env.sh needs this to generate your .env file)
curl -o .env.example https://raw.githubusercontent.com/TracecatHQ/tracecat/1.0.0-beta.48/.env.example
# 3. Make the env.sh script executable and run it
chmod +x env.sh && ./env.sh
env.sh, you’ll be prompted to input the following:
- Set
PUBLIC_APP_URL. Defaults tolocalhost. - Require PostgreSQL SSL mode? Defaults to
n. - Required field: Enter email address for the first user (superadmin).
Download Caddyfile
Tracecat uses Caddy as a reverse proxy. You’ll need to download the followingCaddyfile to configure this service.
curl -o Caddyfile https://raw.githubusercontent.com/TracecatHQ/tracecat/1.0.0-beta.48/Caddyfile
Download Docker Compose file
curl -o docker-compose.yml https://raw.githubusercontent.com/TracecatHQ/tracecat/1.0.0-beta.48/docker-compose.yml
Start Tracecat
Run the command below to start Tracecat and all related services. Make sure yourdocker-compose.yml and generated .env files are in the same directory.
docker compose up
Access Tracecat
Once deployed, access your instance at:- UI:
http://localhost:${PUBLIC_APP_PORT} - API docs:
http://localhost:${PUBLIC_APP_PORT}/api/docs - MCP:
http://localhost:${PUBLIC_APP_PORT}/mcp
Updating Tracecat
Be careful when updating Tracecat.
Do not accidentally overwrite or lose your existing
TRACECAT__SERVICE_KEY, TRACECAT__SIGNING_SECRET, TRACECAT__DB_ENCRYPTION_KEY, and USER_AUTH_SECRET secrets.
Losing these secrets will break your credentials and webhooks.# 1. Download the latest env migration script and env template
curl -o env-migration.sh https://raw.githubusercontent.com/TracecatHQ/tracecat/<version>/env-migration.sh
curl -o .env.example https://raw.githubusercontent.com/TracecatHQ/tracecat/<version>/.env.example
# 2. Make the migration script executable and update your existing .env
chmod +x env-migration.sh && ./env-migration.sh
# 3. Download the latest Docker Compose file
curl -o docker-compose.yml https://raw.githubusercontent.com/TracecatHQ/tracecat/<version>/docker-compose.yml
# 4. Download the latest Caddyfile
curl -o Caddyfile https://raw.githubusercontent.com/TracecatHQ/tracecat/<version>/Caddyfile
# 5. Restart Tracecat with the updated configuration
docker compose up -d
.env before rewriting it.
After the stack starts, verify that your containers are healthy and that you can sign in successfully.
Scaling
Docker Compose runs all services on a single host. These are recommended minimums for different workload sizes.| Resource | Small | Standard | Production |
|---|---|---|---|
| CPU | 8 cores | 16 cores | 32+ cores |
| RAM | 16 GB | 32 GB | 64+ GB |
| Storage | 20 GB SSD | 50 GB SSD | 100+ GB SSD |
| Docker | 26.0.0+ | 26.0.0+ | 26.0.0+ |
| Workflow starts/sec | ~5 | ~15 | ~40 |
| Concurrent seats | 1-10 | 10-50 | 50+ |
| Concurrent agents/sec | 1-2 | 5-10 | 10+ |
- Small: Development, testing, small teams (1-10 users)
- Standard: Mid-size teams (10-50 users), moderate workflow execution
- Production: Large teams (50+ users), high throughput
Convert to Docker Swarm
Docker Swarm lets you scale individual services with resource limits and replicas across one or more nodes.Service resource recommendations
| Service | CPU (cores) | Memory | Replicas |
|---|---|---|---|
| caddy | 0.25 | 256 Mi | 1 |
| api | 2 | 4 Gi | 2 |
| worker | 2 | 2 Gi | 4 |
| executor | 4 | 8 Gi | 4 |
| agent-worker | 2 | 2 Gi | 2 |
| agent-executor | 4 | 16 Gi | 2 |
| ui | 0.5 | 1 Gi | 2 |
| mcp | 1 | 1 Gi | 1 |
| postgres_db | 2 | 4 Gi | 1 |
| temporal | 4 | 8 Gi | 1 |
| temporal_postgres_db | 2 | 4 Gi | 1 |
| redis | 0.5 | 1 Gi | 1 |
| minio | 0.5 | 1 Gi | 1 |
| Total | ~25 | ~52 Gi | 23 |
Stateful services (
postgres_db, temporal_postgres_db, minio, redis) must remain at 1 replica.
Scaling these requires external managed services (e.g., RDS, ElastiCache) or specialized clustering.Deploy with Docker Swarm
- Initialize Swarm:
docker swarm init
- Add
deployconfiguration to each service in yourdocker-compose.yml. For example, for theapiservice:
services:
api:
# ... existing configuration ...
deploy:
replicas: 2
resources:
limits:
cpus: "2"
memory: 4G
reservations:
cpus: "2"
memory: 4G
- Deploy the stack:
docker stack deploy -c docker-compose.yml tracecat
- Verify services are running:
docker stack services tracecat
