Railway

Deploy Milvus

Scalable vector database for GenAI applications and semantic search.

Deploy 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/milvus Docker 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:

  1. Milvus Railway Volume for local persistent state
  2. etcd for metadata and coordination
  3. 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

PortPurposePublic by Default
9091Milvus WebUI and management HTTP endpoint
19530Main Milvus SDK, REST and gRPC endpoint
2379etcd client endpoint
2380etcd peer communication
443Outbound 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

FeatureMilvusQdrantWeaviatePinecone
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 deploymentN/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

  1. Deploy the Milvus template.
  2. Wait for etcd, Milvus, and the Railway Storage Bucket to become available.
  3. Open the Milvus service in Railway.
  4. Generate a public domain for port 9091.
  5. Open:
https://your-milvus.up.railway.app/webui/
  1. Confirm that the cluster status shows:

    • metastore [etcd] — Healthy
    • mq [woodpecker] — Healthy
  2. Use the WebUI to inspect Milvus and manage collections.

  3. Connect your backend or AI application to Milvus through port 19530.

  4. 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

More templates in this category

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

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

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

codestorm
64