[GH-ISSUE #4923] Management and Signal servers both run pprof on port 6060 #10354

Open
opened 2026-08-05 01:25:35 -04:00 by saavagebueno · 5 comments
Owner

Originally created by @justincmoy on GitHub (Dec 6, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4923

Is your feature request related to a problem? Please describe.
Yes, I'm unable to run both of these servers via CLI on the same host.

Describe the solution you'd like
The best solution to maintain backwards compatibility is to make the port configurable via command-line argument and environment variable.

I can't tell what calls this, so for my use case, it would be reasonable to make it configurable to enable or disable this feature or to remove it altogether.

Describe alternatives you've considered
I hope running via CLI is supported. It seems like running via Docker is the preferred method, but I'd like to keep running these on the host in NixOS.

Additional context

Originally created by @justincmoy on GitHub (Dec 6, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4923 **Is your feature request related to a problem? Please describe.** Yes, I'm unable to run both of these servers via CLI on the same host. **Describe the solution you'd like** The best solution to maintain backwards compatibility is to make the port configurable via command-line argument and environment variable. I can't tell what calls this, so for my use case, it would be reasonable to make it configurable to enable or disable this feature or to remove it altogether. **Describe alternatives you've considered** I hope running via CLI is supported. It seems like running via Docker is the preferred method, but I'd like to keep running these on the host in NixOS. **Additional context** - Management listener: https://github.com/netbirdio/netbird/blob/3f4f825ec14c45dd149a743eb80e98e7bb5e9ec5/management/main.go#L15 - Signal listener: https://github.com/netbirdio/netbird/blob/3f4f825ec14c45dd149a743eb80e98e7bb5e9ec5/signal/cmd/run.go#L200
saavagebueno added the feature-request label 2026-08-05 01:25:35 -04:00
Author
Owner

@nathan818fr commented on GitHub (Dec 13, 2025):

I'm encountering this same problem attempting to run the Netbird Management and Signal containers within the same Pod (containers in the Pod share the same network namespace).

Making the pprof listening address configurable (or allowing it to be disabled) via an environment variable would be great.
Note: Netbird Relay is already using NB_PPROF_ADDR for this.

My quick workaround, for those facing the same issue:

podman run \
  YOUR_PODMAN_ARGS \
  --entrypoint=sh \
  -- docker.io/netbirdio/signal:YOUR_TAG \
  -c "
    # patch https://github.com/netbirdio/netbird/issues/4923
    # using sed, as it is available in the container
    LC_ALL=C sed -i 's/127\\.0\\.0\\.1:6060/127.0.0.1:6061/g' /go/bin/netbird-signal &&
    exec /go/bin/netbird-signal run --log-file=console
  "

And beyond the pprof listener, it would also be helpful to have flags to disable the legacy gRPC listeners:
08f31fbcb3/management/internals/server/server.go (L140)
08f31fbcb3/signal/cmd/run.go (L157)

<!-- gh-comment-id:3649076328 --> @nathan818fr commented on GitHub (Dec 13, 2025): I'm encountering this same problem attempting to run the Netbird Management and Signal containers within the same Pod (containers in the Pod share the same network namespace). Making the pprof listening address configurable (or allowing it to be disabled) via an environment variable would be great. Note: Netbird Relay is already using `NB_PPROF_ADDR` for this. My quick workaround, for those facing the same issue: ```bash podman run \ YOUR_PODMAN_ARGS \ --entrypoint=sh \ -- docker.io/netbirdio/signal:YOUR_TAG \ -c " # patch https://github.com/netbirdio/netbird/issues/4923 # using sed, as it is available in the container LC_ALL=C sed -i 's/127\\.0\\.0\\.1:6060/127.0.0.1:6061/g' /go/bin/netbird-signal && exec /go/bin/netbird-signal run --log-file=console " ``` --- And beyond the pprof listener, it would also be helpful to have flags to disable the legacy gRPC listeners: https://github.com/netbirdio/netbird/blob/08f31fbcb3198f309fb52a70a48d99d47ca35b83/management/internals/server/server.go#L140 https://github.com/netbirdio/netbird/blob/08f31fbcb3198f309fb52a70a48d99d47ca35b83/signal/cmd/run.go#L157
Author
Owner

@ujaandas commented on GitHub (Dec 18, 2025):

I've just run into this too. Could we use NixOS containers instead? I don't really want to use Docker either.

<!-- gh-comment-id:3670925730 --> @ujaandas commented on GitHub (Dec 18, 2025): I've just run into this too. Could we use NixOS containers instead? I don't really want to use Docker either.
Author
Owner

@justincmoy commented on GitHub (Dec 18, 2025):

I was already building the NetBird package locally to gain the benefits of later versions, so I added this snippet to the package: c6f52ebd45/pkgs/by-name/ne/netbird/package.nix (L104-L110)

# https://github.com/netbirdio/netbird/issues/4923
substituteInPlace signal/cmd/run.go \
  --replace-fail '127.0.0.1:6060' '127.0.0.1:6061'

I like the idea of NB_PPROF_ADDR, good find on the precedent of this being implemented for other services!

<!-- gh-comment-id:3671002065 --> @justincmoy commented on GitHub (Dec 18, 2025): I was already building the NetBird package locally to gain the benefits of later versions, so I added this snippet to the package: https://github.com/NixOS/nixpkgs/blob/c6f52ebd45e5925c188d1a20119978aa4ffd5ef6/pkgs/by-name/ne/netbird/package.nix#L104-L110 ``` # https://github.com/netbirdio/netbird/issues/4923 substituteInPlace signal/cmd/run.go \ --replace-fail '127.0.0.1:6060' '127.0.0.1:6061' ``` I like the idea of `NB_PPROF_ADDR`, good find on the precedent of this being implemented for other services!
Author
Owner

@ujaandas commented on GitHub (Dec 19, 2025):

While I wait for my PR to get accepted, if you're on NixOS, you can use this overlay which just fetches the source from my fork with the fixes:

final: prev: {
  netbird = prev.netbird.overrideAttrs (old: {
    src = prev.fetchFromGitHub {
      owner = "ujaandas";
      repo = "netbird";
      rev = "6e4d3554917dae507bd000952f6b88a167d1a093";
      sha256 = "sha256-Q7lfXHQYr0qdT/gAOei4YF0ojwPfmN4Rp8J3zZwv938=";
    };
    vendorHash = "sha256-b3Wl9jsAdYC91JM/kDo4yIF05hqbivtrcn1aRuZzP3s=";
    vendorSha256 = "";
  });
}

And of course, set the environment variable like:

systemd.services.netbird-signal.serviceConfig = {
  Environment = [ "NB_PPROF_ADDR=6061" ];
};
<!-- gh-comment-id:3675588946 --> @ujaandas commented on GitHub (Dec 19, 2025): While I wait for my PR to get accepted, if you're on NixOS, you can use this overlay which just fetches the source from my fork with the fixes: ```nix final: prev: { netbird = prev.netbird.overrideAttrs (old: { src = prev.fetchFromGitHub { owner = "ujaandas"; repo = "netbird"; rev = "6e4d3554917dae507bd000952f6b88a167d1a093"; sha256 = "sha256-Q7lfXHQYr0qdT/gAOei4YF0ojwPfmN4Rp8J3zZwv938="; }; vendorHash = "sha256-b3Wl9jsAdYC91JM/kDo4yIF05hqbivtrcn1aRuZzP3s="; vendorSha256 = ""; }); } ``` And of course, set the environment variable like: ```nix systemd.services.netbird-signal.serviceConfig = { Environment = [ "NB_PPROF_ADDR=6061" ]; }; ```
Author
Owner

@lotheac commented on GitHub (Jul 28, 2026):

this seems to have been fixed in 8f901f8899

<!-- gh-comment-id:5104096343 --> @lotheac commented on GitHub (Jul 28, 2026): this seems to have been fixed in 8f901f88994bac8214c22ad21c6aa07ee60988df
Sign in to join this conversation.
No Label feature-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#10354