> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-add-third-party-integration-issues-fixes.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MongoDB

> Store Portkey logs in MongoDB for enterprise deployments

<Info>
  Available for Portkey Enterprise users.
</Info>

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).
</Note>

## Prerequisites

* Portkey Enterprise account
* MongoDB instance
* Kubernetes cluster

<Card title="Helm Charts Repo" icon="github" href="https://github.com/Portkey-AI/helm-chart/tree/main/helm/enterprise">
  Ready-to-use Kubernetes configs
</Card>

## Configuration

Add these values to your `values.yaml`:

```yaml theme={null}
MONGO_DB_CONNECTION_URL:
MONGO_DATABASE:
MONGO_COLLECTION_NAME:
MONGO_GENERATION_HOOKS_COLLECTION_NAME:
```

### PEM File Authentication

<Steps>
  <Step title="Add PEM File">
    In `resources-config.yaml`, add your certificate:

    ```yaml theme={null}
    data:
      document_db.pem: |
        -----BEGIN CERTIFICATE-----
        Your certificate content here
        -----END CERTIFICATE-----
    ```
  </Step>

  <Step title="Configure Volumes">
    In `values.yaml`:

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

  <Step title="Update Connection URL">
    ```sh theme={null}
    mongodb://<user>:<password>@<host>?tls=true&tlsCAFile=/etc/shared/document_db.pem&retryWrites=false
    ```
  </Step>
</Steps>

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

## Cloud Deployment

Deploy Portkey with MongoDB on:

<CardGroup cols={3}>
  <Card title="AWS" icon="aws" href="/product/enterprise-offering/private-cloud-deployments/aws" />

  <Card title="Azure" icon="microsoft" href="/product/enterprise-offering/private-cloud-deployments/azure" />

  <Card title="GCP" icon="google" href="/product/enterprise-offering/private-cloud-deployments/gcp" />
</CardGroup>

[Get started with Portkey Enterprise →](/product/enterprise-offering)
