Deploy VictoriaMetrics

VictoriaMetrics 1.152 Prometheus-compatible metrics DB with auth and OTLP.

Deploy 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

Implementation Details

ServiceImageNetworkingStorage
victoriametricsvictoriametrics/victoria-metrics:v1.152.0public domain on 8428; private IPv6volume 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.

VariableDefaultPurpose
httpAuth_usernameadminBasic auth user
httpAuth_passwordgenerated secretBasic auth password
retentionPeriod30dHow long samples are kept (e.g. 90d, 1y)
enableTCP6trueListen on IPv6 for Railway's private network

Notes:

  • Flags are read from environment variables (-envflag.enable); any -flag.name can be set as flag_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

More templates in this category

View Template
NEW
Rootprint
Open-source logs and traces with full-text search on object-storage.

Rootprint
1
View Template
Pyroscope profiling
Protected continuous profiling with durable Pyroscope storage.

Anton Orel
1
View Template
SigOnly
Deploy SigNoz with a working demo app & config in one click

zoeyjones
22