---
title: "Storage Provider Settings"
description: "Mem0 relies on vector stores to organize, store, and retrieve long-term memories efficiently. By default, Mem0 uses built-in vector storage options, but you can easily connect custom vector databas..."
last_updated: "2026-10-11T17:38:36.498751+00:00"
canonical_url: "https://www.doc0.dev/docs/faa36707-7c28-4f69-a18f-700ff61c704e/guide/configuration/storage-provider-settings"
---

## Overview

Mem0 relies on vector stores to organize, store, and retrieve long-term memories efficiently. By default, Mem0 uses built-in vector storage options, but you can easily connect custom vector databases like Qdrant, Chroma, PGVector, or Pinecone to match your infrastructure requirements.

Supported storage providers: `qdrant`, `chroma`, `pgvector`, `pinecone`, `mongodb`, `milvus`, `baidu`, `cassandra`, `neptune`, `upstash_vector`, `azure_ai_search`, `azure_mysql`, `redis`, `valkey`, `databricks`, `elasticsearch`, `vertex_ai_vector_search`, `opensearch`, `supabase`, `weaviate`, `faiss`, `langchain`, `s3_vectors`, `turbopuffer`, `oracledb`.

Sources: `mem0/vector_stores/configs.py`, `mem0/utils/factory.py`, `mem0-ts/src/oss/src/utils/factory.ts`.

---

## Configuring a Vector Store Provider

### Supported Providers and Requirements

When setting up your storage provider, you need to supply the appropriate connection settings depending on whether you are running locally or connecting to a managed cloud service.

| Provider | Key Configuration Options |
| :--- | :--- |
| **Qdrant** | `host`, `port`, `path`, `url`, `api_key`, `on_disk`, `collection_name` |
| **Chroma** | `path`, `host`, `port`, `api_key`, `tenant`, `collection_name` |
| **PGVector** | `dbname`, `user`, `password`, `host`, `port`, `connection_string`, `hnsw` |
| **Pinecone** | `api_key`, `collection_name`, `embedding_model_dims`, `serverless_config`, `pod_config` |
| **Upstash Vector** | `url`, `token`, `collection_name`, `enable_embeddings` |

> [!NOTE]
> For cloud-managed providers like Pinecone or Upstash, make sure your API keys or REST tokens are correctly specified either inside the provider configuration block or through corresponding environment variables (such as `PINECONE_API_KEY` or `UPSTASH_VECTOR_REST_URL`).

---

## Step-by-Step Configuration

### 1. Install Required Dependencies
Before connecting a custom vector database, ensure you have installed the necessary Python or TypeScript package bindings for your chosen provider. For example, if you are using Pinecone or Chroma in Python, install the respective packages:

```bash
pip install pinecone pinecone-text chromadb
```

### 2. Define the Vector Store Settings
Configure your memory instance by specifying the `provider` name alongside its corresponding `config` parameters. 

```python
from mem0 import Memory

config = {
    "vector_store": {
        "provider": "pinecone",
        "config": {
            "collection_name": "my-mem0-index",
            "embedding_model_dims": 1536,
            "metric": "cosine",
            "serverless_config": {
                "cloud": "aws",
                "region": "us-east-1"
            }
        }
    }
}

memory = Memory.from_config(config)
```

> [!WARNING]
> Do not specify both `pod_config` and `serverless_config` simultaneously when configuring Pinecone. Choose one deployment method to avoid initialization errors.

---

## Best Practices and Tips

> [!TIP]
> **Dimension Matching:** Always ensure that the `embedding_model_dims` (or `dimension`) defined in your vector store configuration matches the dimension size output by your active embedding model (e.g., `1536` for OpenAI's `text-embedding-3-small`).

> [!CAUTION]
> **Extra Fields Validation:** Mem0's configuration validators strictly reject unrecognized parameter keys. Ensure you only include parameters supported by that specific provider's configuration schema.

## Related

- [AI Model Selection](https://www.doc0.dev/docs/faa36707-7c28-4f69-a18f-700ff61c704e/guide/configuration/ai-model-selection)
- [Quickstart Overview](https://www.doc0.dev/docs/faa36707-7c28-4f69-a18f-700ff61c704e/guide/getting-started/quickstart-overview)


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/faa36707-7c28-4f69-a18f-700ff61c704e/llms.txt) for all pages in this wiki.
