How to Deploy Qdrant on a VPS
Updated Nov 2026
verified on Ubuntu 26.04 · Nov 2026Self-host the Qdrant vector database on a VPS with Docker Compose, an API key and Caddy HTTPS, with collection snapshots you can restore and a safe upgrade path.
- A VPS with 1 GB+ RAM, more for large collections
- A fresh Ubuntu 26.04 server with root/sudo SSH access
- A domain or subdomain you can point at the server
What Qdrant is
Qdrant is a vector database for semantic search, recommendations and retrieval-augmented generation, written in Rust and Apache-2.0 licensed. It has a REST API, a gRPC API and a web dashboard, and runs as one container with no separate datastore. If you came from a hosted service, see Pinecone alternatives.
By default Qdrant has no authentication and no TLS. This guide adds both: an API key, and Caddy in front for HTTPS.
Server sizing
Memory depends on how many vectors you store, their dimension and your index and quantization settings. On the catalog's test box an empty instance idled at about 17 MB of RAM with 278 MB of disk, which says nothing about a loaded one. Qdrant needs a local POSIX filesystem; network filesystems such as NFS are not supported.
Prepare the server
Update the system, install the tools this guide uses, and open only SSH and the two web ports:
sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install -y curl openssl ufw dnsutils jq
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw --force enable
If you're logged in as root, create a non-root sudo user and continue as that user:
adduser deploy
usermod -aG sudo deploy
A published container port goes around ufw on a Docker host, so only what
should be public gets published below.
Paid link — we earn a commission if you shop through it.
Install Docker
The convenience script installs Docker Engine and the Compose plugin (the Docker and Compose on Ubuntu guide covers the details):
command -v docker >/dev/null || curl -fsSL https://get.docker.com | sudo sh
sudo docker compose version
Install Qdrant
Create the project and generate two keys: a full one and a read-only one for clients that only search. Both HTTP and gRPC are bound to loopback; only the HTTPS REST API and dashboard are public.
mkdir -p ~/qdrant && cd ~/qdrant
if [ ! -f .env ]; then
( umask 077
printf 'DOMAIN=qdrant.example.com\nQDRANT_API_KEY=%s\nQDRANT_READ_KEY=%s\n' \
"$(openssl rand -hex 24)" "$(openssl rand -hex 24)" > .env )
fi
cat > compose.yaml <<'EOF'
services:
qdrant:
image: qdrant/qdrant:v1.19.2
restart: unless-stopped
ports: ["127.0.0.1:6333:6333", "127.0.0.1:6334:6334"]
volumes:
- ./storage:/qdrant/storage
- ./snapshots:/qdrant/snapshots
environment:
QDRANT__SERVICE__API_KEY: ${QDRANT_API_KEY}
QDRANT__SERVICE__READ_ONLY_API_KEY: ${QDRANT_READ_KEY}
caddy:
image: caddy:2
restart: unless-stopped
ports: ["80:80", "443:443"]
environment:
DOMAIN: ${DOMAIN}
volumes: ["./Caddyfile:/etc/caddy/Caddyfile:ro", "caddy_data:/data"]
volumes:
caddy_data:
EOF
cat > Caddyfile <<'EOF'
{$DOMAIN} {
reverse_proxy qdrant:6333
}
EOF
sudo docker compose up -d
HTTPS + domain
Create an A record for your hostname pointing at the server's public IP and confirm it resolves, because Caddy needs that to get a certificate (see Automatic HTTPS with Caddy):
dig +short qdrant.example.com
cd ~/qdrant && . ./.env
curl -s -f --retry 30 --retry-delay 5 --retry-all-errors "https://$DOMAIN/healthz"; echo
gRPC clients are not covered by this proxy block. Use the REST API remotely, or reach port 6334 over an SSH tunnel.
Secure first use
There is no user account: the API key is the login. Check that a request without it is refused, that the full key works, and that the read-only key cannot write:
cd ~/qdrant && . ./.env
curl -s -o /dev/null -w 'no key: %{http_code}\n' "https://$DOMAIN/collections"
curl -s -f -H "api-key: $QDRANT_API_KEY" "https://$DOMAIN/collections"; echo
curl -s -o /dev/null -w 'read key write: %{http_code}\n' -X PUT "https://$DOMAIN/collections/nope" \
-H "api-key: $QDRANT_READ_KEY" -H 'Content-Type: application/json' -d '{"vectors":{"size":4,"distance":"Cosine"}}'
The dashboard is at https://qdrant.example.com/dashboard; paste the key from
.env. Now create a small test collection with two points, which the backup
section uses:
cd ~/qdrant && . ./.env
Q() { curl -s -f -H "api-key: $QDRANT_API_KEY" -H 'Content-Type: application/json' "$@"; echo; }
Q -X PUT "https://$DOMAIN/collections/demo" -d '{"vectors":{"size":4,"distance":"Cosine"}}'
Q -X PUT "https://$DOMAIN/collections/demo/points?wait=true" \
-d '{"points":[{"id":1,"vector":[0.1,0.2,0.3,0.4]},{"id":2,"vector":[0.4,0.3,0.2,0.1]}]}'
Backups
Do not copy the live storage directory. Use Qdrant's snapshots. A
collection snapshot is created per collection; repeat this for each one you have:
cd ~/qdrant && . ./.env
SNAP=$(curl -s -f -X POST -H "api-key: $QDRANT_API_KEY" "http://127.0.0.1:6333/collections/demo/snapshots?wait=true" | jq -r .result.name)
echo "$SNAP"
( umask 077
curl -s -f -H "api-key: $QDRANT_API_KEY" -o ~/demo.snapshot "http://127.0.0.1:6333/collections/demo/snapshots/$SNAP" )
ls -l ~/demo.snapshot
Copy the snapshot and .env off the server. A snapshot restores only into the
same minor version or the next one, so note the version with it.
Restore by uploading the file. To prove it works, this deletes the test collection first, then brings it back and counts the points:
cd ~/qdrant && . ./.env
curl -s -f -X DELETE -H "api-key: $QDRANT_API_KEY" http://127.0.0.1:6333/collections/demo; echo
curl -s -f -X POST -H "api-key: $QDRANT_API_KEY" -F "snapshot=@$HOME/demo.snapshot" \
"http://127.0.0.1:6333/collections/demo/snapshots/upload?priority=snapshot&wait=true"; echo
curl -s -f -X POST -H "api-key: $QDRANT_API_KEY" -H 'Content-Type: application/json' \
-d '{"exact":true}' http://127.0.0.1:6333/collections/demo/points/count | jq -e '.result.count == 2'
Snapshots made on the server also stay in ~/qdrant/snapshots; delete old ones
so they do not fill the disk.
Upgrades
Upgrade one minor version at a time (1.19 to 1.20, never skipping), and take snapshots first. 1.20.0 also fixes a critical flaw in the internal API of distributed (multi-node) mode, which this single-node setup does not use. Here the pinned tag moves from v1.19.2 to v1.20.2; read the release notes before you do it:
cd ~/qdrant && . ./.env
sed -i 's|qdrant/qdrant:v1.19.2|qdrant/qdrant:v1.20.2|' compose.yaml
sudo docker compose pull qdrant
sudo docker compose up -d
curl -s -f --retry 30 --retry-delay 2 --retry-all-errors -H "api-key: $QDRANT_API_KEY" http://127.0.0.1:6333/; echo
curl -s -f --retry 10 --retry-delay 2 --retry-all-errors -X POST -H "api-key: $QDRANT_API_KEY" -H 'Content-Type: application/json' \
-d '{"exact":true}' http://127.0.0.1:6333/collections/demo/points/count; echo
Keep client libraries within one minor version of the server. A single node is briefly unavailable while the container is recreated.
Troubleshooting
401 on every request. Send the key in an api-key header, and check that
the container was recreated after you edited .env.
Container restarts after an upgrade. Read sudo docker compose logs qdrant;
a skipped minor version is the first thing to check.
Out of memory. Check sudo docker stats; look at quantization and on-disk
storage options, or move to a larger server.
No certificate. Check DNS and ports 80 and 443 in your provider's firewall.
Verification + next steps
This guide's run checked the key checks, a snapshot restore and the upgrade from v1.19.2 to v1.20.2 on a two-point collection. The dashboard and gRPC were not tested.
You're done when requests without a key are refused, the dashboard loads over
HTTPS, and a snapshot has been restored. Delete the demo collection and point
your application at the server. See the Qdrant entry for
catalog details and Best VPS for self-hosting for
server picks.
Next steps
Common questions
How long does it take to follow "How to Deploy Qdrant on a VPS"?
We estimate about 25 minutes of hands-on time for "How to Deploy Qdrant on a VPS"; this is an editorial estimate, not a measurement.
Was the "How to Deploy Qdrant on a VPS" guide tested?
The "How to Deploy Qdrant on a VPS" guide was verified end-to-end on Ubuntu 26.04 (Nov 2026).