docker-compose.yml uses profiles so you can start only the services you need.
Prerequisites
- Docker and Docker Compose v2+
- Git
Quick Start
.env and set your LLM API key:
http://localhost:8000. Interactive docs at http://localhost:8000/docs.
Service Profiles
Each optional service is gated behind a profile. Use--profile to activate one or more:
| Profile | Service | Port(s) | Purpose |
|---|---|---|---|
| (none) | cognee | 8000, 5678 | Core API server |
mcp | cognee-mcp | 8000, 5678 | MCP server for IDE integrations |
ui | frontend | 3000 | Experimental web UI |
neo4j | neo4j | 7474, 7687 | Neo4j graph database |
chromadb | chromadb | 3002 | ChromaDB vector database |
postgres | postgres | 5432 | PostgreSQL + pgvector |
redis | redis | 6379 | Redis caching |
Data Persistence
The compose file mounts your localcognee/ source directory and .env file into the container. Named volumes persist database data between restarts:
| Service | Volume |
|---|---|
postgres | postgres_data |
chromadb | .chromadb_data/ (local dir) |
redis | redis_data |
docker-compose.yml.
Environment Variables
Thecognee container reads configuration from .env at startup. Key variables:
| Variable | Default | Description |
|---|---|---|
LLM_API_KEY | (required) | API key for your LLM provider |
LLM_MODEL | openai/gpt-4o-mini | LLM model to use |
DB_PROVIDER | sqlite | Relational DB: sqlite or postgres |
GRAPH_DATABASE_PROVIDER | kuzu | Graph DB: kuzu, neo4j, etc. |
VECTOR_DB_PROVIDER | lancedb | Vector DB: lancedb, chromadb, pgvector, etc. |
CORS_ALLOWED_ORIGINS | * | Restrict to specific domains in production |
REQUIRE_AUTHENTICATION | false | Enable JWT auth for the API |
Common Setups
Cognee + PostgreSQL
Cognee + PostgreSQL
PostgreSQL with pgvector is a good production choice for the relational database.Add to your Start both services:
.env:Cognee + PostgreSQL + Neo4j
Cognee + PostgreSQL + Neo4j
For production deployments with a dedicated graph database:Add to your Start the stack:Neo4j browser is available at
.env:http://localhost:7474.Cognee + ChromaDB
Cognee + ChromaDB
Use ChromaDB as the vector store:Add to your Start:
.env:Cognee with MCP Server
Cognee with MCP Server
Run the MCP server alongside the API:The MCP server uses SSE transport on port
8000 (separate container). Configure your IDE to point to http://localhost:8000/sse.Stopping and Cleaning Up
Need help?
Join our community for Docker deployment support.