Reference · Local AI servers
Qdrant ports 6333 and 6334, Chroma port 8000: check vector database exposure
Self-hosted Qdrant on ports 6333 and 6334 and a Chroma server on port 8000 have no authentication by default. Check what listens, publish Docker ports on 127.0.0.1, and set a Qdrant API key with TLS.
| Target artifact | Qdrant's REST API and web dashboard on TCP port 6333 and its gRPC API on 6334; a Chroma server's HTTP API on TCP port 8000. |
|---|---|
| Default behaviour | Qdrant binds to every network interface with no API key and no encryption, so anyone who reaches it can read, write or delete all its data. Chroma listens on localhost when started with chroma run, but its documented Docker command publishes port 8000 on every host address, and Chroma 1.0 and later have no built-in authentication. |
| Safe state | Both listening on 127.0.0.1, or published as 127.0.0.1:PORT->PORT/tcp; Qdrant with an API key, a read-only key for apps that only search, and TLS before any other machine connects; Chroma reachable from other machines only through a proxy that signs users in; Qdrant's cluster port 6335 closed to everything outside the cluster. |
| Check on Linux | sudo ss -tlnp | grep -E ':(6333|6334|6335|8000)\b' |
| Check on Windows | Get-NetTCPConnection -State Listen -LocalPort 6333, 6334, 8000 -ErrorAction SilentlyContinue | Select-Object LocalAddress, LocalPort, OwningProcess |
| Check on macOS | sudo lsof -nP -iTCP -sTCP:LISTEN | grep -E ':(6333|6334|8000) ' |
| Check in Docker | docker ps --format 'table {{.Names}}\t{{.Ports}}' |
| Check from another device | curl --max-time 5 http://SERVER_IP:6333/collections for Qdrant, curl --max-time 5 http://SERVER_IP:8000/api/v2/heartbeat for Chroma |
| Fix in Docker | publish with -p 127.0.0.1:6333:6333 -p 127.0.0.1:6334:6334 for Qdrant and -p 127.0.0.1:8000:8000 for Chroma |
| Fix for Qdrant | QDRANT__SERVICE__HOST=127.0.0.1 outside Docker, and an API key in QDRANT__SERVICE__API_KEY everywhere |
| Fix for Chroma | start it without --host 0.0.0.0, as in chroma run --path ./chroma-data |
Read the result
| Port | Program | What answers there |
|---|---|---|
6333 | Qdrant | The REST API, and the web dashboard at /dashboard |
6334 | Qdrant | The gRPC API |
6335 | Qdrant | Internal gRPC between cluster peers, in distributed mode only |
8000 | Chroma | Chroma's HTTP API; vLLM also defaults to this port, so check the program name |
127.0.0.1or::1in front of the port: this computer only.0.0.0.0,::,[::]or*: every network interface. For Qdrant, this is the default.- From another device, a JSON reply from Qdrant's
/collectionsmeans it answers without a key: anyone who can reach it can read, change or delete the data. An authorization error means a key is required. - Any reply from Chroma's heartbeat means the server is reachable, and with no built-in sign-in, reachable means open.
Qdrant
Qdrant's documentation says every self-deployed instance is not secure by default: it is open on all network interfaces and has no authentication configured.
Docker: publish on 127.0.0.1
Qdrant's quickstart publishes both ports on every host address. This is the same command with the loopback address added. Stop and remove the old container first, and run this from the same folder so it uses the same qdrant_storage folder:
docker run -p 127.0.0.1:6333:6333 -p 127.0.0.1:6334:6334 -v "$(pwd)/qdrant_storage:/qdrant/storage:z" qdrant/qdrantPorts published by Docker bypass UFW; see Docker published ports.
Outside Docker: bind to 127.0.0.1
Set host: 127.0.0.1 under service: in config/config.yaml or config/local.yaml, or set the matching environment variable, which overrides every configuration file:
QDRANT__SERVICE__HOST=127.0.0.1 ./qdrantSet an API key, a read-only key and TLS
With service.api_key set, every request must carry the key, in an api-key header or as Authorization: Bearer. A second key, service.read_only_api_key, allows read-only operations, for apps that only search.
- Generate two keys, one at a time:
openssl rand -hex 32- Put them in a file readable only by you, named
qdrant.env:
QDRANT__SERVICE__API_KEY=YOUR_ADMIN_KEY
QDRANT__SERVICE__READ_ONLY_API_KEY=YOUR_READ_ONLY_KEY- Recreate the container with the file, then test: without the key,
/collectionsis refused; with it, Qdrant answers.
docker run -p 127.0.0.1:6333:6333 -p 127.0.0.1:6334:6334 --env-file ./qdrant.env -v "$(pwd)/qdrant_storage:/qdrant/storage:z" qdrant/qdrant
curl --max-time 5 http://127.0.0.1:6333/collections
curl --max-time 5 -H "api-key: YOUR_ADMIN_KEY" http://127.0.0.1:6333/collectionsEvery client then has to send a key; give apps that only search the read-only one. Qdrant's documentation warns that sending a key over an unencrypted connection is insecure. Before any other machine connects, turn on TLS with QDRANT__SERVICE__ENABLE_TLS=true and the certificate paths in QDRANT__TLS__CERT and QDRANT__TLS__KEY, or put Qdrant behind a proxy that handles HTTPS, such as nginx.
Cluster port 6335 and browsers
- In distributed mode, peers talk over internal gRPC on port 6335. Since Qdrant 1.20.0 that channel requires the API key, but only when you configure one; without a key it is not protected. Keep port 6335 unreachable from outside the cluster, and turn on
cluster.p2p.enable_tlsfor traffic between peers. - CORS headers are on by default (
service.enable_cors: true), which, in Qdrant's words, allows browsers to query the REST API regardless of the page's origin. A web page open in your browser can therefore call a Qdrant on127.0.0.1. Set a key even on a loopback-only instance, or setQDRANT__SERVICE__ENABLE_CORS=falseif no browser app needs the REST API.
Chroma
Chroma removed its built-in authentication in version 1.0.0 (1 March 2025): "Chroma no longer provides built-in authentication implementations." Settings such as CHROMA_SERVER_AUTHN_PROVIDER and CHROMA_SERVER_AUTHN_CREDENTIALS belong to older versions. Anyone who reaches a Chroma 1.x server can use it, so where it listens is the whole defence.
chroma run
chroma run listens on localhost, port 8000, unless you give it another host:
chroma run --path ./chroma-data--host 0.0.0.0 opens it on every interface; remove it. If you start Chroma with a configuration file instead, as in chroma run ./config.yaml, check its listen_address line: Chroma's full sample configuration sets listen_address: "0.0.0.0" and cors_allow_origins: ["*"]. Change the first to "127.0.0.1", and replace "*" in the second with only the web addresses that need browser access.
Docker
Chroma's Docker guide runs docker run -v ./chroma-data:/data -p 8000:8000 chromadb/chroma, which publishes port 8000 on every host address. Publish it on the loopback address:
docker run -v ./chroma-data:/data -p 127.0.0.1:8000:8000 chromadb/chromaIn Docker Compose, write the port as "127.0.0.1:8000:8000".
To reach either database from a laptop, use an SSH tunnel instead of a network address, for example ssh -N -L 6333:127.0.0.1:6333 USER@SERVER for Qdrant or ssh -N -L 8000:127.0.0.1:8000 USER@SERVER for Chroma. For Chroma, any other route needs a reverse proxy that signs users in, since Chroma itself does not.
Troubleshooting
docker ps shows 127.0.0.1, but another machine still connects
On Docker Engine releases older than 28.0.0, hosts on the same local network segment could reach ports published to 127.0.0.1. Check with docker version and update the engine. Also look for a reverse proxy that forwards another port to the database.
Related guides and lookups
Sources
- Qdrant: security
- Qdrant: local quickstart
- Qdrant: configuration
- Qdrant: secure a self-hosted Qdrant instance
- Chroma: run a Chroma server
- Chroma: Docker
- Chroma: migration notes, version 1.0.0
- Chroma: full sample server configuration
- vLLM: vllm serve command-line reference
- Docker: port publishing
- Docker: packet filtering and firewalls
- Microsoft Learn: Get-NetTCPConnection