Install Qdrant Inside Docker Container on Linux

Install Qdrant Inside Docker Container on Linux

Qdrant is an open-source vector database and similarity search engine. It is designed for applications that require high-performance vector search, such as recommendation systems, image search, text search, and more.

This tutorial explains how to install Qdrant inside a Docker container on Linux. Commands have been tested on Ubuntu.

Prepare environment

Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.

Install Qdrant

  • Host network

Run the following command to create a container for Qdrant that uses host network:

docker run -d --name=qdrant --restart=always --network=host \
    -v /opt/qdrant/data:/qdrant/storage \
    qdrant/qdrant
  • User-defined bridge network

User-defined bridge network can be used for listening on different port. By default, the Qdrant service listens on port 6333 for the REST API and dashboard, and on port 6334 for the gRPC API. Both of them can be changed with -p option.

docker network create app-net
docker run -d --name=qdrant --restart=always --network=app-net \
    -p 8080:6333 \
    -p 8081:6334 \
    -v /opt/qdrant/data:/qdrant/storage \
    qdrant/qdrant

Testing Qdrant

To access the web dashboard, navigate to http://<IP_ADDRESS>:6333/dashboard, replacing <IP_ADDRESS> with the system's IP address.

Qdrant nside Docker container on Linux

Uninstall Qdrant

To completely remove Qdrant, remove its container:

docker rm --force qdrant

Remove Qdrant image:

docker rmi qdrant/qdrant

You can also remove Qdrant data:

sudo rm -rf /opt/qdrant

If a user-defined bridge network was created, you can delete it as follows:

docker network rm app-net

Leave a Comment

Cancel reply

Your email address will not be published.