---
title: "Deploy Milvus Standalone + Attu"
description: "Milvus 3 standalone vector DB with auth on, plus the Attu admin UI"
category: "Storage"
url: https://railway.com/deploy/milvus-standalone-attu
---

# Deploy Milvus Standalone + Attu

Milvus 3 standalone vector DB with auth on, plus the Attu admin UI

**[Deploy Milvus Standalone + Attu on Railway](https://railway.com/template/milvus-standalone-attu)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/milvus-standalone-attu/manifest.json

- **Creator:** Protemplate
- **Category:** Storage
- **Total deploys:** 3

## Template content

### Attu https://avatars.githubusercontent.com/u/18416694?v=4

- **Image:** zilliz/attu:v3.0.0
- **Health check:** /login
- **Public domain:** Yes

### Milvus https://avatars.githubusercontent.com/u/51735404?v=4

- **Image:** milvusdb/milvus:v3.0.1
- **Start command:** `sh -c 'mkdir -p /var/lib/milvus/etcd && printf "listen-client-urls: http://0.0.0.0:2379\nadvertise-client-urls: http://0.0.0.0:2379\nquota-backend-bytes: 4294967296\nauto-compaction-mode: revision\nauto-compaction-retention: \"1000\"\n" > /milvus/configs/embedEtcd.yaml && printf "# Extra config to override default milvus.yaml\n" > /milvus/configs/user.yaml && exec /tini -- milvus run standalone'`
- **Health check:** /healthz

## Documentation

# Deploy and Host Milvus with Attu on Railway

Milvus is the open-source, cloud-native vector database built for billion-scale similarity search. It stores dense and sparse embeddings alongside scalar fields, supports hybrid search with metadata filtering and full-text (BM25) search, and ships SDKs for Python, Node.js, Go, and Java plus a RESTful API. Attu is the official Milvus web UI for browsing collections, running searches, managing users and roles, and importing or exporting data.

## About Hosting Milvus

Hosting Milvus normally means running etcd, MinIO, and Milvus as three services. This template uses upstream's single-container standalone mode instead: etcd runs embedded inside the Milvus process and all data lives on the local filesystem, which is exactly what the official `standalone_embed.sh` installer does. The template wraps `milvusdb/milvus:v3.0.1` so it runs cleanly on Railway: a start command writes the two config files upstream bind-mounts, everything persists on one volume at `/var/lib/milvus`, the healthcheck probes `/healthz` on the metrics port, authentication is switched on with a generated root password, and the gRPC/REST port is published through a TCP proxy. Attu (`zilliz/attu:v3.0.0`) gets the public domain and is pre-connected to Milvus over private networking.

## Common Use Cases

- **RAG pipelines**: store document chunks with embeddings and retrieve the best context for an LLM
- **Semantic and hybrid search**: combine vector similarity, BM25 full-text search, and scalar filters in one query
- **Recommendation and deduplication**: nearest-neighbor lookups over products, users, images, or records
- **AI agent memory**: persist conversation history and tool results as searchable vectors
- **Multi-tenant vector storage**: databases, partitions, and RBAC keep tenants isolated inside one instance

## Dependencies for Milvus Hosting

- **Persistent volume**: `/var/lib/milvus` for etcd metadata, segments, and the write-ahead log (provisioned by this template)
- **Attu volume**: `/data` for Attu's SQLite database (users, saved connections, audit log)
- **Embedding model (your app side)**: Milvus stores vectors you produce with OpenAI, Cohere, Voyage, or a local model; Attu can call these providers for its search UI if you add a key
- **No external database, object storage, or message queue required**

### Deployment Dependencies

- [Run Milvus in Docker (Linux)](https://milvus.io/docs/install_standalone-docker.md)
- [Milvus system configuration reference](https://milvus.io/docs/system_configuration.md)
- [Milvus authentication](https://milvus.io/docs/authenticate.md)
- [Attu deployment guide](https://github.com/zilliztech/attu#deployment)
- [Milvus GitHub repository](https://github.com/milvus-io/milvus)

### Implementation Details

Milvus reads any `milvus.yaml` key from the environment (lowercase, dots and underscores dropped), so the template configures everything with variables:

```env
PORT=9091
ETCD_USE_EMBED=true
ETCD_DATA_DIR=/var/lib/milvus/etcd
ETCD_CONFIG_PATH=/milvus/configs/embedEtcd.yaml
COMMON_STORAGETYPE=local
COMMON_SECURITY_AUTHORIZATIONENABLED=true
COMMON_SECURITY_DEFAULTROOTPASSWORD=${{secret(32)}}
RAILWAY_RUN_UID=0
```

The start command writes `embedEtcd.yaml` and `user.yaml` into `/milvus/configs/` and then runs `/tini -- milvus run standalone`. `PORT=9091` points Railway's healthcheck at the metrics server's `/healthz`; the API stays on 19530. `RAILWAY_RUN_UID=0` is needed because the 3.x image runs as a non-root user while Railway volumes mount root-owned.

Attu is configured with:

```env
MILVUS_ADDRESS=${{Milvus.RAILWAY_PRIVATE_DOMAIN}}:19530
MILVUS_USERNAME=root
MILVUS_PASSWORD=${{Milvus.COMMON_SECURITY_DEFAULTROOTPASSWORD}}
ATTU_AUTH_MODE=local
```

**First steps after deploy**

1. Wait for Milvus to turn healthy (about 60 to 90 seconds).
2. Open the Attu domain immediately and complete the one-time admin setup form (or set `ATTU_ADMIN_USER` and `ATTU_ADMIN_PASSWORD` before deploying to skip it).
3. In Attu, open the pre-configured "Railway Milvus" connection; it already carries the root credentials.
4. Connect your app over private networking:

```python
from pymilvus import MilvusClient

client = MilvusClient(uri="http://milvus.railway.internal:19530", token="root:")
client.create_collection("docs", dimension=768)
```

   Reference the Milvus service in your app's variables with `${{Milvus.RAILWAY_PRIVATE_DOMAIN}}` and `${{Milvus.COMMON_SECURITY_DEFAULTROOTPASSWORD}}`.

5. For SDK access from outside Railway, use the TCP proxy address shown on the Milvus service.

**Key environment variables**

| Variable | Default | Purpose |
|----------|---------|---------|
| `PORT` (Milvus) | `9091` | Healthcheck port (`/healthz`) |
| `COMMON_SECURITY_AUTHORIZATIONENABLED` | `true` | Require credentials on gRPC and REST |
| `COMMON_SECURITY_DEFAULTROOTPASSWORD` | generated | Root password, applied on first boot only |
| `COMMON_STORAGETYPE` | `local` | Local-disk storage; do not change after first boot |
| `MILVUS_ADDRESS` (Attu) | `milvus.railway.internal:19530` | Private-network connection Attu opens on startup |
| `ATTU_AUTH_MODE` | `local` | Attu login; `none` disables it |

Sizing: upstream recommends 8 GB of RAM for standalone; an idle instance uses about 2 GB, and memory grows with your data and index size.

## 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 with Attu on Railway, you get a production-ready vector database with persistent storage, authentication enabled out of the box, a web UI on a managed HTTPS domain, and private networking to your application services. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

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