> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MongoDB

> Store Portkey logs in MongoDB for enterprise deployments

> [!NOTE]
>
> Available for Portkey Enterprise users.

Portkey Enterprise lets you store all LLM logs in MongoDB for scalable, high-performance logging in production AI apps.

> [!NOTE]
>
> Portkey is part of the [MongoDB partner ecosystem](https://cloud.mongodb.com/ecosystem/portkey-ai).

## Prerequisites

* Portkey Enterprise account
* MongoDB instance
* Kubernetes cluster

> [card] [Helm Charts Repo](https://github.com/Portkey-AI/helm-chart/tree/main/helm/enterprise)
>
> Ready-to-use Kubernetes configs

## Configuration

Add these values to your `values.yaml`:

```yaml theme={"system"}
MONGO_DB_CONNECTION_URL:
MONGO_DATABASE:
MONGO_COLLECTION_NAME:
MONGO_GENERATION_HOOKS_COLLECTION_NAME:
```

### PEM File Authentication

**1. Add PEM File**

In `resources-config.yaml`, add your certificate:

```yaml theme={"system"}
data:
  document_db.pem: |
    -----BEGIN CERTIFICATE-----
    Your certificate content here
    -----END CERTIFICATE-----
```

**2. Configure Volumes**

In `values.yaml`:

```yaml theme={"system"}
volumes:
  - name: shared-folder
    configMap:
      name: resource-config
volumeMounts:
  - name: shared-folder
    mountPath: /etc/shared/<shared_pem>
    subPath: <shared_pem>
```

**3. Update Connection URL**

```sh theme={"system"}
mongodb://<user>:<password>@<host>?tls=true&tlsCAFile=/etc/shared/document_db.pem&retryWrites=false
```

> [!NOTE]
>
> [Full details in the Helm chart repo](https://github.com/Portkey-AI/helm-chart/blob/main/helm/enterprise/README.md).

## Cloud Deployment

Deploy Portkey with MongoDB on:

> [card] [AWS](https://docs.portkey.ai/docs/product/enterprise-offering/private-cloud-deployments/aws.md)

> [card] [Azure](https://docs.portkey.ai/docs/product/enterprise-offering/private-cloud-deployments/azure)

> [card] [GCP](https://docs.portkey.ai/docs/product/enterprise-offering/private-cloud-deployments/gcp.md)

[Get started with Portkey Enterprise →](https://docs.portkey.ai/docs/product/enterprise-offering.md)

***

> [card] [Portkey is now PRISMA AIRS AI Gateway. See it in action.](https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\&utm_medium=referral\&utm_campaign=prisma_airs\&utm_content=docs_nav#contact)
>
> Contact Us


## Related topics

- [Enterprise Components](https://docs.portkey.ai/docs/product/enterprise-offering/components.md)
- [Enterprise Architecture](https://docs.portkey.ai/docs/self-hosting/hybrid-deployments/architecture.md)
- [AWS Bedrock Knowledge Bases](https://docs.portkey.ai/docs/integrations/llms/bedrock/bedrock-knowledgebase.md)
- [Integrations](https://docs.portkey.ai/docs/integrations/ecosystem.md)
- [Overview](https://docs.portkey.ai/docs/integrations/libraries.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.