Deploy VictoriaMetrics
VictoriaMetrics 1.152 Prometheus-compatible metrics DB with auth and OTLP.
victoriametrics
Just deployed
/storage
Deploy and Host VictoriaMetrics on Railway
VictoriaMetrics is a fast, cost-efficient open-source time series database and a drop-in Prometheus replacement. It accepts metrics through Prometheus remote write, the Prometheus text format, InfluxDB line protocol and OpenTelemetry. You query it with PromQL-compatible MetricsQL from Grafana or from its built-in vmui web interface for exploring data.
About Hosting VictoriaMetrics
This template deploys single-node VictoriaMetrics v1.152.0 with a Railway volume at /storage and a public domain. Every endpoint except the /health and /ping checks requires HTTP basic auth, using the admin user and a password generated at deploy time. Metrics are kept for 30 days by default. VictoriaMetrics compresses data heavily, so a Hobby volume (5 GB) holds a lot of metrics for small projects, but watch disk use as series grow. It also listens on Railway's private network over IPv6, so services and Grafana in the same project can reach it without the public domain.
Common Use Cases
- A long-term Prometheus remote-write target for apps, exporters and Grafana Alloy
- Receiving OpenTelemetry metrics directly from application SDKs
- A cheaper, lighter metrics backend for Grafana dashboards and alerting
Dependencies for VictoriaMetrics Hosting
victoriametrics/victoria-metrics:v1.152.0(official image)- A Railway volume mounted at
/storage - Grafana, Prometheus, vmagent or an OpenTelemetry SDK to send and read metrics
Deployment Dependencies
- VictoriaMetrics documentation
- VictoriaMetrics v1.152.0 release notes
- OpenTelemetry ingestion
- Railway volumes
Implementation Details
| Service | Image | Networking | Storage |
|---|---|---|---|
| victoriametrics | victoriametrics/victoria-metrics:v1.152.0 | public domain on 8428; private IPv6 | volume at /storage |
Send metrics:
# Prometheus / Grafana Alloy remote_write
remote_write:
- url: https:///api/v1/write
basic_auth: { username: admin, password: }
# OpenTelemetry SDK (http/protobuf only; JSON is not accepted)
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https:///opentelemetry/v1/metrics
OTEL_EXPORTER_OTLP_METRICS_HEADERS=Authorization=Basic
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
In Grafana, add a Prometheus data source with URL ${{victoriametrics.VICTORIAMETRICS_PRIVATE_URL}} and basic auth.
| Variable | Default | Purpose |
|---|---|---|
httpAuth_username | admin | Basic auth user |
httpAuth_password | generated secret | Basic auth password |
retentionPeriod | 30d | How long samples are kept (e.g. 90d, 1y) |
enableTCP6 | true | Listen on IPv6 for Railway's private network |
Notes:
- Flags are read from environment variables (
-envflag.enable); any-flag.namecan be set asflag_name. - The vmui query interface is at
/vmui. - Samples newer than about 30 seconds are hidden from queries by default (
-search.latencyOffset).
This is a community-maintained deployment package and does not imply affiliation with or endorsement by VictoriaMetrics.
Why Deploy VictoriaMetrics 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 VictoriaMetrics 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
victoriametrics
victoriametrics/victoria-metrics:v1.152.0
