Infrahub
Overview
Infrahub is an open source infrastructure data management platform, a source of truth you shape yourself. Instead of bending your infrastructure into the fixed data model of someone else, you define your own schema. The schema holds the node kinds, attributes and relationships that describe the sites, devices, circuits, IP address space and services you actually run.
You then create, relate and query those objects through a GraphQL API or a web interface.
What makes Infrahub different from a database with a web front end is that it applies version control to your data. Changes are made on a branch, reviewed as a proposed change, and merged. Your source of truth carries the same branching, peer review and history that your teams already expect from code.
Generators and transformations turn that data into device configuration and artifacts. Synchronized Git repositories keep templates and business logic alongside the data they render.
The SecureAnyCloud image installs Infrahub 1.10.5 as a digest-pinned Docker Compose stack managed by systemd, so a working source of truth is online within minutes of launch.
What you get:
- Infrahub 1.10.5 (Apache-2.0), from the official published image
docker.io/opsmill/infrahub:1.10.5, pinned by digest so the appliance can never silently drift onto a different build - Docker Engine (Docker CE) and the Docker Compose plugin, from the official Docker package repository
- Neo4j 2025.10.1 Community Edition (GPLv3), the graph database that holds your source of truth
- PostgreSQL 18 for the task manager, Redis 8.4.0 as the cache, and RabbitMQ 4.2.1 as the message broker
- The embedded Prefect task manager plus two task workers, for generators, transformations and Git synchronization
- The Infrahub web interface and GraphQL API published on port 80. The graph database, PostgreSQL, Redis and RabbitMQ publish no host port at all and are reachable only on the private container network
- All stateful data on a dedicated 128 GiB data disk mounted at
/var/lib/infrahub(the Docker data-root is relocated there), independently resizable and re-provisioned on every VM - A per-VM
adminpassword and a per-VM API token, both generated at first boot - Anonymous read access disabled (upstream ships it enabled), and product telemetry opted out
- Bundled component license notices for Neo4j and Redis under
/usr/share/doc/sac/third-party-licences/ - Two systemd units:
infrahub.service(a oneshot wrapper arounddocker compose up -d) andinfrahub-firstboot.service - 24/7 SecureAnyCloud support
About the credentials
The public Compose file of upstream hardcodes a default admin password, an admin API token, an agent API token, a JWT signing key, a Neo4j password and a broker password. Those literals sit in a public git repository, so they are not secrets. None of them survive on this image.
On the first boot of every VM, infrahub-firstboot.service generates a fresh value for each one. It initializes the databases empty under the rotated credentials and verifies both the password login and the API token round trip. It then writes the two credentials you need to /root/infrahub-credentials.txt.
Prerequisites
You need an active Azure subscription, an SSH key, and a VNet with a subnet.
Standard_B8ms (8 vCPU / 32 GB RAM) is the recommended size. This is a genuinely heavy appliance. OpsMill documents a floor of 6 CPU cores and 12 GB RAM and a recommended 8 cores / 16 GB.
The stack runs seven containers, including a JVM graph database, an Erlang message broker, PostgreSQL, Redis and three Python services. A 2 vCPU / 4 GB size is well under half the documented minimum and will not work.
For NSG inbound rules, allow 22/tcp from your management CIDR for SSH. Allow 80/tcp from the CIDR that needs the Infrahub web interface and API. Add 443/tcp if you put your own TLS in front.
Connect over SSH
Replace <vm-ip> with the public IP of your VM. The default login user is azureuser.
ssh azureuser@<vm-ip>Confirm the services are active
sudo systemctl is-active docker.service infrahub.service docker --version docker compose versionYou should see active printed twice, the Docker Engine version, and the Docker Compose v2 plugin version.
Confirm the Infrahub containers are running
cd /opt/infrahub && sudo docker compose --env-file .env psAll seven containers should report Up. The ones with health checks should also report (healthy).
The stack is infrahub-server, task-manager, two task-worker replicas, database (Neo4j), task-manager-db (PostgreSQL), cache (Redis) and message-queue (RabbitMQ).
Retrieve your per-VM credentials
Every credential on this image is generated on first boot and is unique to your VM. Read them from the credentials file:
sudo cat /root/infrahub-credentials.txtKeep this file safe. It contains your admin password and your API token.
Confirm the API is answering
curl -s -o /dev/null -w 'HTTP %{http_code}\n' http://127.0.0.1/api/configHTTP 200 confirms the Infrahub server is up and serving.
Confirm the datastores are not reachable from the network
This image publishes exactly one host port. The graph database that holds your source of truth is reachable only on the private container network, and so are PostgreSQL, Redis and RabbitMQ.
sudo ss -ltnH '! src 127.0.0.0/8' | awk '{print $4}' | sed 's/.*://' | sort -unYou should see 22 (SSH) and 80 (Infrahub) only. The Neo4j ports 7474 and 7687, the PostgreSQL port 5432, the Redis port 6379 and the RabbitMQ port 5672 must not appear.
Sign in to the web interface
Browse to http://<vm-ip>/ and sign in as admin with the password from Step 4.
After signing in, you land on the Infrahub home view. The left-hand navigation has the object explorer, the schema browser and the branch controls.
Browse the schema
The schema is the heart of Infrahub. It lets you model your own infrastructure rather than accept a fixed data model.
Open Schema from the navigation to browse the node kinds currently loaded, their attributes and their relationships.
Authenticate against the API
The Infrahub API is GraphQL. You can authenticate either with a session token from a password login, or directly with the API token from Step 4 using the X-INFRAHUB-KEY header. The token is simpler for scripting.
First, set your token as a shell variable, using the value from Step 4:
TOKEN='<INFRAHUB_API_TOKEN>'Confirm it authenticates against a resource that requires authentication:
curl -s -o /dev/null -w 'HTTP %{http_code}\n' \
-H "X-INFRAHUB-KEY: $TOKEN" http://127.0.0.1/api/schemaHTTP 200 confirms the token is valid. The same request without the header is refused, because anonymous access is disabled on this image:
curl -s -o /dev/null -w 'HTTP %{http_code}\n' http://127.0.0.1/api/schemaLoad a schema of your own
This step turns Infrahub into your source of truth. The following command loads a small schema that defines a Site node kind in a Demo namespace, with a name, a site code and a device count.
cat > /tmp/demo-schema.json <<'EOF' { "schemas": [ { "version": "1.0", "nodes": [ { "name": "Site", "namespace": "Demo", "label": "Site", "description": "A physical network site.", "default_filter": "name__value", "display_labels": ["name__value"], "attributes": [ { "name": "name", "kind": "Text", "unique": true }, { "name": "code", "kind": "Text", "optional": true }, { "name": "device_count", "kind": "Number", "optional": true } ] } ] } ] } EOF curl -s -o /dev/null -w 'HTTP %{http_code}\n' \
-X POST 'http://127.0.0.1/api/schema/load?branch=main' \
-H "X-INFRAHUB-KEY: $TOKEN" -H 'Content-Type: application/json' \
--data-binary @/tmp/demo-schema.jsonThe schema is applied asynchronously. Confirm the new kind is live:
curl -s -H "X-INFRAHUB-KEY: $TOKEN" \
'http://127.0.0.1/api/schema?branch=main' | grep -c DemoSiteA count of 1 or more confirms DemoSite is now part of your schema.
Create and read back an object
Now create an object of the kind you just defined, using a GraphQL mutation:
curl -s -X POST 'http://127.0.0.1/graphql' \
-H "X-INFRAHUB-KEY: $TOKEN" -H 'Content-Type: application/json' \
-d '{"query":"mutation { DemoSiteCreate(data: {name: {value: \"london-1\"}, code: {value: \"LON1\"}, device_count: {value: 24}}) { ok object { id name { value } } } }"}'Then read it back with a GraphQL query:
curl -s -X POST 'http://127.0.0.1/graphql' \
-H "X-INFRAHUB-KEY: $TOKEN" -H 'Content-Type: application/json' \
-d '{"query":"query { DemoSite(name__value: \"london-1\") { edges { node { id name { value } code { value } device_count { value } } } } }"}'The response contains the object you created, with the values you wrote. That round trip (define a schema, create an object, read it back) is Infrahub working end to end.
You can see the same object in the web interface under the object explorer.
Work on a branch
Branching is the defining capability of Infrahub. Create a branch and make changes against it. The main branch stays untouched until you merge.
curl -s -X POST 'http://127.0.0.1/graphql' \
-H "X-INFRAHUB-KEY: $TOKEN" -H 'Content-Type: application/json' \
-d '{"query":"mutation { BranchCreate(data: {name: \"demo-change\", description: \"trial change\"}) { ok object { id name } } }"}'List your branches to confirm:
curl -s -X POST 'http://127.0.0.1/graphql' \
-H "X-INFRAHUB-KEY: $TOKEN" -H 'Content-Type: application/json' \
-d '{"query":"query { Branch { id name description } }"}'Queries and mutations can then be scoped to that branch by posting to /graphql/demo-change instead of /graphql.
In the web interface, the branch selector at the top of the page switches the whole view to your branch. Proposed Changes is where a branch is reviewed and merged.
Change the admin password
The password from Step 4 is generated for your VM, but you should still set your own. In the web interface, open the account menu and change the password there.
Managing the service
Stop, start or restart the whole stack through systemd:
sudo systemctl stop infrahub.service
sudo systemctl start infrahub.service
sudo systemctl restart infrahub.serviceFollow the logs for a single component:
cd /opt/infrahub && sudo docker compose --env-file .env logs -f infrahub-serverFrom a cold start, the stack takes a couple of minutes to become fully healthy. The graph database and the task manager both initialize before the server accepts traffic.
Where things live
- /opt/infrahub/docker-compose.yml: the appliance Compose stack
- /opt/infrahub/.env: every generated per-VM secret (root-only, 0600)
- /opt/infrahub/upstream-docker-compose.yml.reference: the Compose file of upstream at the pinned tag, for reference
- /var/lib/infrahub: the dedicated data disk, which is the Docker data-root and holds the graph, the task database, artifacts and Git repositories
- /root/infrahub-credentials.txt: your per-VM admin password and API token (root-only, 0600)
- /usr/share/doc/sac/third-party-licences/: bundled component license notices and verbatim license texts
Enabling HTTPS
Infrahub is served over plain HTTP on port 80, so the image works immediately on any network. For anything beyond evaluation, put TLS in front of it.
You have two options. Use an Azure Application Gateway or Front Door to terminate TLS and forward to port 80. Or run a reverse proxy on the VM itself with a certificate from your own CA or Let's Encrypt.
If you terminate TLS elsewhere, restrict the NSG rule for port 80 to the address of the proxy, so the plain HTTP port is not reachable from the internet.
Backing up
Everything stateful lives on the data disk at /var/lib/infrahub, so an Azure disk snapshot of that volume captures your source of truth, the task history, artifacts and synchronized repositories together.
Take the snapshot with the stack stopped for a consistent point in time:
sudo systemctl stop infrahub.service
# take your Azure disk snapshot here
sudo systemctl start infrahub.serviceLicensing
Infrahub is licensed under the Apache License 2.0. This image also bundles third-party components under their own terms. Their license notices and verbatim license texts ship on the image:
ls /usr/share/doc/sac/third-party-licences/- Neo4j 2025.10.1 Community Edition: GPLv3. This is the Community edition, which is freely redistributable. It is not Neo4j Enterprise Edition. The notice includes a written offer for the corresponding source.
- Redis 8.4.0: triple-licensed under RSALv2, SSPLv1 and AGPLv3. SecureAnyCloud elects SSPLv1 for this bundled component.
- RabbitMQ and PostgreSQL: RabbitMQ is under MPL-2.0 and PostgreSQL under the PostgreSQL License.
Support
SecureAnyCloud provides 24/7 support for this image. Contact sales@secureanycloud.com and include your Azure subscription ID and the VM name.
Deploy on Azure
Launch Infrahub 1.10.5 on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
This guide covers the deployment and configuration of Infrahub on AWS using SecureAnyCloud AWS Marketplace AMIs. Infrahub, by OpsMill, is an open source infrastructure source of truth and infrastructure data management platform.
You model your own infrastructure domain as a schema and store network, device, service and topology data as objects in a graph. You manage every change through branches and proposed changes. Your infrastructure data gets the same version-controlled, review-before-merge workflow that your code already has. A GraphQL API (and a REST API) make that data available to your automation and CI pipelines.
The SecureAnyCloud image ships the free and open source, Apache-2.0-licensed Infrahub, run the officially supported way as the upstream containers pinned by image digest. Neo4j Community Edition (GPLv3) is the graph database.
It is a seven-container stack: the Infrahub server, two task workers and the task manager, plus the Neo4j graph database, a Redis cache, a RabbitMQ message queue and a PostgreSQL database for the task manager. Docker Compose orchestrates it under a single systemd service. Only the web application is published, on port 80. Every backing service binds to the private container network only.
Upstream ships an unusually large set of published default credentials, so nothing here ships with a known secret. All seven hardcoded defaults of upstream are regenerated uniquely for each instance on first boot, before the application is reachable. These are the admin password, admin API token, agent token, security key, and the graph, broker and task-database passwords.
Anonymous read access to the object graph and product telemetry are both disabled.
Infrahub, Neo4j, Redis, RabbitMQ and PostgreSQL are trademarks of their respective owners. This image is produced by SecureAnyCloud and is not affiliated with, endorsed by, or sponsored by any of them. It ships the free and open source software, unmodified.
What you get:
- Infrahub 1.10.5 (the Apache-2.0-licensed server, task manager and workers), pinned by image digest
- Neo4j 2025.10.1 Community Edition (GPLv3) as the graph database that is the source of truth of Infrahub, pinned by image digest
- Redis 8.4.0 cache, RabbitMQ 4.2.1 message queue and PostgreSQL 18 task-manager database, each pinned by image digest and reachable only on the private container network
- Docker Engine with a single published host port:
80-> the Infrahub web application. The graph database, cache, message queue and PostgreSQL publish no host port docker.serviceandinfrahub.serviceas systemd units, enabled and active on boot.infrahub-firstboot.servicerotates every secret on the first boot- The stateful data (graph store, task database, artifact object store and synchronized Git repositories) relocated onto a dedicated, independently resizable data volume mounted at
/var/lib/infrahub - All seven published default secrets of upstream regenerated uniquely per instance on first boot, never baked into the image, with anonymous graph access and telemetry disabled
- Bundled third-party license notices for Neo4j (GPLv3) and Redis (SSPLv1 elected) shipped at
/usr/share/doc/sac/third-party-licences/ - Ubuntu 24.04 LTS base with the latest security patches applied at build time
- 24/7 SecureAnyCloud support
Prerequisites
- An active AWS account and an EC2 key pair in your target region
- A subscription to the Infrahub listing on AWS Marketplace
- A VPC and subnet, and a security group allowing inbound
22/tcp(SSH, from your admin network) and80/tcp(the web application, from the networks that use it)
Recommended instance type: Infrahub is a seven-container stack that includes a JVM graph database. Upstream documents a minimum of 6 vCPU and 12 GB RAM and recommends 8 vCPU and 16 GB for a single-node deployment.
For production use, launch this AMI on an m5.2xlarge (8 vCPU, 32 GB RAM) or larger instance. Smaller instances will struggle to bring the full stack up.
Connecting to your instance
Connect over SSH as the default login user, using your EC2 key pair. For Ubuntu 24.04 LTS, the SSH login user is ubuntu, for example: ssh -i your-key.pem ubuntu@<instance-public-ip>
Subscribe and launch from AWS Marketplace
Sign in to the AWS Marketplace, search for Infrahub by SecureAnyCloud, and choose Continue to Subscribe. Then choose Continue to Configuration and Continue to Launch.
Pick your region, an m5.2xlarge (or larger) instance type, your VPC and subnet, and your EC2 key pair. Choose a security group that allows SSH (22) from your admin network and HTTP (80) from the networks that use the application. Then launch the instance.
Launch from the AWS CLI
You can also launch the AMI directly. Resolve the product AMI id for your region from the listing, then run:
REGION="us-east-1" AMI_ID="<ami-id>"
# the Infrahub AMI id for your region KEY_NAME="your-key" SG_ID="sg-xxxxxxxx"
# allows 22 from your admin CIDR and 80 from your users SUBNET_ID="subnet-xxxxxxxx" aws ec2 run-instances \
--region "$REGION" \
--image-id "$AMI_ID" \
--instance-type m5.2xlarge \
--key-name "$KEY_NAME" \
--security-group-ids "$SG_ID" \
--subnet-id "$SUBNET_ID" \
--associate-public-ip-address \
--block-device-mappings 'DeviceName=/dev/sda1,Ebs={VolumeSize=30,VolumeType=gp3}' \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=infrahub}]'On first boot, the image resolves the public IP of the instance through EC2 IMDSv2. The application therefore advertises the correct address with no manual configuration.
Retrieve the per-instance credentials
On the first boot of each instance, infrahub-firstboot.service regenerates every secret and initializes empty databases. It brings the stack up, verifies the admin login and the API-token round trip, and writes the credentials to a root-only file.
First boot brings up a seven-container stack, so allow a few minutes before the web UI is reachable. Retrieve the credentials over SSH:
sudo cat /root/infrahub-credentials.txtThe file contains the per-instance web URL, the admin username (admin) and password, and the per-instance API token:
infrahub.url=http://<instance-public-ip>/ infrahub.admin.user=admin infrahub.admin.pass=<INFRAHUB_ADMIN_PASSWORD> INFRAHUB_ADMIN_PASSWORD=<INFRAHUB_ADMIN_PASSWORD> INFRAHUB_API_TOKEN=<INFRAHUB_API_TOKEN>These values are unique to your instance. Store them somewhere safe.
Confirm the stack is healthy
Infrahub runs as a Docker Compose stack under infrahub.service. Check the systemd units and the containers:
for s in docker.service infrahub.service; do printf "%-28s %s\n" "$s" "$(systemctl is-active $s)"; done
sudo docker compose --project-directory /opt/infrahub --env-file /opt/infrahub/.env ps \
--format "table {{.Name}}\t{{.Service}}\t{{.Status}}"All eight containers should report healthy:
docker.service active infrahub.service active NAME SERVICE STATUS infrahub-cache-1 cache Up 5 minutes (healthy) infrahub-database-1 database Up 5 minutes (healthy) infrahub-infrahub-server-1 infrahub-server Up 4 minutes (healthy) infrahub-message-queue-1 message-queue Up 5 minutes (healthy) infrahub-task-manager-1 task-manager Up 5 minutes (healthy) infrahub-task-manager-db-1 task-manager-db Up 5 minutes (healthy) infrahub-task-worker-1 task-worker Up 4 minutes infrahub-task-worker-2 task-worker Up 4 minutesThe application answers on port 80. /api/config confirms the hardened defaults, with anonymous access and telemetry both off:
curl -sS http://localhost/api/config | python3 -c 'import json,sys; m=json.load(sys.stdin)["main"]; print("allow_anonymous_access:", m["allow_anonymous_access"]); print("telemetry_optout:", m["telemetry_optout"])'allow_anonymous_access: False telemetry_optout: TrueSign in to the web UI
Browse to http://<instance-public-ip>/ and sign in as admin with the password from the credentials file.
After signing in, you land on the dashboard. It shows open proposed changes, your branches, connected Git repositories, recent activity and the task overview:
Explore the schema
Infrahub is schema-driven. Every kind of object you store is defined by a schema.
Open Object Management to browse the built-in Core schema and to load your own node and generic kinds. Each kind has attributes and relationships that model your infrastructure domain:
You can load a schema from the UI or by posting it to the API. For example, to load a schema definition file:
API_TOKEN="<INFRAHUB_API_TOKEN>"
# from /root/infrahub-credentials.txt curl -sS -X POST 'http://<instance-public-ip>/api/schema/load?branch=main' \
-H "X-INFRAHUB-KEY: $API_TOKEN" \
-H 'Content-Type: application/json' \
--data-binary @my-schema.jsonWork with branches and proposed changes
Every change can be made on a branch and reviewed as a proposed change before it merges to main. This gives you version control over your infrastructure data.
Open Branches to see the default branch and create new ones:
Use the GraphQL API
Infrahub exposes a GraphQL API at /graphql. Authenticate with the per-instance API token from the credentials file. For example, count the accounts in the source of truth:
API_TOKEN="<INFRAHUB_API_TOKEN>"
# from /root/infrahub-credentials.txt curl -sS -X POST 'http://<instance-public-ip>/graphql' \
-H "X-INFRAHUB-KEY: $API_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"query":"query { CoreAccount { count } }"}'{"data":{"CoreAccount":{"count":2}}}Security model
This image is secure by default:
- No known credential ships. All seven published default secrets of upstream are regenerated uniquely for every instance on first boot, before the application serves traffic. The per-instance admin password and API token are written only to
/root/infrahub-credentials.txt(mode0600, root-only). - Anonymous access is disabled. Upstream defaults the object graph to world-readable for unauthenticated callers. This image sets
INFRAHUB_ALLOW_ANONYMOUS_ACCESS=false. An unauthenticated request for an authenticated resource is refused:
curl -sS -o /dev/null -w 'anon /api/schema -> HTTP %{http_code}\n' http://localhost/api/schemaanon /api/schema -> HTTP 401- Only the web UI is exposed. The graph database, PostgreSQL, Redis and RabbitMQ publish no host port and are reachable only on the private container network. Only ports
22(SSH) and80(the web application) are bound off the loopback interface. - Telemetry off. Product telemetry and analytics are disabled.
Enabling HTTPS
For production use, terminate TLS in front of the instance. The simplest approach on AWS is an Application Load Balancer with an ACM certificate, forwarding to the instance on port 80.
Alternatively, place a reverse proxy (nginx, Caddy) with a Let's Encrypt certificate for your own domain in front of the application. Point the proxy at http://127.0.0.1:80, and set INFRAHUB_ADDRESS in /opt/infrahub/.env to your HTTPS URL. Then restart with sudo systemctl restart infrahub.
Where things live
- Compose file: /opt/infrahub/docker-compose.yml
- Environment and secrets: /opt/infrahub/.env (mode 0600)
- Per-instance credentials: /root/infrahub-credentials.txt (mode 0600)
- Stateful data (graph, task DB, artifacts, git): /var/lib/infrahub (dedicated volume)
- Third-party license notices: /usr/share/doc/sac/third-party-licences/
Support
SecureAnyCloud provides 24/7 technical support for this product by email and live chat, with a one-hour average response for critical issues. Our engineers help with deployment, TLS termination, schema design, GraphQL and REST API usage, backups, scaling and upgrades.
- Email: sales@secureanycloud.com
- Live chat: available 24/7
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Deploy on AWS
Launch Infrahub Infrastructure Source of Truth with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com