![VictoriaMetrics: the VMUI Query page, graphing the query sum(rate(vm_http_requests_total[5m])) by(path)](https://mintcdn.com/onetsolutions-blog/-JN_N6qVay_LBSAB/images/2026/11/victoriametrics.webp?fit=max&auto=format&n=-JN_N6qVay_LBSAB&q=85&s=57c710936f984bbbb16878ef81d9e279)
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 aprometheus.ymlfile. - 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: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:
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
-
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, runsum(rate(vm_http_requests_total[5m])) by(path): the graph shows the HTTP requests VictoriaMetrics receives, by path. -
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.
-
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.
Check that it works
From the VPS, read the container logs: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:
"__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. Thecompose.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:
compose.yaml, add the file mount and the two flags to the service:
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:
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
- Single-node documentation: flags, retention, security, backups
- The project’s quick start
- Install Docker on your VPS
- VPC private network: connect your servers to VictoriaMetrics without crossing the Internet
- Web-Check: audit any website’s SSL, DNS and security: another tool to host on the same VPS

