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

# Connect to Qdrant

Domino’s Qdrant vector database Data Source connector enables easy, secure access to vectorized content stored in [Qdrant](https://qdrant.tech/).

## Create a Qdrant Data Source

You will need the following information about your Qdrant database:

* Host

* Port

* [Qdrant API key](https://qdrant.tech/documentation/cloud/authentication/#create-api-keys)

To create a Qdrant Data Source:

1. From the navigation pane, click **Data > Data Sources**.

2. Click **Create a Data Source**.

3. In the New Data Source window, from **Select Data Store**, select **Qdrant**.

4. Provide the Qdrant **Host** name, **Port**, and [Qdrant API Key](https://qdrant.tech/documentation/cloud/authentication/#create-api-keys) for your Qdrant database.

5. Specify a **Data Source Name** and an optional **Description**.

Domino stores your Qdrant API Key, along with other secrets, in a [secure secret store backed by HashiCorp Vault](/cloud/platform-capabilities/core-concepts/projects/configure-projects/store-project-credentials), so you can have confidence that your secrets are safe. You can test the API key before finalizing your Data Source:

1. Click **Test Credentials**.

2. Confirm that the Data Source authenticates.

3. Select who can view and use the Data Source in Projects.

## Use the Qdrant Data Source

To use your Qdrant Data Source, you must install the prerequisite Python libraries in the compute Environment you want to run Qdrant commands in and configure the Qdrant client using a Domino-specific configuration.

### Install the Qdrant Python library

To install the Qdrant Python library in your compute Environment by [edit your compute Environment](/cloud/platform-capabilities/core-concepts/compute-environments/manage-compute-environments/5-edit-environment-definition) and add the following lines to the Dockerfile instructions:

```dockerfile theme={null}
USER root

RUN pip install --user qdrant-client

USER ubuntu
```

### Configure the Qdrant Python client

To connect to your Qdrant service in a Domino execution, you must initialize your Qdrant connection using a Domino-specific Environment. To find the configuration code snippets:

1. [Add the Qdrant Data Source to your Project](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources#_add_an_existing_data_source_to_a_project).

2. In your Workspace, go to **Data** > **Data Sources** > **Code snippet** > **Python**.

3. Copy and paste the following code snippet into your code, and modify it as needed.

```python theme={null}
import os

from qdrant_client import QdrantClient

# Create the Qdrant client
qdrant = QdrantClient(
    url=os.environ.get("DOMINO_DATA_API_GATEWAY", "http://127.0.0.1:8766"),
    metadata={"X-Domino-Datasource": "qdrant"},
)

# List all collections
print(qdrant.get_collections())
```

Once your Qdrant connection is initialized in the Domino execution, you can use the [Qdrant Python client](https://python-client.qdrant.tech/) normally.

## Next steps

* After connecting to your Data Source, learn how to [Use Data Sources](/cloud/platform-capabilities/core-concepts/data/data-source-connectors/use-data-sources).

* [Share this Data Source](/cloud/platform-capabilities/core-concepts/data/sharing-and-security/share-data-sources) with your collaborators.
