Deploy Milvus
Scalable vector database for GenAI applications and semantic search.
milvus
Just deployed
/var/lib/milvus
Just deployed
/var/lib/etcd
Bucket
Bucket
Just deployed
Deploy and Host Milvus on Railway
Milvus is an open-source, high-performance vector database built for GenAI applications, semantic search, embeddings, recommendation systems, and Retrieval-Augmented Generation (RAG). It is designed to handle large-scale vector workloads while providing SDK and API access for modern AI applications.
About Hosting Milvus
Hosting Milvus on Railway gives you a self-hosted vector database that can run alongside AI agents, backend services, embedding pipelines, and RAG applications.
This template runs Milvus in standalone mode with persistent Railway storage. A dedicated etcd service stores Milvus metadata, while a Railway Storage Bucket provides S3-compatible object storage without requiring a separate MinIO deployment.
Milvus uses its embedded Woodpecker message queue for standalone workloads, keeping the stack smaller while still separating metadata, local state, and object storage into the appropriate components.
The built-in Milvus WebUI is available through port 9091 and can be accessed at https://your-milvus-domain/webui/, while applications and SDK clients connect to the main Milvus service through port 19530.
Common Use Cases
- Semantic and similarity search
- Retrieval-Augmented Generation (RAG)
- Embedding storage and retrieval
- Recommendation systems
- AI agent memory and knowledge retrieval
- Image and multimedia similarity search
- Large-scale vector search applications
Dependencies for Milvus Hosting
- Official
milvusdb/milvusDocker image - Dedicated etcd service for Milvus metadata
- Persistent Railway volume for Milvus local data
- Persistent Railway volume for etcd metadata
- Railway Storage Bucket for S3-compatible object storage
Implementation Details
This template separates Milvus storage into three layers:
- Milvus Railway Volume for local persistent state
- etcd for metadata and coordination
- Railway Storage Bucket for object storage
Milvus Persistent Storage
Milvus uses a Railway volume mounted at:
/var/lib/milvus
This keeps Milvus local state persistent across deployments and container restarts.
etcd Metadata Service
Milvus relies on a dedicated etcd service for metadata storage.
The etcd service:
- Runs only on Railway private networking
- Stores metadata in its own persistent volume
- Exposes client communication internally on port
2379 - Does not need a public Railway domain
Milvus connects to etcd through Railway private networking rather than exposing metadata services to the internet.
Railway Storage Bucket
Instead of deploying MinIO, this template connects Milvus directly to a Railway Storage Bucket.
The bucket acts as the S3-compatible object storage backend used by Milvus for persistent object data such as vector and index-related files.
The storage connection uses:
- Railway's S3-compatible endpoint
- Bucket-specific access credentials
- HTTPS
- The Railway bucket name and region
- Virtual-hosted-style S3 access
This removes the need to operate and persist a separate MinIO service.
Milvus Architecture
AI App / Backend
│
│ Railway Private Network
▼
Milvus :19530
│
├── Vector Search
├── REST / gRPC
├── Embedded Woodpecker
│
├──────────────► etcd :2379
│ │
│ └── Metadata
│
├──────────────► Railway Storage Bucket
│ │
│ └── S3-compatible object storage
│
└── Railway Volume
└── Local Milvus state
The built-in WebUI is exposed separately:
Internet
│
▼
Milvus WebUI :9091
Milvus Ports
| Port | Purpose | Public by Default |
|---|---|---|
9091 | Milvus WebUI and management HTTP endpoint | ✅ |
19530 | Main Milvus SDK, REST and gRPC endpoint | ❌ |
2379 | etcd client endpoint | ❌ |
2380 | etcd peer communication | ❌ |
443 | Outbound HTTPS connection to Railway Storage Bucket | ❌ |
The WebUI is available at:
https://your-milvus.up.railway.app/webui/
Opening the root path / may return:
404 page not found
This is expected because the Milvus WebUI is served under /webui/.
Connecting Applications
Applications running inside the same Railway project should connect to Milvus through Railway private networking on port 19530.
This keeps database traffic inside the Railway network and avoids unnecessarily exposing the Milvus client endpoint publicly.
Port 19530 only needs external exposure if an application outside the Railway project must connect directly to Milvus.
The etcd service should remain private and should only be accessed by Milvus through Railway private networking.
Milvus vs Similar Vector Databases
| Feature | Milvus | Qdrant | Weaviate | Pinecone |
|---|---|---|---|---|
| Self-hosted | ✅ | ✅ | ✅ | ❌ |
| Vector similarity search | ✅ | ✅ | ✅ | ✅ |
| REST / API access | ✅ | ✅ | ✅ | ✅ |
| gRPC support | ✅ | ✅ | ✅ | ✅ |
| Built-in WebUI | ✅ | ✅ | ❌ | ✅ |
| External S3-compatible storage | ✅ | ✅ | ✅ | ❌ |
| Separate metadata service architecture | ✅ | ❌ | ❌ | ❌ |
| Embedded message queue for standalone deployment | ✅ | ✅ | ✅ | N/A |
| Designed for large-scale vector workloads | ✅ | ✅ | ✅ | ✅ |
| Fully managed only | ❌ | ❌ | ❌ | ✅ |
Milvus is particularly useful when you want a self-hosted vector database with a scalable architecture that separates metadata, local state, and object storage.
Compared with simpler single-service vector databases, Milvus introduces more infrastructure components, but that architecture provides greater flexibility for larger workloads and future distributed deployments.
Getting Started After Deployment
- Deploy the Milvus template.
- Wait for etcd, Milvus, and the Railway Storage Bucket to become available.
- Open the Milvus service in Railway.
- Generate a public domain for port
9091. - Open:
https://your-milvus.up.railway.app/webui/
-
Confirm that the cluster status shows:
- metastore [etcd] — Healthy
- mq [woodpecker] — Healthy
-
Use the WebUI to inspect Milvus and manage collections.
-
Connect your backend or AI application to Milvus through port
19530. -
Prefer Railway private networking when the application runs inside the same Railway project.
Why Deploy Milvus 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 Milvus on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
