# Qdrant vector database

Source: https://docs.quake.ai/resources/iac-templates/qdrant
Markdown: https://docs.quake.ai/resources/iac-templates/qdrant.md

---

# Qdrant vector database

This pattern composes Compute, Network, and Block Storage into a private vector database.

## What this template does

Provisions a single instance running [Qdrant](https://qdrant.tech) in Docker on a private network, for semantic search, embeddings storage, and retrieval-augmented generation (RAG):

- Compute instance running the Qdrant container, with the API bound to the private IP only (not `0.0.0.0`)
- Private network, subnet, router, and security group; the REST and gRPC ports are reachable only from `private_cidr`
- No floating IP, so the database is not exposed to the public internet. SSH is the only rule open to the internet.
- API key authentication set from `qdrant_api_key`, read from a config file mounted read-only
- Vector storage on a block volume mounted at `/qdrant/storage`, so data survives container and instance restarts

Set `qdrant_api_key` to a strong value when you apply; the template ships no default key. Once the key is set, Qdrant requires it in the `api-key` header on every request.

## Parameters

| Parameter | Description | Default |
| --- | --- | --- |
| `key_name` | SSH keypair name (must already exist) | No default |
| `qdrant_api_key` | API key required on every request, no default | _none_ |
| `qdrant_image` | Engine image | `qdrant/qdrant:v1.12.4` |
| `flavor_name` | Instance size | `m2a.large` |
| `image_name` | Operating system image | `Ubuntu-24.04` |
| `app_name` | Display name prefix and container name | `qdrant` |
| `http_port` | REST API port | `6333` |
| `grpc_port` | gRPC API port | `6334` |
| `volume_size` | Vector storage volume size in GiB | `10` |
| `external_network` | External network for the router gateway | `PublicStatic` |
| `private_cidr` | Private subnet CIDR; the only range allowed to reach the API ports | `10.30.0.0/24` |

## When to use this pattern

Run a vector database on a single private instance, reached by an app on the same private network for semantic search or RAG. For a relational datastore, use [self-managed PostgreSQL](/resources/iac-templates/self-managed-postgres). For the app tier that queries this database, see the [Next.js app template](/resources/iac-templates/nextjs-app) or [Containerized app template](/resources/iac-templates/containerized-app).

## Estimated cost

<PricingCompanion
  components={[
    { kind: "template", slug: "qdrant", required: true },
  ]}
/>

## Template source

<TemplateSource slug="qdrant" />

<TemplateResourceMap template="qdrant" format="opentofu" />

## Customize this pattern

- [Customize a template's image and flavor](/docs/automation/how-to/customize-template-image-flavor)
- [Add a block volume to a template](/docs/automation/how-to/add-volume-to-template)
- [Parameterize a template with a tfvars file](/docs/automation/how-to/parameterize-template-tfvars)

## See also

- [Deploy a vector database tutorial](/resources/deployments/deploy-vector-database)
- [self-managed PostgreSQL template](/resources/iac-templates/self-managed-postgres)
- [Next.js app template](/resources/iac-templates/nextjs-app)
