Prerequisites
- Docker (version 24.x minimum)
- Docker Compose (version 2.x)
- 8 GB RAM minimum (16 GB recommended for production)
- 50 GB disk space minimum
Quick start
Deploy the latest Infrahub Community version:http://localhost:8000.
Docker Compose file structure
The Infrahub Docker Compose file defines the following services:Services overview
| Service | Image | Purpose | Default Port |
|---|---|---|---|
infrahub-server | registry.opsmill.io/opsmill/infrahub | API server and UI | 8000 |
task-worker | registry.opsmill.io/opsmill/infrahub | Background task execution | - |
database | neo4j:2025.10.1-community | Graph database | 7687 |
message-queue | rabbitmq:4.2.1-management | Message broker | 5672 |
cache | redis:8.4.0 | Cache and locking | 6379 |
task-manager | registry.opsmill.io/opsmill/infrahub | Prefect workflow server | 4200 |
task-manager-db | pgautoupgrade/pgautoupgrade:18-alpine | Prefect database | 5432 |
Environment variables
The Docker Compose file uses anchors to share environment variables across services:Configuration
Override default settings
Create a.env file in the same directory as docker-compose.yml:
.env
Enable S3 storage
For production deployments with multiple API server replicas, configure S3 storage:docker-compose.override.yml
Configure TLS for databases
Enable TLS for Neo4j, Redis, and RabbitMQ:docker-compose.override.yml
Scaling
Scale API servers
Increase the number of API server replicas:- S3-compatible object storage must be configured
- Shared volumes are not supported for multi-replica deployments
Scale task workers
Increase task worker replicas to handle more background tasks:docker-compose.override.yml
Adjust worker concurrency
Control how many Gunicorn workers each API server runs:.env
.env
Persistent storage
Default volumes
The Docker Compose file creates the following named volumes:Backup volumes
Backup named volumes using Docker:Use external volumes
Mount external directories for persistence:docker-compose.override.yml
Network configuration
Expose additional ports
Expose Neo4j HTTP interface and RabbitMQ management UI:docker-compose.override.yml
Use custom networks
Define custom networks for service isolation:docker-compose.override.yml
Health checks
All services include health check configurations:(healthy) in the status column.
Troubleshooting
View service logs
View logs for all services:Restart services
Restart a specific service:Reset environment
Stop and remove all containers, networks, and volumes:Service dependencies
Services start in dependency order defined bydepends_on with health checks:
Production recommendations
Security hardening
- Change default passwords and tokens
- Disable anonymous access:
INFRAHUB_ALLOW_ANONYMOUS_ACCESS=false - Enable TLS for all database connections
- Use secrets management instead of environment variables
- Restrict network access using firewalls
Performance tuning
- Increase Neo4j heap and page cache based on available RAM
- Increase
WEB_CONCURRENCYfor API servers - Add more task worker replicas for background tasks
- Use SSD storage for Neo4j database volumes
- Configure S3 storage for artifacts
Monitoring
- Enable Prometheus metrics export
- Configure log aggregation (see monitoring page)
- Set up health check monitoring
- Monitor disk space usage
- Track container resource usage
Related resources
- Installation guide - Complete installation instructions
- Configuration reference - All environment variables
- Kubernetes deployment - Deploy on Kubernetes
- Backup and restore - Protect your data
- Monitoring - Monitor your deployment