Documentation
Self-hosted Terraform state management with powerful infrastructure insights.
Products
Backend
Terraform HTTP backend with PostgreSQL storage and full transaction history. Store, lock, and version your state with complete audit trails.
Free ForeverInventory
Infrastructure catalog and CMDB. Browse resources, modules, and types. Query your infrastructure with MQL. Create dashboards and find unmanaged resources.
Insights
Analysis and exploration tools. Transaction timeline, full-text search, blast radius analysis, and interactive dependency graph visualization.
Free ForeverOrchestration
GitOps for Terraform. PR-based automation with policy enforcement, cost estimates, and drift detection. Powered by Terrateam.
Velocity Coming Soon
Terraform and OpenTofu plans in seconds, not minutes. Replace the flat state file with a database-backed dependency graph. Independent changes run in parallel.
Quick Start
Get Stategraph running and store your first Terraform state:
- Deploy with Docker Compose - Start Stategraph in minutes
- Configure your first state - Connect Terraform to Stategraph
- Explore your infrastructure - Browse and query resources
Why Stategraph?
Full control over your data - Self-hosted means your state files never leave your infrastructure. No vendor lock-in, no external dependencies.
Transaction history - Every state change is recorded with timestamps, user information, and the ability to see exactly what changed.
Infrastructure catalog - Go beyond state storage. Browse all your resources, query across all your states, visualize dependencies, analyze blast radius before making changes, and find unmanaged resources.
Simple deployment - Single Docker image with PostgreSQL. No complex setup, no cloud services required.
Architecture
┌─────────────┐ ┌─────────────────────────────────┐
│ Terraform │────▶│ Stategraph │
│ CLI │ │ ┌─────────┐ ┌───────────┐ │
└─────────────┘ │ │ nginx │───▶│ Backend │ │
│ └─────────┘ └─────┬─────┘ │
┌─────────────┐ │ │ │ │
│ Browser │────▶│ ▼ ▼ │
│ (UI) │ │ ┌─────────┐ ┌───────────┐ │
└─────────────┘ │ │ UI │ │PostgreSQL │ │
│ └─────────┘ └───────────┘ │
└─────────────────────────────────┘
- nginx - Reverse proxy handling request routing
- Backend - OCaml server handling API requests and state operations
- UI - Next.js web interface for Inventory and Insights
- PostgreSQL - State storage, transaction logs, and metadata
CLI
The Stategraph CLI (stategraph) provides command-line access for automation and scripting:
# List states
stategraph states list --tenant <tenant-id>
# Run MQL queries
stategraph mql query "SELECT r.type, count(*) FROM resources r GROUP BY r.type ORDER BY r.type"
# Run gap analysis
stategraph tenant gaps analyze --tenant <tenant-id> --provider aws
Downloads
Docker images and native binaries for Linux and macOS.
Support
- Slack — Join our community for questions, discussions, and support
- Email — support@stategraph.com for direct assistance