> ## 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

<Info>
  This integration is available for Portkey Enterprise users.
</Info>

When deploying your AI app to production, having a robust, scalable, and high-performance logging solution is crucial. That's where Portkey and MongoDB combine — Portkey's Enterprise version easily lets you store all your LLM logs on the most popular database services of your choice. This is made even easier with our ready-to-use Kubernetes Configs (Helm charts).

<Note>
  Portkey is part of MongoDB partner ecosystem to help you build & deploy your AI apps with confidence. [Learn more](https://cloud.mongodb.com/ecosystem/portkey-ai)
</Note>

## Getting Started with MongoDB Log Storage

#### Prerequisites

* Portkey Enterprise account
* Access to a MongoDB instance
* Kubernetes cluster

<Card horizontal="true" title="Link to Helm Charts Repo" href="https://github.com/Portkey-AI/helm-chart/tree/main/helm/enterprise" />

#### Configuration

To use MongoDB for Log storage, you'll need to provide the following values in your `values.yaml` file for the Helm chart deployment:

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

#### Authentication with PEM File

If you're using a PEM file for authentication, follow these additional steps:

<Steps>
  <Step title="Add PEM File Details">
    In the `resources-config.yaml` file, supply PEM file details under the `data` section:

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

  <Step title="Modify value.yaml">
    In `values.yaml`, add the following configuration:

    ```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="Use the PEM File">
    Update your `MONGO_DB_CONNECTION_URL` to use the PEM file:

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

<Note>
  [**Find more details in this repo**](https://github.com/Portkey-AI/helm-chart/blob/main/helm/enterprise/README.md)**.**
</Note>

## Cloud Deployment

Portkey with MongoDB integration can be deployed to all major cloud providers. For cloud-specific documentation, please refer to:

* [AWS](/product/enterprise-offering/private-cloud-deployments/aws)
* [Azure](/product/enterprise-offering/private-cloud-deployments/azure)
* [GCP](/product/enterprise-offering/private-cloud-deployments/gcp)

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