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.
Connection data
Section titled “Connection data”The script generates a random login and password and writes them into the panel’s .env:
### PROMETHEUS ###### Metrics are available at http://127.0.0.1:METRICS_PORT/metricsMETRICS_USER=gjlToiPHMETRICS_PASS=VsCNutHFThe 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 |
Quick check
Section titled “Quick check”On the server itself the metrics are one command away (the response is in Prometheus text format):
curl -u gjlToiPH:VsCNutHF http://127.0.0.1:3001/metrics | headFrom your own computer the endpoint can be reached through an SSH tunnel, without opening the port to the world:
ssh -L 3001:127.0.0.1:3001 root@your_server_ipAfter that http://127.0.0.1:3001/metrics also opens in the local browser.
Scraper configuration
Section titled “Scraper configuration”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):
- 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:
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: VsCNutHFWhy 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:
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.
