This project provides a ready-to-use local development environment for the Qdrant vector database using Docker Compose.
Before you begin, ensure you have the following installed on your system:
- Docker Desktop (which includes Docker and Docker Compose).
Follow these steps to start the Qdrant service on your local machine.
In a directory you want to place this project, run: git clone https://github.com/ubc/tlef-qdrant
Navigate to the root of this project directory in your terminal and run the following command to start the Qdrant container in detached mode (it will run in the background):
docker-compose up -dYou can check the status of the running container with:
docker-compose psYou should see a service named qdrant-local-dev with a status of Up.
Once the service is running, you can access the Qdrant Web UI in your browser at:
http://localhost:6333/dashboard
This dashboard allows you to view collections, search points, and interact with your vector database.
The Qdrant service exposes two main ports on your local machine:
- Port
6333(HTTP): The REST API endpoint for all database operations. You will use this for making HTTP requests to create collections, add points, search, etc. The Web UI also runs on this port. - Port
6334(gRPC): A high-performance binary protocol used by the official Qdrant client libraries (e.g., for Python, TypeScript/JavaScript).
This service is configured to require an API key for all requests. This is a security best practice.
- Your API Key: The key is defined in the
docker-compose.ymlfile. - How to Use: You must include this key in the
api-keyheader of your HTTP requests.
Example using curl:
# This command retrieves cluster information and should succeed
curl http://localhost:6333/cluster \
--header 'api-key: super-secret-dev-key'
# This command will fail with a 401 Unauthorized error
curl http://localhost:6333/clusterAll data created in your Qdrant instance (collections, vectors, etc.) is stored in the ./qdrant_data directory within this project.
This means your data will persist even if you stop and restart the container. If you want to start with a fresh, empty database, you can stop the service and delete this directory.
Stopping the service and viewing logs:
To stop the Qdrant container without deleting your data, run:
docker-compose downTo view the real-time logs from the Qdrant service for debugging, run:
docker-compose logs -fPress Ctrl+C to stop viewing the logs.