Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/pages/selfhosted/observability/relay.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@ The Relay service forwards encrypted WireGuard traffic between peers that cannot
netbird-relay --metrics-port 9090
```

For the standalone Relay service, `--metrics-port` accepts either a port or a
`host:port` address. A bare port such as `9090`, or `:9090`, listens on all
interfaces. To bind both metrics and healthcheck to IPv4 loopback, add these
flags to your Relay command:

```bash
--metrics-port 127.0.0.1:9090 --health-listen-address 127.0.0.1:9000
```

The equivalent environment variables are:

```bash
NB_METRICS_PORT=127.0.0.1:9090
NB_HEALTH_LISTEN_ADDRESS=127.0.0.1:9000
```

Use `[::1]:9090` and `[::1]:9000` for IPv6 loopback. Metrics remain at
`/metrics` and healthcheck at `/health`. Existing numeric metrics settings and
the defaults (`:9090` and `:9000`) are unchanged. Port `0` selects a random
port; it does not disable the listener.

In the combined container, the metrics port is set with `server.metricsPort` in `config.yaml` and is shared with Management and Signal. See [Combined](/selfhosted/observability/combined).

<Note>
Expand Down