Skip to content

Deploying a Qdrant App

Introduction

Qdrant is a vector search engine optimized for similarity queries across embeddings. Deploying Qdrant with a Dockerfile on Klutch.sh provides reproducible builds, managed secrets, and persistent storage—all configured from klutch.sh/app. This guide covers installation, Dockerfile setup, environment variables, storage, Nixpacks overrides, and sample API calls.


Prerequisites

  • A Klutch.sh account (sign up)
  • A GitHub repository containing your Qdrant Dockerfile (GitHub is the only supported git source)
  • TLS/domain for secure API access if exposing publicly

For onboarding, see the Quick Start.


Architecture and ports

  • Qdrant serves its HTTP API on internal port 6333. Choose HTTP traffic and set the internal port to 6333.
  • Persistent storage is required for vector collections and payloads.

Repository layout

qdrant/
├── Dockerfile # Must be at repo root for auto-detection
└── config.yaml # Optional Qdrant config overrides

Keep secrets out of Git; store them in Klutch.sh environment variables.


Installation (local) and starter commands

Build and run locally:

Terminal window
docker build -t qdrant-local .
docker run -p 6333:6333 \
-v $(pwd)/data:/qdrant/storage \
qdrant-local

Dockerfile for Qdrant (production-ready)

Place this at the repo root; Klutch.sh auto-detects Dockerfiles.

FROM qdrant/qdrant:latest
COPY config.yaml /qdrant/config/config.yaml
EXPOSE 6333
CMD ["./qdrant"]

Notes:

  • Pin to a stable tag (e.g., qdrant/qdrant:v1.8.3) for predictable upgrades.
  • If you do not use a custom config, remove the COPY config.yaml line.

Environment variables (Klutch.sh)

Common overrides:

  • QDRANT__SERVICE__HTTP_PORT=6333
  • QDRANT__STORAGE__STORAGE_PATH=/qdrant/storage
  • QDRANT__CLUSTER__ENABLED=false (enable only if clustering is supported in your plan)

If deploying without the Dockerfile and relying on Nixpacks:

  • NIXPACKS_START_CMD=./qdrant

Attach persistent volumes

Add storage in Klutch.sh (path and size only):

  • /qdrant/storage — vector collections and payloads.

Ensure the path is writable inside the container.


Deploy Qdrant on Klutch.sh (Dockerfile workflow)

  1. Push your repository—with the Dockerfile at the root—to GitHub.
  2. Open klutch.sh/app, create a project, and add an app.
  3. Select HTTP traffic and set the internal port to 6333.
  4. Add environment variables as needed (port, storage path, and clustering flags).
  5. Attach a volume at /qdrant/storage sized for your vector data.
  6. Deploy. Your API will be reachable at https://example-app.klutch.sh.

Sample API usage

Create a collection:

Terminal window
curl -X PUT https://example-app.klutch.sh/collections/test_collection \
-H "Content-Type: application/json" \
-d '{"vectors":{"size":1536,"distance":"Cosine"}}'

Insert vectors:

Terminal window
curl -X PUT https://example-app.klutch.sh/collections/test_collection/points \
-H "Content-Type: application/json" \
-d '{"points":[{"id":1,"vector":[0.1,0.2,0.3],"payload":{"label":"a"}},{"id":2,"vector":[0.2,0.1,0.4],"payload":{"label":"b"}}]}'

Search:

Terminal window
curl -X POST https://example-app.klutch.sh/collections/test_collection/points/search \
-H "Content-Type: application/json" \
-d '{"vector":[0.1,0.2,0.25],"limit":3}'

Health checks and production tips

  • Use readiness probe on /health to confirm Qdrant is serving.
  • Keep clustering disabled unless you configure it explicitly; set the appropriate env flags.
  • Pin image versions and test config changes in staging before production.
  • Monitor volume usage on /qdrant/storage; resize before reaching capacity.

Qdrant on Klutch.sh delivers reproducible Docker builds, persistent vector storage, and managed secrets—without extra YAML or CI steps. Configure ports, storage, and your collections to start serving vector search.