---
title: "Deploy VictoriaMetrics observability"
description: "Private VictoriaMetrics and Grafana with protected metrics ingestion."
category: "Observability"
url: https://railway.com/deploy/victoriametrics-observability
---

# Deploy VictoriaMetrics observability

Private VictoriaMetrics and Grafana with protected metrics ingestion.

**[Deploy VictoriaMetrics observability on Railway](https://railway.com/template/victoriametrics-observability)**

- **Creator:** Anton Orel's Projects
- **Category:** Observability
- **Total deploys:** 1

## Template content

### VictoriaMetrics

- **Image:** victoriametrics/victoria-metrics:v1.148.0@sha256:407013e902f9a0ba1d4b2d4c077c47bbaf917c893c52ff39b19efe83a654afda
- **Start command:** `/victoria-metrics-prod -storageDataPath=/victoria-metrics-data -retentionPeriod=30d -httpListenAddr=:8428 -selfScrapeInterval=10s`
- **Health check:** /-/ready

### VictoriaMetrics Gateway

- **Image:** caddy:2.11.4-alpine@sha256:5f5c8640aae01df9654968d946d8f1a56c497f1dd5c5cda4cf95ab7c14d58648
- **Start command:** `/bin/sh -ec 'printf '"'"':8080 {\n handle /healthz {\n  rewrite * /api/health\n  reverse_proxy %s\n }\n @write path /api/v1/write /api/v1/import/prometheus /opentelemetry/v1/metrics\n handle @write {\n  @unauthorized not header Authorization "Bearer %s"\n  respond @unauthorized 401\n  reverse_proxy %s\n }\n @read path /api/v1/query /api/v1/query_range\n handle @read {\n  @unauthorized not header Authorization "Bearer %s"\n  respond @unauthorized 401\n  reverse_proxy %s\n }\n handle {\n  reverse_proxy %s\n }\n}\n'"'"' "$GRAFANA_UPSTREAM" "$VICTORIAMETRICS_WRITE_TOKEN" "$VICTORIAMETRICS_UPSTREAM" "$VICTORIAMETRICS_READ_TOKEN" "$VICTORIAMETRICS_UPSTREAM" "$GRAFANA_UPSTREAM" >/tmp/Caddyfile; exec caddy run --config /tmp/Caddyfile --adapter caddyfile'`
- **Health check:** /healthz
- **Public domain:** Yes

### VictoriaMetrics Grafana

- **Image:** grafana/grafana:13.1.1@sha256:7cb8c64c4d57a57e734073f3cc94620adb24a0acb929bd80ba9f14017e3a975b
- **Start command:** `/bin/sh -ec 'printf "%s\n" "$GRAFANA_DATASOURCE_CONFIG" | sed "s|__VICTORIAMETRICS_URL__|$VICTORIAMETRICS_URL|g" > /etc/grafana/provisioning/datasources/victoriametrics.yaml; chown -R 472:0 /var/lib/grafana; exec su -s /bin/sh grafana -c /run.sh'`
- **Health check:** /api/health

## Documentation

# Deploy and Host VictoriaMetrics observability on Railway

VictoriaMetrics observability combines a persistent VictoriaMetrics Community time-series database with Grafana and an authenticated public API gateway.

## About Hosting VictoriaMetrics observability

The template keeps VictoriaMetrics and Grafana private, stores each service on its own volume, provisions Grafana's data source, and exposes only selected read/write API routes through separate generated bearer tokens.

## Why Deploy VictoriaMetrics observability on Railway

Railway supplies private networking, generated credentials, HTTPS, health-gated deployments, and persistent volumes while the template pins reproducible official images and an explicit 30-day retention period.

## Common Use Cases

- Retain application and infrastructure metrics for small internal systems.
- Accept Prometheus-compatible or OpenTelemetry metric writes behind a bearer token.
- Explore and dashboard metrics in authenticated Grafana.

## Dependencies for VictoriaMetrics observability Hosting

The deployment uses VictoriaMetrics Community, Grafana OSS, and Caddy.

### Deployment Dependencies

- Two persistent 5 GB Railway volumes
- One public Railway domain for the Caddy gateway
- Generated Grafana, read-token, and write-token secrets


## Similar templates

- [Pyroscope profiling](https://railway.com/deploy/pyroscope-profiling) — Protected continuous profiling with durable Pyroscope storage.
- [SigOnly](https://railway.com/deploy/sigonly) — Deploy SigNoz with a working demo app & config in one click
- [Unwrapped Spotify Music Stats](https://railway.com/deploy/wide-bold) — Unwrapped Spotify Music Stats, Estatísticas de músicas disponíveis

Open this page in a browser: https://railway.com/deploy/victoriametrics-observability
