Data Storage Architecture
Cognee operates on a three-tier data storage model, each optimized for specific data types and query patterns:Graph Database
Relationships & EntitiesStores knowledge graph structure, entity relationships, and semantic connections.
Vector Database
Embeddings & SearchHandles semantic embeddings for similarity search and content retrieval.
Relational Database
Metadata & StateManages datasets, user permissions, pipeline state, and operational data.
Each storage layer can be deployed as managed services, self-hosted servers, or file-based systems (like S3 buckets), giving you complete flexibility over your infrastructure.
Deployment Options
Choose the deployment strategy that matches your requirements:- Development
- Production
- Hybrid
Local & Testing
- Docker: Containerized local deployment with embedded databases
- MCP: Direct integration with code editors and IDEs
- File-based: SQLite, local files, and embedded vector stores
Storage Configuration Examples
Local Development
Local Development
Embedded & File-based
Cloud Production
Cloud Production
Managed Services
Hybrid S3
Hybrid S3
S3 + Managed Databases
Migrating to Another Instance
Migrating to Another Instance
Cognee stores all persistent data under See Graph Stores and Vector Stores for all supported external providers.
SYSTEM_ROOT_DIRECTORY (default: .cognee_system). There is no dedicated export API; migration works by either copying the database files or switching to shared external databases.- Option 1: Copy database files
Stop Cognee on the source instance, copy the File paths inside
databases/ folder to the destination, then set SYSTEM_ROOT_DIRECTORY to the new path:databases/:cognee_graph_kuzuβ Kuzu graph databasecognee.lancedbβ LanceDB vector storecognee_dbβ SQLite relational database
Quick Start Guide
1
Choose Deployment
Select your deployment method based on scale and requirements
2
Configure Storage
Set up your preferred combination of graph, vector, and relational databases
3
Deploy & Test
Launch Cognee and verify connectivity to all storage backends
4
Scale
Adjust storage and compute resources based on usage patterns
Deployment Methods
Docker Deployment
Local & ServerStart Cognee with optional databases using compose profiles.
Coolify Deployment
Self-hosted PaaSRun the API on your own VPS with a prebuilt image and automatic Letβs Encrypt SSL.
Islo Sandbox
Ephemeral & ShareableLaunch a temporary public Cognee API for demos and short-lived evaluation.
Kubernetes (Helm)
Enterprise & ProductionContainer orchestration with full control and high availability.
EC2 Deployment
Traditional CloudStandard server deployment with custom configurations.
Self-hosted vs Cognee Cloud
Cognee can run fully self-hosted without Cognee Cloud. The open-source package works as an embedded Python SDK, a Docker/Compose service, or a server deployment on Kubernetes or a VM.
The same core memory operations are available in both paths.
cognee.serve() can point the local SDK at Cognee Cloud or at your own self-hosted API backend; it does not copy local datasets by itself. To move an already-built local graph, use cognee.push().
Self-hosted data is organized by datasets, not Cloud projects. Without Cognee Cloud, datasets live in the storage backends you configure, such as local Kuzu/LanceDB/SQLite files, or external Postgres, Neo4j, Qdrant, and related services.
Architecture Benefits
Cost Optimization: Use file-based storage (S3) for archival data and managed services for active workloads.
Need Help?
Setup Troubleshooting
Storage
PermissionError, database connection refused, failed migrations, UI login loops, and agent datasets missing from the admin dashboard β with the cause and fix for each.Join Our Community
Get deployment support, share configurations, and connect with other Cognee users.