Skip to content

How-ToSSD

How to Run Qdrant Locally in Docker for Private AI Document Search

Qdrant is a free, open-source vector database that powers private document search for local AI. We show how to run it in Docker, lock it down with an API key, fill it with Ollama embeddings and connect it to Open WebUI.

By , Systems & Technical Editor

5 min read

How to Run Qdrant Locally in Docker for Private AI Document Search

This guide is based on Qdrant's official documentation, the Qdrant Python client README and Ollama's embeddings documentation, all read on 3 December 2026. We haven't measured speed or memory use ourselves.

If you've used a "chat with your documents" feature in a local AI app, a vector database was doing the searching behind the scenes. It stores each chunk of text as a list of numbers (an embedding), then finds the chunks closest in meaning to your question. Qdrant is one of the best-known open-source options. It's Apache 2.0 licensed, written in Rust, and version 1.20.3 came out on 1 December 2026. Running it on your own PC keeps your notes, PDFs and emails off someone else's server.

This guide gets Qdrant running in Docker, locks it down, fills it with embeddings from a local model in Ollama, and runs a real search.

What you need

  • A 64-bit PC. Qdrant supports x86_64/amd64 and AArch64/arm64 only. 32-bit systems aren't supported.

  • Docker. On Windows, that means Docker Desktop with the WSL 2 back end. See our guide to setting up WSL2 for local AI if you haven't used it before.

  • Ollama with an embedding model. This guide uses Google's EmbeddingGemma, a 300M-parameter model that is a 622MB download in Ollama.

  • Python 3 for the example script.

  • An SSD. Qdrant's docs recommend a solid-state (SSD or NVMe) drive if vectors are kept on disk. Qdrant won't work with network file systems such as NFS, or with object storage such as S3.

How much RAM you need depends on how many vectors you store, how long they are, the extra data attached to them and whether you use quantization. Qdrant doesn't give a single minimum figure. A personal document collection is small by database standards, but the embedding model and any chat model you run in Ollama also need memory.

Step 1: Start Qdrant with Docker

Pull the image:

docker pull qdrant/qdrant

Then start it. Qdrant's quickstart publishes ports 6333 (HTTP API and web UI) and 6334 (gRPC API). The version below adds 127.0.0.1 to each port so that only your own PC can connect, a standard Docker port-publishing option:

docker run -d --name qdrant -p 127.0.0.1:6333:6333 -p 127.0.0.1:6334:6334 -v qdrant_storage:/qdrant/storage qdrant/qdrant

This stores data in a Docker named volume called qdrant_storage. That's deliberate on Windows. Qdrant's quickstart notes that you may need a named volume there instead of a local folder, and its installation guide warns that using Docker/WSL on Windows with mounts is known to cause file system problems and data loss. On Linux you can mount a folder instead, for example -v "$(pwd)/qdrant_storage:/qdrant/storage:z".

Open http://localhost:6333/dashboard in your browser. You should see Qdrant's web UI. http://localhost:6333 on its own returns a welcome message.

Step 2: Add an API key before you store anything private

Qdrant's documentation is blunt about this. By default it starts with no encryption or authentication, so anyone who can reach the port can read and change your data. Binding to 127.0.0.1 as above already blocks other devices. If you want other machines to connect, or just want a second layer, set an API key with the QDRANT__SERVICE__API_KEY environment variable:

docker rm -f qdrant
docker run -d --name qdrant -p 127.0.0.1:6333:6333 -p 127.0.0.1:6334:6334 -e QDRANT__SERVICE__API_KEY=change-this-long-random-key -v qdrant_storage:/qdrant/storage qdrant/qdrant

Removing the container doesn't delete the qdrant_storage volume, so your data survives. Every request must then include the key in an api-key header. Qdrant also supports a read-only key (QDRANT__SERVICE__READ_ONLY_API_KEY) for apps that only need to search. The docs warn that sending an API key over an unencrypted connection is insecure and recommend turning on TLS too. Do that before opening the port to your network. Never forward Qdrant's ports through your router.

Step 3: Pull an embedding model in Ollama

ollama pull embeddinggemma

Ollama's /api/embed endpoint returns L2-normalised (unit-length) vectors, which suits cosine similarity. Vector length depends on the model; Ollama says it's typically 384 to 1,024 numbers. Our roundup of the best local embedding models covers alternatives, and our Ollama embeddings guide explains the basics.

Step 4: Install the Python libraries

pip install qdrant-client ollama

Version 1.20.0 of qdrant-client was published on 22 October 2026.

Step 5: Create a collection, add text and search it

Save this as qdrant_demo.py and run it with python qdrant_demo.py. It embeds four short notes, stores them with the original text attached, then searches by meaning:

import ollama
from qdrant_client import QdrantClient
from qdrant_client.models import Distance, VectorParams, PointStruct

notes = [
    "The NAS backs up to the external drive every Sunday night.",
    "Boiler service is booked for the first week of March.",
    "The gaming PC uses a 1000W power supply and an RTX graphics card.",
    "Home insurance renews in September; compare quotes in August.",
]

client = QdrantClient(url="http://localhost:6333", api_key="change-this-long-random-key")

vectors = ollama.embed(model="embeddinggemma", input=notes)["embeddings"]
size = len(vectors[0])  # use the model's real vector length

if not client.collection_exists("notes"):
    client.create_collection(
        collection_name="notes",
        vectors_config=VectorParams(size=size, distance=Distance.COSINE),
    )

client.upsert(
    collection_name="notes",
    points=[PointStruct(id=i, vector=v, payload={"text": t})
            for i, (v, t) in enumerate(zip(vectors, notes))],
)

question = "When does my insurance need renewing?"
qvec = ollama.embed(model="embeddinggemma", input=question)["embeddings"][0]
hits = client.query_points(collection_name="notes", query=qvec, limit=2, with_payload=True).points
for h in hits:
    print(round(h.score, 3), h.payload["text"])

Leave out api_key=... if you skipped Step 2. The insurance note should come out on top even though the question doesn't use the word "renews". That's the point of vector search: it matches meaning rather than exact words.

Two details save headaches. First, the collection's size must match the embedding length exactly, which is why the script reads it from the first vector rather than hard-coding a number. Second, if you change embedding model later, re-embed everything into a new collection, because vectors from different models can't be compared.

Step 6: Plug Qdrant into Open WebUI

You don't have to write your own app. Open WebUI uses Chroma by default, but its VECTOR_DB setting accepts qdrant, with QDRANT_URI and QDRANT_API_KEY for the connection. Open WebUI's documentation recommends a client-server database such as Qdrant, pgvector or Milvus if you run more than one copy, because its default embedded Chroma set-up can't safely be shared. After switching, re-upload your files to the Open WebUI knowledge base so they get indexed in Qdrant.

If Open WebUI runs in its own Docker container, localhost inside that container means the container itself, not your PC. Put both containers on the same Docker network and point QDRANT_URI at http://qdrant:6333.

Troubleshooting

  • "Connection refused" on port 6333. Check the container is running with docker ps, and look at docker logs qdrant.

  • 401 or 403 errors. The API key in your client doesn't match QDRANT__SERVICE__API_KEY.

  • Wrong vector size errors. You created the collection with a different embedding model. Delete it or create a new one.

  • Data disappeared on Windows. Use a named volume as shown, not a mounted Windows folder.

The bottom line

Qdrant is a solid first vector database for private AI document search on a home PC: one Docker container, a built-in web UI and simple Python code with Ollama embeddings. Bind it to 127.0.0.1, set an API key before storing anything personal, use a named volume on Windows and keep the data on an SSD.

In this article

Sources

  1. 01Qdrant docs, Local Quickstart
  2. 02Qdrant docs, Installation
  3. 03Qdrant docs, Security
  4. 04Qdrant on GitHub (README)
  5. 05Qdrant on GitHub, Releases
  6. 06Qdrant Python client on GitHub (README)
  7. 07Ollama docs, Embeddings
  8. 08Ollama library, EmbeddingGemma
  9. 09Docker docs, Port publishing and mapping
  10. 10Open WebUI docs, Environment Variable Configuration

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best Free Android Screen Mirroring Apps for PC (2026)

Best Picks

Best Free Android Screen Mirroring Apps for PC (2026)

The best free apps to mirror and control your Android phone on a PC in 2026: scrcpy for almost any phone, Phone Link on supported models, Escrcpy and QtScrcpy for a graphical interface, and Vysor for browser and iPhone support.

Hannah Vance6 min

scrcpy vs Phone Link: Best Way to Use Android Apps on a PC?

Versus

scrcpy vs Phone Link: Best Way to Use Android Apps on a PC?

scrcpy and Microsoft Phone Link both put your Android phone's apps on a Windows PC for free. We compare phone support, setup, how each shows your apps, extra features and privacy to help you pick the right one.

Callum Reid5 min

How to Mirror and Control Your Android Phone on a PC with scrcpy

How-To

How to Mirror and Control Your Android Phone on a PC with scrcpy

scrcpy is a free, open-source app that mirrors your Android phone's screen and sound on a Windows PC and lets you control it with your mouse and keyboard. We show how to enable USB debugging, install it, connect over USB or Wi-Fi, use the best shortcuts and options, and fix common errors.

Marcus Thorne7 min

Best Vector Databases for Local RAG on Your PC in 2026

Best Picks

Best Vector Databases for Local RAG on Your PC in 2026

The best vector databases for running private RAG and document search on your own PC: Qdrant, Chroma, pgvector, LanceDB, Milvus and Weaviate, with licences, how each runs, what to watch out for and the hardware that matters.

Hannah Vance6 min