Configure multi-tenant mode to enable data isolation and access control. For conceptual understanding, see Multi-Tenant Architecture.
New to configuration?See the Setup Configuration Overview for the complete workflow:install extras → create .env → choose providers → handle pruning.

Enable Multi-Tenant Mode

Multi-tenant mode is controlled by the ENABLE_BACKEND_ACCESS_CONTROL environment variable:
ENABLE_BACKEND_ACCESS_CONTROL=true
# Optional but recommended to make intent explicit
REQUIRE_AUTHENTICATION=true
Database Override: When multi-tenant mode is enabled, Cognee automatically overrides your graph and vector store configurations to use Kùzu and LanceDB respectively, regardless of your custom settings.

Database Configuration

Multi-tenant mode enforces Kùzu (graph) and LanceDB (vector) stores. Choose your relational database:
  • SQLite — Perfect for local development and testing
  • Postgres — Recommended for production deployments
See Relational Databases for detailed configuration and installation instructions.

Data Storage Layout

Data is automatically organized by user and dataset. See Multi-Tenant Architecture for details.

Authentication Setup

Multi-tenant mode requires authentication:
Start the API server:
uvicorn cognee.api.client:app --host 0.0.0.0 --port 8000
Authentication Methods:
  • Bearer token (API clients)
  • Cookie authentication (web frontend)
Default Credentials:
  • Username: default_user@example.com
  • Password: default_password

Permission System

Multi-tenant mode enforces dataset-level permissions. See Multi-Tenant Architecture for permission details.

Troubleshooting

Permission Denied: Verify user has required permission on the dataset. Data Isolation Verification: Check database files exist per user:
ls -la .cognee_system/databases/<user_uuid>/
Database Provider Conflicts: Multi-tenant mode enforces Kùzu and LanceDB - custom providers are ignored. Authentication Required: All operations require authentication when multi-tenant mode is enabled.

Current Limitations

  • Supported databases: SQLite/Postgres (relational), LanceDB (vector), Kùzu (graph)
  • Custom providers: Graph/vector database providers are locked to Kùzu/LanceDB when multi-tenant mode is enabled