For a more comprehensive installation with additional deployment options, see the Installation Guide.
Prerequisites
Before you begin, ensure you have:- Docker Desktop or Docker Engine (20.10+)
- Docker Compose (2.0+)
- At least 4GB of available RAM
- Internet connectivity to pull Docker images
Get Infrahub running
Download the Docker Compose file
Create a new directory for Infrahub and download the Docker Compose configuration:This Docker Compose file includes all the necessary services:
- infrahub-server: The main API server (FastAPI backend)
- database: Neo4j graph database for storing infrastructure data
- message-queue: RabbitMQ for asynchronous task processing
- cache: Redis for caching and session management
- task-manager: Prefect server for workflow orchestration
- task-manager-db: PostgreSQL database for Prefect
- task-worker: Background workers for executing tasks
Start Infrahub
Launch all services with Docker Compose:Docker will download the required images (this may take a few minutes on first run) and start all services.
Verify the services are running
Check that all containers are healthy:You should see all services in a “running” state with “healthy” status. The initialization process typically takes 30-60 seconds.
Load an example schema
Infrahub starts with no schema by default. Let’s load an example schema that models network devices and sites.Create a schema file
Create a file named This schema defines two node types:
schema.yml with the following content:schema.yml
- InfraDevice: Represents network devices with roles and statuses
- InfraSite: Represents physical locations
Load the schema via API
Use curl to load the schema into Infrahub:You should receive a response confirming the schema was loaded successfully.
The API token
06438eb2-8019-4776-878c-0941b1f1d1ec is the default initial admin token. Change this in production by setting INFRAHUB_INITIAL_ADMIN_TOKEN.Create your first objects
Now that the schema is loaded, let’s create some infrastructure objects.- Via Web UI
- Via GraphQL
Create a site
- Click Site in the left navigation
- Click the + Add Site button
- Fill in the details:
- Name:
headquarters - Description:
Main office location - Facility ID:
HQ-001
- Name:
- Click Save
Create a device
- Click Device in the left navigation
- Click + Add Device
- Fill in the details:
- Name:
core-router-01 - Description:
Primary core router - Role:
router - Status:
active - Site: Select
headquarters
- Name:
- Click Save
What’s next?
Core Concepts
Learn about schemas, version control, transformations, and more.
Installation Guide
Explore production-ready installation options including Kubernetes.
Create a Schema
Design a custom schema tailored to your infrastructure.
GraphQL API
Deep dive into querying and mutating data with GraphQL.