[GH-ISSUE #4399] Container healthchecks for Relay and Signal container #9353

Open
opened 2026-08-05 01:21:49 -04:00 by saavagebueno · 1 comment
Owner

Originally created by @cin3m on GitHub (Aug 25, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4399

Describe the problem

I'm trying to implement the health checks of the relay component. Is there any documentation how to use the health endpoint? If I try to wget some data from within the container I'll receive:
wget: server returned error: HTTP/1.1 503 Service Unavailable

If I configure the port to be accessible from the outside the container responds with
{"status":"unhealthy","timestamp":"2025-08-25T08:47:38.185667729Z","listeners":["ws"],"certificate_valid":false}

The same message gets returned, if I try to curl from within the container:
{"status":"unhealthy","timestamp":"2025-08-25T18:13:08.979364057Z","listeners":["ws"],"certificate_valid":false}

Is the unhealthy status a result of the missing certificate?

Furthermore, is there any health checking mechanism for the signal component?

To Reproduce

Steps to reproduce the behavior:

  1. docker exec into the relay
  2. execute wget --no-verbose --tries=1 --spider http://localhost:9000/health

Expected behavior

More information regarding the health check system.

Are you using NetBird Cloud?

No.

NetBird version

0.55.1

Is any other VPN software installed?

No

Debug output
N/A

Screenshots

N/A

Additional context

N/A

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • [N/A] Restarted the NetBird client
  • [N/A] Disabled other VPN software
  • [N/A] Checked firewall settings
Originally created by @cin3m on GitHub (Aug 25, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4399 **Describe the problem** I'm trying to implement the health checks of the relay component. Is there any documentation how to use the health endpoint? If I try to wget some data from within the container I'll receive: `wget: server returned error: HTTP/1.1 503 Service Unavailable` If I configure the port to be accessible from the outside the container responds with `{"status":"unhealthy","timestamp":"2025-08-25T08:47:38.185667729Z","listeners":["ws"],"certificate_valid":false}` The same message gets returned, if I try to curl from within the container: `{"status":"unhealthy","timestamp":"2025-08-25T18:13:08.979364057Z","listeners":["ws"],"certificate_valid":false}` Is the unhealthy status a result of the missing certificate? Furthermore, is there any health checking mechanism for the signal component? **To Reproduce** Steps to reproduce the behavior: 1. docker exec into the relay 2. execute `wget --no-verbose --tries=1 --spider http://localhost:9000/health` **Expected behavior** More information regarding the health check system. **Are you using NetBird Cloud?** No. **NetBird version** `0.55.1` **Is any other VPN software installed?** No **Debug output** N/A **Screenshots** N/A **Additional context** N/A **Have you tried these troubleshooting steps?** - [x] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [N/A] Restarted the NetBird client - [N/A] Disabled other VPN software - [N/A] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:21:49 -04:00
Author
Owner

@reimarstier commented on GitHub (Feb 17, 2026):

I've added the following healthcheck to my deployments in the meantime until there is a proper way to do this:

services:
  netbird-signal:
    image: netbirdio/signal
    healthcheck:
      # The following checks the websocket proxy port, the other port 10000 is disregarded entirely
      # expected return code: HTTP/1.1 405 Method Not Allowed
      test: [ "CMD", "sh", "-c", "wget --proxy off --no-verbose --tries=1 --spider http://localhost:80 2>&1 | grep 405" ]

  netbird-relay:
    image: netbirdio/relay
    environment:
      - NB_LOG_LEVEL=info
      - NB_LISTEN_ADDRESS=:33080  # port used below
    healthcheck:
      # expected return code: HTTP/1.1 426 Upgrade Required
      test: [ "CMD", "sh", "-c", "wget --proxy off --no-verbose --tries=1 --spider http://localhost:33080/relay 2>&1 | grep 426" ]

Using the shell command to be able to pipe and grep the output of wget. Not ideal, but it provides some insights where there are none right now.

<!-- gh-comment-id:3912962507 --> @reimarstier commented on GitHub (Feb 17, 2026): I've added the following healthcheck to my deployments in the meantime until there is a proper way to do this: ``` services: netbird-signal: image: netbirdio/signal healthcheck: # The following checks the websocket proxy port, the other port 10000 is disregarded entirely # expected return code: HTTP/1.1 405 Method Not Allowed test: [ "CMD", "sh", "-c", "wget --proxy off --no-verbose --tries=1 --spider http://localhost:80 2>&1 | grep 405" ] netbird-relay: image: netbirdio/relay environment: - NB_LOG_LEVEL=info - NB_LISTEN_ADDRESS=:33080 # port used below healthcheck: # expected return code: HTTP/1.1 426 Upgrade Required test: [ "CMD", "sh", "-c", "wget --proxy off --no-verbose --tries=1 --spider http://localhost:33080/relay 2>&1 | grep 426" ] ``` Using the shell command to be able to pipe and grep the output of wget. Not ideal, but it provides some insights where there are none right now.
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#9353