Skip to main content
This guide covers multiple installation methods for Infrahub, from quick local deployments to production-ready Kubernetes clusters.
For a faster getting-started experience, see the Quickstart Guide.

Prerequisites

System requirements

Minimum requirements for running Infrahub:
  • CPU: 2 cores (4+ recommended for production)
  • RAM: 4GB minimum (8GB+ recommended for production)
  • Storage: 20GB available disk space
  • OS: Linux, macOS, or Windows with WSL2

Software dependencies

  • Docker Desktop 4.0+ or Docker Engine 20.10+
  • Docker Compose 2.0+
  • curl (for downloading files)

Installation methods

Docker Compose is the recommended method for development, testing, and small production deployments.

Quick installation

1

Create a directory for Infrahub

mkdir infrahub
cd infrahub
2

Download the Docker Compose file

curl -O https://raw.githubusercontent.com/opsmill/infrahub/stable/docker-compose.yml
3

Configure environment variables (optional)

Create a .env file to customize your deployment:
.env
# Version
VERSION=1.7.6

# Initial credentials
INFRAHUB_INITIAL_ADMIN_PASSWORD=your-secure-password
INFRAHUB_INITIAL_ADMIN_TOKEN=your-admin-token
INFRAHUB_INITIAL_AGENT_TOKEN=your-agent-token

# Security
INFRAHUB_SECURITY_SECRET_KEY=your-secret-key

# Database
INFRAHUB_DB_USERNAME=neo4j
INFRAHUB_DB_PASSWORD=your-db-password

# Broker
INFRAHUB_BROKER_USERNAME=infrahub
INFRAHUB_BROKER_PASSWORD=your-broker-password

# Production mode
INFRAHUB_PRODUCTION=true
INFRAHUB_ALLOW_ANONYMOUS_ACCESS=false
Always change default passwords and tokens in production environments.
4

Start Infrahub

docker compose up -d
This command starts all required services:
  • infrahub-server: FastAPI backend serving the GraphQL API and REST endpoints
  • database: Neo4j 2025.10.1 graph database
  • message-queue: RabbitMQ 4.2.1 for asynchronous messaging
  • cache: Redis 8.4.0 for caching and session storage
  • task-manager: Prefect server for workflow orchestration
  • task-manager-db: PostgreSQL 18 for Prefect metadata
  • task-worker: Background workers (2 replicas by default)
5

Verify the installation

Check service health:
docker compose ps
All services should show as “healthy”. View logs:
docker compose logs -f infrahub-server
6

Access Infrahub

Open your browser to:
http://localhost:8000
Login with:
  • Username: admin
  • Password: infrahub (or your custom password from .env)

Service architecture

The Docker Compose deployment includes these interconnected services:

Exposed ports

ServicePortDescription
infrahub-server8000Web UI, GraphQL API, REST API
database2004Neo4j Bolt protocol (optional)
database6362Neo4j HTTP (optional)
message-queue15692RabbitMQ metrics (optional)

Data persistence

Docker Compose creates named volumes for data persistence:
  • database_data: Neo4j graph database
  • database_logs: Neo4j logs
  • storage_data: Artifact and file storage
  • workflow_db: Prefect database
  • workflow_data: Workflow state and logs
To back up your data:
docker compose down
docker run --rm -v infrahub_database_data:/data -v $(pwd):/backup \
  ubuntu tar czf /backup/infrahub-backup.tar.gz /data

Updating Infrahub

1

Update the VERSION in .env

.env
VERSION=1.8.0
2

Pull new images and restart

docker compose pull
docker compose up -d

Troubleshooting

Services fail to start:
  • Check available resources: docker stats
  • Ensure ports 8000, 2004, 6362, 15692 are not in use
  • Review logs: docker compose logs
Database initialization takes too long:
  • The first start can take 1-2 minutes as Neo4j initializes
  • Check database logs: docker compose logs database
Cannot connect to Infrahub:
  • Verify all services are healthy: docker compose ps
  • Check firewall rules allow access to port 8000
  • Ensure Docker network is functioning: docker network ls

Post-installation steps

After installing Infrahub:
1

Change default credentials

Update the admin password through the UI or API.
2

Configure authentication

Set up OAuth2/OIDC providers if needed for SSO.
3

Install infrahubctl

Install the CLI tool for managing schemas and data:
uv tool install infrahub-sdk
4

Load a schema

Start with an example schema or create your own.

Next steps

Quickstart

Follow the quickstart guide to create your first objects.

Core Concepts

Learn about schemas, branches, and transformations.

Schema Library

Browse community-maintained schemas for common use cases.

Configuration Reference

Explore all available configuration options.

Build docs developers (and LLMs) love