Skip to main content
VictoriaMetrics: the VMUI Query page, graphing the query sum(rate(vm_http_requests_total[5m])) by(path) Published on November 25, 2026 Your Prometheus metrics take too much disk, or you want to keep months of history without running a cluster: VictoriaMetrics, on a VPS, stores them in a single process and answers PromQL queries.

What VictoriaMetrics does for you

  • Keep your metrics history as long as you choose, with a single flag: -retentionPeriod.
  • Receive data from Prometheus over remote_write, or let VictoriaMetrics scrape your exporters itself from a prometheus.yml file.
  • Query your series in MetricsQL, a PromQL-compatible language, from the built-in VMUI or from Grafana.
  • Plug in other sources: InfluxDB line protocol, Graphite, OpenTSDB, OpenTelemetry, CSV or JSON.
  • Simplify operations: one binary with no dependencies, all data in a single directory.

At a glance

Install VictoriaMetrics on your VPS

Prerequisites: a Linux VPS with Docker and its Compose plugin. The single-node version is one container. It listens on port 8428 for writes, queries and the web interface. Create the service directory:
This compose.yaml file follows the victoriametrics service of compose-vm-single.yml in the official repository. The image is pinned to v1.157.0, and only the HTTP port is published, on the VPS itself. Two flags are added: the retention period and self-scraping of VictoriaMetrics’ own metrics:
Start the container:
The original file also publishes the Graphite (2003), OpenTSDB (4242) and InfluxDB (8089) ports. Add the --graphiteListenAddr, --opentsdbListenAddr or --influxListenAddr flags only if you use those protocols. The InfluxDB line protocol is still accepted on port 8428, at /write.

First steps

  1. Open VMUI. From your workstation, open an SSH tunnel to the VPS, then browse to http://127.0.0.1:8428/vmui:
    Thanks to self-scraping, data is already there. In the Query tab, run sum(rate(vm_http_requests_total[5m])) by(path): the graph shows the HTTP requests VictoriaMetrics receives, by path.
  2. Send your Prometheus metrics. If Prometheus runs on the same VPS, add these lines to its configuration file, then reload it:
    Prometheus keeps its data locally and sends a copy to VictoriaMetrics.
  3. Connect Grafana. Create a Prometheus data source, or a VictoriaMetrics one with the project’s plugin, with the URL http://<victoriametrics-address>:8428. Your PromQL dashboards work unchanged.
Ingested data can take up to about 30 seconds to show up in query results.

Check that it works

From the VPS, read the container logs:
The line started server at http://0.0.0.0:8428/ confirms the HTTP server is listening. Then write a test sample in Prometheus format and read it back:
The response is one JSON line containing "__name__":"foo", "bar":"baz" and "values":[123].

Secure access

By default, VictoriaMetrics asks for no authentication. The project’s docs are clear: its components must run in a private network, never directly reachable from the Internet. The compose.yaml above publishes the port on 127.0.0.1 only. Add HTTP Basic authentication to every endpoint, with a password read from a file. Generate the password, readable by root only:
In compose.yaml, add the file mount and the two flags to the service:
Apply the change with sudo docker compose up -d. VMUI now asks for the admin username and this password. On the Prometheus side, add them to the remote_write block:
To receive metrics from other servers, go through a VPC private network rather than the Internet. If public access is a must, the docs recommend an authentication proxy with TLS termination, such as vmauth, in front of VictoriaMetrics.
The console firewall adds a second barrier: allow inbound SSH only, and port 8428 stays out of reach from outside.

Limits and alternatives

VictoriaMetrics stores and queries, but does not evaluate alerts or draw dashboards: vmalert and Grafana sit next to it. The single-node version is one process; high availability means several instances fed in parallel, or the cluster version.

Going further

No VPS at OnetSolutions yet? Pick yours and run VictoriaMetrics in a few minutes.