Skip to content

Access to Prometheus metrics

The Remnawave panel exposes metrics in Prometheus format on a dedicated port 3001. During installation the script generates a random login and password for them and binds the port to localhost: the address is not reachable from outside the server, which keeps the metrics away from strangers.

Login data

The ### PROMETHEUS ### section in /opt/remnawave/.env, generated at installation.

Metrics address

http://127.0.0.1:3001/metrics with basic HTTP authentication.

Access

Localhost only: the port in docker-compose.yml is bound to 127.0.0.1.

The script generates a random login and password and writes them into the panel’s .env:

.env
### PROMETHEUS ###
### Metrics are available at http://127.0.0.1:METRICS_PORT/metrics
METRICS_USER=gjlToiPH
METRICS_PASS=VsCNutHF

The file lives at /opt/remnawave/.env; the panel container picks the values up automatically.

Variable Purpose Script value
APP_PORT Panel port 3000 (inside Docker only)
METRICS_PORT Metrics port 3001, bound to 127.0.0.1
METRICS_USER Metrics login random
METRICS_PASS Metrics password random
APP_SECRET Signing key for sessions and API tokens random

On the server itself the metrics are one command away (the response is in Prometheus text format):

root@server: ~
curl -u gjlToiPH:VsCNutHF http://127.0.0.1:3001/metrics | head

From your own computer the endpoint can be reached through an SSH tunnel, without opening the port to the world:

root@server: ~
ssh -L 3001:127.0.0.1:3001 root@your_server_ip

After that http://127.0.0.1:3001/metrics also opens in the local browser.

The metrics must be pulled from the server itself, straight from 127.0.0.1. A config for vmagent (the one the monitoring guide uses):

vmagent/conf.d/remnawave.yml
- job_name: remnawave
scrape_interval: 15s
static_configs:
- targets: ['127.0.0.1:3001']
labels:
instance: "your_instance_name"
basic_auth:
username: "gjlToiPH"
password: "VsCNutHF"

For classic Prometheus the section looks the same:

prometheus.yml
scrape_configs:
- job_name: 'remnawave'
scheme: http
metrics_path: /metrics
scrape_interval: 15s
static_configs:
- targets: ['127.0.0.1:3001']
basic_auth:
username: gjlToiPH
password: VsCNutHF

Why the metrics are not visible from outside

Section titled “Why the metrics are not visible from outside”

The script publishes the metrics port on localhost only:

docker-compose.yml
ports:
- '127.0.0.1:3001:3001'

Direct access from outside is therefore impossible, and, unlike the panel login page, it cannot be bypassed with a cookie: the metrics have their own protection (port binding plus basic auth). There are two ways to pull them from the outside: an agent running on the server itself (vmagent or Prometheus with remote_write), or the SSH tunnel shown above.