Open WebUI supports multiple vector databases. The choice depends on your database setup:
- ChromaDB (default): Works with SQLite (local development)
- Pgvector: Requires PostgreSQL (production/OpenShift)
When using SQLite locally, use ChromaDB:
# docker-compose.local.yaml
environment:
- VECTOR_DB=chroma # Works with SQLite
# DATABASE_URL not set (defaults to SQLite)ChromaDB:
- ✅ Works with SQLite
- ✅ No additional setup required
- ✅ Stores vectors in
{DATA_DIR}/vector_db - ✅ Perfect for local development
When using PostgreSQL, use Pgvector:
# Kubernetes/OpenShift
environment:
- VECTOR_DB=pgvector
- DATABASE_URL=postgresql://user:pass@host:5432/dbname
- PGVECTOR_DB_URL=postgresql://user:pass@host:5432/dbname # Optional, defaults to DATABASE_URLPgvector:
- ✅ Requires PostgreSQL with pgvector extension
- ✅ Uses the same database as the main app
- ✅ Better for production (shared database)
- ✅ Requires:
CREATE EXTENSION vector;in PostgreSQL
| Vector DB | Works with SQLite? | Works with PostgreSQL? | Use Case |
|---|---|---|---|
| chroma | ✅ Yes | ❌ No | Local development |
| pgvector | ❌ No | ✅ Yes | Production/OpenShift |
| qdrant | ✅ Yes | ✅ Yes | External service |
| milvus | ✅ Yes | ✅ Yes | External service |
| opensearch | ✅ Yes | ✅ Yes | External service |
The codebase automatically:
- ✅ Uses ChromaDB by default (works with SQLite)
- ✅ Validates Pgvector requires PostgreSQL
- ✅ Falls back gracefully if configuration is invalid
Cause: VECTOR_DB=pgvector is set but DATABASE_URL is SQLite.
Solution:
- For local development: Set
VECTOR_DB=chroma(or leave unset) - For production: Ensure
DATABASE_URLstarts withpostgresql://
docker-compose.local.yaml: UsesVECTOR_DB=chroma(SQLite)docker-compose.local.m1.yaml: UsesVECTOR_DB=chroma(SQLite)- Production: Use
VECTOR_DB=pgvectorwith PostgreSQL
From ChromaDB to Pgvector (when moving to production):
- Set
VECTOR_DB=pgvector - Set
DATABASE_URL=postgresql://... - Ensure PostgreSQL has pgvector extension:
CREATE EXTENSION vector; - Re-upload files (vectors are stored separately per vector DB)
Note: Vector embeddings are not automatically migrated between vector databases. You'll need to re-process files.