Most single-container deployments need nothing here. The default embedded store works out of the box. You only need to change the vector store to run multiple replicas or to reuse a vector database you already operate.
Options
The embedded LanceDB index is local to one container, so it cannot back multiple replicas. To scale out you need a shared store: pgvector or Milvus.
Selecting a store
VECTOR_STORE picks the backend:
With
auto, setting DATABASE_URL to a Postgres connection (the multi-replica setup) automatically stores vectors in pgvector in that same database. You only set VECTOR_STORE explicitly to override that, for example to keep vectors in Milvus while the relational data lives in Postgres.
Postgres without pgvector
You can run the relational store on an external PostgreSQL and keep embeddings in the embedded index by settingVECTOR_STORE=lancedb alongside DATABASE_URL. Because only the pgvector backend creates the extension, a database used purely for relational data does not need pgvector, and the application user needs no more than normal table privileges.
The embedded index is local to one container, so this pairing suits a single-container deployment that wants its configuration and metadata in a managed database. For multiple replicas, vectors must go to a shared store: pgvector or Milvus.
pgvector
pgvector stores embeddings in PostgreSQL alongside (or beside) your relational data. In the standard multi-replica setup vectors share the relational database, so there is nothing extra to configure. See Scaling for the full provisioning guide, including managed Postgres (RDS, Cloud SQL, Azure) and self-hosted.Use
VECTOR_DATABASE_URL when you want vectors in a dedicated pgvector instance, for example to size and scale vector storage independently of the relational database.Milvus
SetVECTOR_STORE=milvus to store embeddings in an external Milvus cluster or Zilliz Cloud. Context7 creates its collections (HNSW, cosine) on first write. Milvus 2.4 or newer is required.
Use
MILVUS_TOKEN for Zilliz Cloud and API-key clusters, or MILVUS_USERNAME + MILVUS_PASSWORD for a self-hosted cluster with username/password auth.
- Zilliz Cloud
- Self-hosted
Take the public endpoint and API key from your Zilliz Cloud cluster, then set:
Which one to use
- Single container: keep the default (LanceDB). No configuration, no external service.
- Multiple replicas, no existing vector database: use pgvector. Vectors share the PostgreSQL you already need for scaling, so there is nothing extra to run.
- You already run Milvus or Zilliz Cloud, or you need a very large index managed separately from Postgres: use Milvus.