---
title: "Deploy Milvus"
description: "Scalable vector database for GenAI applications and semantic search."
category: "AI/ML"
url: https://railway.com/deploy/milvus
---

# Deploy Milvus

Scalable vector database for GenAI applications and semantic search.

**[Deploy Milvus on Railway](https://railway.com/template/milvus)**

- **Creator:** INF Labs
- **Category:** AI/ML

## Template content

### milvus https://milvus.io/images/layout/milvus-logo.svg

- **Image:** milvusdb/milvus
- **Start command:** `milvus run standalone`
- **Public domain:** Yes

### etcd

- **Image:** quay.io/coreos/etcd:v3.5.25
- **Start command:** `/usr/local/bin/etcd`

## Buckets

- **Bucket**

## Documentation

# 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:

```text
/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

```text
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:

```text
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:

```text
https://your-milvus.up.railway.app/webui/
```

Opening the root path `/` may return:

```text
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

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:

```text
https://your-milvus.up.railway.app/webui/
```

6. Confirm that the cluster status shows:

   * **metastore [etcd] — Healthy**
   * **mq [woodpecker] — Healthy**
7. Use the WebUI to inspect Milvus and manage collections.
8. Connect your backend or AI application to Milvus through port `19530`.
9. 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.

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/milvus
