Docker Deployment

GitHub

Deploy Qdrant with Docker — the fastest way to get started with the open-source vector database.

25m15m reading10m lab

Docker Deployment

The quickest way to run Qdrant locally or in production with Docker.

Quick Start

1. Run Qdrant Container

docker run -p 6333:6333 -p 6334:6334 \
  --name qdrant \
  qdrant/qdrant:latest
Ports:
- 6333 — HTTP API
- 6334 — gRPC API

2. Verify Installation

# Check HTTP API
curl http://localhost:6333/healthz
# Expected: {"status":"ok"}

# Check version
curl http://localhost:6333/
# Expected: {"title":"qdrant","version":"1.x.x"}

3. Test with Python

from qdrant_client import QdrantClient

client = QdrantClient("localhost", port=6333)

# Create collection
client.create_collection(
    collection_name="test",
    vectors_config={"size": 128, "distance": "Cosine"}
)

print("Collection created!")

Production Docker Run

With Persistent Storage

# Create data directory
mkdir -p $(pwd)/qdrant_data

# Run with volume
docker run -p 6333:6333 -p 6334:6334 \
  --name qdrant \
  -v $(pwd)/qdrant_data:/qdrant/storage:z \
  qdrant/qdrant:latest

With Custom Config

docker run -p 6333:6333 -p 6334:6334 \
  --name qdrant \
  -v $(pwd)/qdrant_data:/qdrant/storage:z \
  -v $(pwd)/config.yaml:/qdrant/config/production.yaml:z \
  qdrant/qdrant:latest

Create docker-compose.yml:

version: '3.8'

services:
  qdrant:
    image: qdrant/qdrant:latest
    container_name: qdrant
    ports:
      - "6333:6333"
      - "6334:6334"
    volumes:
      - ./qdrant_data:/qdrant/storage
    environment:
      - QDRANT__LOG_LEVEL=INFO
    restart: unless-stopped
    deploy:
      resources:
        limits:
          memory: 2G
        reservations:
          memory: 512M

Run:

docker compose up -d

Configuration Options

Environment Variables

VariableDescriptionDefault
QDRANT__LOG_LEVELLogging levelINFO
QDRANT__SERVICE__HTTP_PORTHTTP port6333
QDRANT__SERVICE__GRPC_PORTgRPC port6334
QDRANT__STORAGE__STORAGE_PATHData directory./storage

Memory Limits

Qdrant benefits from ample memory for HNSW indexes:

# For production workloads
docker run ... \
  --memory=8g \
  --memory-swap=8g \
  qdrant/qdrant:latest

Stopping and Restarting

# Stop
docker stop qdrant

# Start again
docker start qdrant

# Remove container
docker rm qdrant

# View logs
docker logs -f qdrant

Troubleshooting

Port Already in Use

# Find process using port 6333
sudo lsof -i :6333

# Kill or use different port
docker run -p 6335:6333 ...

Permission Denied

# Fix SELinux issues
sudo chown -R 1000:1000 $(pwd)/qdrant_data

Out of Memory

# Check memory usage
docker stats qdrant

# Increase memory limit
docker update --memory=4g qdrant

Next Steps

For multi-service deployment with persistence:

Docker Compose Setup

For Kubernetes production deployment:

Kubernetes with Helm

Discussion