Deploy Milvus Standalone + Attu

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

Deploy Milvus Standalone + Attu

Just deployed

Just deployed

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

Implementation Details

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

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:

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:
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}}.

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

Key environment variables

VariableDefaultPurpose
PORT (Milvus)9091Healthcheck port (/healthz)
COMMON_SECURITY_AUTHORIZATIONENABLEDtrueRequire credentials on gRPC and REST
COMMON_SECURITY_DEFAULTROOTPASSWORDgeneratedRoot password, applied on first boot only
COMMON_STORAGETYPElocalLocal-disk storage; do not change after first boot
MILVUS_ADDRESS (Attu)milvus.railway.internal:19530Private-network connection Attu opens on startup
ATTU_AUTH_MODElocalAttu 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.


Template Content

More templates in this category

View Template
Garage S3 Storage
Ultra-light S3 server: fast, open-source, plug-and-play.

PROJETOS
8
View Template
Redis
Self Host Latest Redis with Railway

7
View Template
EasyImg
Simple self-hostable Nuxt.js personal image hosting system.

Muhammad Bilal
0