
Qdrant is an open-source vector database built for storing and searching high-dimensional embeddings. It enables applications to retrieve results based on semantic similarity rather than exact keyword matches. Qdrant is commonly used in semantic search systems, retrieval-augmented generation (RAG) pipelines, recommendation engines, and AI-powered applications that rely on similarity search to surface relevant results from large datasets.
This article explains how to deploy Qdrant on a Linux server using Docker Compose, configure Traefik for automatic HTTPS with Let's Encrypt, secure access using an API key, and verify the deployment using similarity search operations.
Before you begin, you need to:
qdrant.example.com).Qdrant requires a directory for persistent vector storage. Without persistent storage, collections, embeddings, and indexes are lost when the container restarts.
Create the project directory with a subdirectory for storage.
data: Stores Qdrant collections, vector embeddings, and indexes.Navigate to the project directory.
Generate a strong API key.
Copy the output to use in the next step.
Create the environment file.
Add the following environment variables:
Replace:
qdrant.example.com with your registered domain.admin@example.com with your email address for Let's Encrypt notifications.PASTE_GENERATED_KEY_HERE with the API key you generated in the previous step.Save and close the file.
The deployment uses Traefik as a reverse proxy for HTTPS termination and the Qdrant container for vector storage and similarity search. This configuration is based on the official Qdrant Docker deployment.
Create the Docker Compose file.
Add the following manifest. Check the Qdrant releases page for the latest stable version and replace v1.17.1 accordingly.
Save and close the file.
In the above manifest:
services: Defines two containers that Docker Compose manages:traefik: Functions as the reverse proxy and TLS termination point.qdrant: Runs the vector database service.image: Specifies the container image for each service. The qdrant/qdrant:v1.17.1 image includes the API and storage engine.volumes:./letsencrypt bind mount retains TLS certificates between container restarts../data bind mount preserves vector collections and indexes.environment (Qdrant):QDRANT__SERVICE__API_KEY: Configures the API key required for authenticated API requests.labels (Qdrant): Registers the container with Traefik for HTTPS routing based on the domain name.restart: unless-stopped: Ensures containers recover automatically after failures or restarts.Launch the containers.
Verify that both services are running.
The output displays two running containers with Traefik listening on ports 80 and 443 and Qdrant making port 6333 available internally to the Docker network.
Check the service logs for any errors.
The output shows Qdrant initialization messages confirming storage is loaded and the API is listening on port 6333.
For more information on managing a Docker Compose stack, see the How to Use Docker Compose article.
Qdrant provides a web dashboard and REST API for managing vector collections, embeddings, and similarity queries. The API key set in the .env file controls access to all endpoints.
Open your web browser and navigate to the Qdrant dashboard, replacing qdrant.example.com with your configured domain.
When prompted, enter the API key you created and stored in the .env file to access the dashboard.
Verify that the service is healthy using the /readyz endpoint.
Output:
Verify that the service is operational by creating a collection, inserting sample vectors, and running a similarity search. These steps confirm that the API is accessible, authentication is working, and vector indexing is functioning correctly over HTTPS. Collections organize vectors and define how similarity is measured between them.
Replace qdrant.example.com with your domain in all commands of this section.
Set the API key as a shell variable. Replace YOUR_API_KEY with the value from your .env file.
Create a collection named star_charts with 4-dimensional vectors using Cosine similarity as the distance metric.
Populate your collection with sample data to test similarity search:
This command loads five sample vectors into the star_charts collection with payload data.
Query the collection to find the vectors most similar to a given sample:
Output:
The response confirms that Qdrant is indexing vectors and returning similarity results over HTTPS.
Open your Qdrant dashboard in a browser and click Collections in the left sidebar. Verify that star_charts appears in the list with a GREEN status and 5 points.
These steps confirm that your Qdrant deployment is successfully indexing vectors and serving similarity queries over authenticated HTTPS.
You have successfully deployed Qdrant using Docker Compose with HTTPS. The setup provides a vector database with API key authentication, and a web dashboard for managing collections and vectors. For additional configuration options such as clustering, backup strategies, and advanced indexing, refer to the official Qdrant documentation.
0 Comments
Be the first to comment and share your perspective with the community.