Railway

Deploy Qdrant — Self-Hosted Vector Database & Pinecone Alternative

Self-host Qdrant: fast vector database for RAG. No per-query Pinecone fees.

Deploy Qdrant — Self-Hosted Vector Database & Pinecone Alternative

Just deployed

Deploy and Host Qdrant on Railway

Qdrant vector database dashboard

Qdrant is the open-source vector database built for AI — written in Rust for speed and memory efficiency, with best-in-class filtered search, quantization that cuts memory 4–8x, and a clean REST + gRPC API. It's the storage and search engine behind RAG pipelines, semantic search, recommendations, and AI agent memory: store embeddings, attach arbitrary JSON payloads, and query by vector similarity and metadata filters in a single call, with p50 latencies under 5ms at high recall.

Pinecone bills per read unit and the cost compounds with query volume. Self-hosted Qdrant on Railway is flat compute — as little as ~$5–20/month for small-to-mid datasets — and runs efficiently on modest CPU instances thanks to its Rust core. Feature parity is identical between Qdrant Cloud and self-hosted; you just own the infrastructure and the data.


What This Template Deploys

ServicePurpose
QdrantThe vector database — REST API on 6333, gRPC on 6334, and a built-in web dashboard for browsing collections
Persistent VolumeMounted at /qdrant/storage — your collections, vectors, payloads, and indexes survive every redeploy

Single service, tiny footprint. No external database, no cluster to manage. The Rust engine runs efficiently on small instances, and the web dashboard (at /dashboard) lets you inspect collections and run queries without extra tooling. Set an API key to protect the instance.


About Hosting Qdrant

Every RAG and semantic-search system needs a vector database: a place to store embeddings and retrieve the nearest matches to a query, fast, with metadata filtering. Managed services like Pinecone remove ops but bill per read unit, and the cost compounds as query volume grows — the documented crossover where self-hosting wins is roughly $300–600/month in vector-DB spend.

Qdrant self-hosted flips that: flat compute, no per-query billing, and full control over the data. Railway runs it as a single service with a persistent volume and automatic HTTPS. Because Qdrant is Rust with quantization support, it stays memory-efficient on modest instances — you can run millions of vectors on a small box, unlike memory-hungry alternatives.

Typical cost: ~$5–20/month on Railway depending on dataset size and RAM. Qdrant Cloud starts around $25/month managed; Pinecone serverless adds per-read-unit fees on top of storage. For any RAG system with steady query traffic, self-hosted Qdrant is dramatically cheaper at scale.


Deploy in Under 3 Minutes

  1. Click Deploy on Railway — Qdrant builds automatically (~1–2 minutes)
  2. Add a persistent volume mounted at /qdrant/storage so your vectors survive redeploys
  3. Set QDRANT__SERVICE__API_KEY to a strong secret to protect the instance
  4. Open [your-domain]/dashboard to browse collections, or hit the REST API at port 6333
  5. Create a collection and upsert your embeddings — from LangChain, LlamaIndex, or the client SDKs

No cluster setup. No GPU. No per-query billing.


Common Use Cases

  • Vector store for RAG pipelines — store document embeddings and retrieve the most relevant chunks for LLM context, with metadata filters for tenant, date, or source in the same query
  • Self-hosted alternative to Pinecone — the same vector search without per-read-unit billing; flat Railway compute instead of a bill that compounds with query volume
  • Semantic search over your own content — search by meaning across docs, products, or support tickets, combining vector similarity with JSON payload filtering
  • AI agent long-term memory — give agents persistent, searchable memory of past interactions and knowledge, retrieved by semantic relevance
  • Recommendation engines — find similar items (products, articles, media) by embedding proximity, with filters for availability, category, or price in one call
  • Pairs with LiteLLM and Ollama — complete a self-hosted RAG stack on Railway: Ollama or an API for embeddings, Qdrant for retrieval, LiteLLM as the model gateway

Configuration

VariableRequiredDescription
QDRANT__SERVICE__API_KEY✅ RecommendedAPI key required on all requests — set before exposing the instance
QDRANT__SERVICE__HTTP_PORTPre-set6333 — REST API and dashboard
QDRANT__SERVICE__GRPC_PORTOptional6334 — gRPC API for high-throughput clients
QDRANT__STORAGE__STORAGE_PATHPre-set/qdrant/storage — on the persistent volume
QDRANT__SERVICE__ENABLE_TLSOptionalRailway terminates TLS at the edge; usually left off
QDRANT__LOG_LEVELOptionalLogging verbosity — e.g. INFO

Always set QDRANT__SERVICE__API_KEY before exposing the instance — without it, anyone with the URL can read and write your collections. Mount the /qdrant/storage volume, or your vectors are lost on redeploy. Enable scalar or product quantization per-collection to cut memory use 4–8x on large datasets.


Qdrant vs. Vector Databases

Qdrant (Railway)PineconepgvectorMilvus
Pricing~$5–20/mo flatPer read unit + storagePostgres costSelf-hosted
Self-hosted / own data✅ Yes❌ Cloud only✅ Yes✅ Yes
Filtered search✅ Best-in-class⚠️ Limited⚠️ SQL-based✅ Good
Memory efficiency✅ Rust + quantizationN/A (managed)⚠️ HNSW in RAM⚠️ Heavy
Footprint✅ Tiny, small instancesN/A✅ In Postgres❌ Cluster/K8s
Runs without a cluster✅ Single service✅ Managed✅ Yes❌ DevOps-heavy
Cloud/self-host parity✅ Identical❌ Cloud only✅ Yes✅ Yes
Open source✅ Apache-2.0❌ No✅ Yes✅ Yes

Dependencies for Qdrant Hosting

  • Railway account — Hobby plan (~$5–20/month) sized to your dataset
  • A persistent volume mounted at /qdrant/storage for your vectors and indexes
  • An embedding source — OpenAI, a self-hosted Ollama, or any model that produces vectors

Deployment Dependencies

Implementation Details

This template deploys the official Qdrant image with a persistent volume at /qdrant/storage, exposing the REST API and web dashboard on port 6333 and gRPC on 6334. Qdrant is a single Rust binary — no external database, no cluster orchestration — so it runs efficiently on small Railway instances and starts fast.

Set QDRANT__SERVICE__API_KEY to secure the instance before use. For large datasets, enable scalar or product quantization per collection to reduce memory 4–8x with minimal recall loss, and tune HNSW parameters for your accuracy/speed tradeoff. Qdrant's payload filtering runs alongside vector search in one query, so you don't need a separate metadata store. Connect from other Railway services over the private network using the internal hostname on port 6333.


Frequently Asked Questions

How does self-hosted Qdrant save money versus Pinecone? Pinecone bills per read unit plus storage, so cost compounds with query volume. Self-hosted Qdrant on Railway is flat compute — you pay for the instance, not per query. The documented crossover where self-hosting wins is roughly $300–600/month in vector-DB spend; above steady query volumes, Qdrant is 3–10x cheaper.

What makes Qdrant good for RAG? Qdrant combines fast vector similarity search with rich JSON payload filtering in a single query — so you can retrieve the most relevant chunks and filter by tenant, date, or source at once, which is the hard part of production RAG. Its Rust core keeps latency low (p50 under 5ms at high recall) and memory use modest via quantization.

Do I lose my vectors if Railway redeploys? No — as long as you've mounted the persistent volume at /qdrant/storage. Collections, vectors, payloads, and indexes live there and survive redeploys. Without the volume, data is ephemeral.

Does Qdrant need a GPU? No. Qdrant runs vector search on CPU efficiently thanks to its Rust implementation and quantization — no GPU required. That makes it a natural fit for Railway, unlike GPU-dependent AI workloads.

How do I connect it to my app or LangChain? Use the official client SDKs (Python, JS, Rust, Go) or the REST/gRPC API. LangChain and LlamaIndex have built-in Qdrant integrations — point them at your Railway URL with the API key, create a collection, and upsert embeddings. From other Railway services, use the private network hostname.

How large a dataset can it handle on Railway? Millions of vectors run comfortably on modest instances, especially with quantization enabled. Size RAM to your vector count and dimensions; the HNSW index benefits from fitting in memory. For very large datasets, scale the Railway service's resources or tune quantization and on-disk options.


Why Deploy and Host Qdrant on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Qdrant on Railway, you get a fast, memory-efficient open-source vector database — best-in-class filtered search, quantization, and a REST/gRPC API — on a single service with persistent storage at ~$5–20/month flat, with no per-query billing and full ownership of your embeddings.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
112
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
1
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
51