Docker Compose
Use Docker Compose when you want a self-hosted Qodex stack on one machine. Compose is a good fit for internal staging, small deployments, on-premise trials, and teams that want Postgres included in the same stack. For production with managed AWS services, use the AWS Terraform reference.What this stack includes
- Qodex web app and agent container.
- Postgres 17 for product state.
- A persistent Qodex data volume for artifacts.
- Optional Redis for queue mode.
- Optional MinIO for S3-compatible artifact storage.
Prerequisites
- Docker Engine 24+ with the Compose plugin.
- At least 4 GB memory available to the Qodex container.
- An OpenAI API key.
- Random values for
QODECLAW_SECRET_KEYandJWT_SECRET.
1. Create docker-compose.yml
qodex-data volume stores artifacts such as screenshots, videos, DOM snapshots, logs, and attachments.
2. Add .env
Create a .env file next to the compose file.
3. Start the stack
Add Redis when you need queue mode
Redis is optional. Without Redis, the scheduler and agent runner run in the Qodex container. With Redis, Qodex can run workers and scheduler processes separately. Add Redis when you need horizontal scaling or separate worker containers:Add MinIO for S3-compatible storage
Use MinIO if you want the local stack to behave more like production S3.When Compose is enough
Compose is usually enough for:- A small internal self-hosted deployment.
- A staging or proof-of-concept environment.
- An on-premise install behind a corporate firewall.
- A local environment that mirrors production behavior.
Next steps
Environment variables
See the full configuration reference.
Storage backends
Choose local disk, S3, or MinIO.
Secret management
Understand
QODECLAW_SECRET_KEY before production.AWS Terraform reference
Move from one host to managed AWS infrastructure.