open-webui/open-webui · error · ValueError

QDRANT_URI is not set. Please configure it in the environmen

Error message

QDRANT_URI is not set. Please configure it in the environment variables.

What it means

QdrantClient (multitenancy variant) __init__ raises ValueError immediately when QDRANT_URI is empty. Unlike the standard qdrant client, this backend has no localhost default — every multitenant collection path is derived from the URI, so it refuses to construct without it.

Source

Thrown at backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py:58


def _metadata_filter(key: str, value: Any) -> models.FieldCondition:
    return models.FieldCondition(key=f'metadata.{key}', match=models.MatchValue(value=value))


class QdrantClient(VectorDBBase):
    def __init__(self):
        self.collection_prefix = QDRANT_COLLECTION_PREFIX
        self.QDRANT_URI = QDRANT_URI
        self.QDRANT_API_KEY = QDRANT_API_KEY
        self.QDRANT_ON_DISK = QDRANT_ON_DISK
        self.PREFER_GRPC = QDRANT_PREFER_GRPC
        self.GRPC_PORT = QDRANT_GRPC_PORT
        self.QDRANT_TIMEOUT = QDRANT_TIMEOUT
        self.QDRANT_HNSW_M = QDRANT_HNSW_M

        if not self.QDRANT_URI:
            raise ValueError('QDRANT_URI is not set. Please configure it in the environment variables.')

        # Unified handling for either scheme
        parsed = urlparse(self.QDRANT_URI)
        host = parsed.hostname or self.QDRANT_URI
        http_port = parsed.port or 6333  # default REST port

        self.client = (
            Qclient(
                host=host,
                port=http_port,
                grpc_port=self.GRPC_PORT,
                prefer_grpc=self.PREFER_GRPC,
                api_key=self.QDRANT_API_KEY,
                timeout=self.QDRANT_TIMEOUT,
            )
            if self.PREFER_GRPC
            else Qclient(
                url=self.QDRANT_URI,

View on GitHub (pinned to 01f4282f1f)

Solutions

  1. Set QDRANT_URI, e.g. QDRANT_URI=http://localhost:6333 (a URL with optional scheme/port; also supports grpc when QDRANT_PREFER_GRPC=true).
  2. Confirm the value reaches the process: docker exec <container> env | grep QDRANT.
  3. Check for typos/empty assignments like QDRANT_URI= with nothing after the equals.
  4. Verify the server is reachable at that URI so init proceeds past this check.

Example fix

# before
VECTOR_DB=qdrant_multitenancy
# after
VECTOR_DB=qdrant_multitenancy
QDRANT_URI=http://qdrant:6333
Defensive patterns

Strategy: validation

Validate before calling

import os
assert os.getenv('QDRANT_URI'), 'QDRANT_URI must be set when VECTOR_DB=qdrant_multitenancy'

Try / catch

try:
    client = QdrantClient()  # multitenancy variant
except ValueError as e:
    if 'QDRANT_URI is not set' in str(e):
        fail_fast('Set QDRANT_URI (e.g. http://qdrant:6333) and restart')
    raise

Prevention

When it happens

Trigger: VECTOR_DB=qdrant_multitenancy (selecting this client class) with QDRANT_URI unset, empty, or whitespace in the process environment.

Common situations: Switching from the regular qdrant backend (which tolerated a default) to the multitenancy one without adding QDRANT_URI; .env not mounted into the container; variable defined in docker-compose for a different service only.

Related errors


AI-assisted analysis of open-webui/open-webui@01f4282f1f (2026-08-14). Data as JSON: /api/errors/7b18fe77968d2fb4. Report an issue: GitHub.