[GH-ISSUE #4601] netbird login not respecting the --management-url flag #9873

Open
opened 2026-08-05 01:23:49 -04:00 by saavagebueno · 2 comments
Owner

Originally created by @clarkmcc on GitHub (Oct 7, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4601

Describe the problem

When running netbird login, the CLI is not respecting my value for the management URL.

$ netbird login --management-url="https://foobar.com:443" --log-level debug --log-file console
2025-10-07T19:29:25Z DEBG client/internal/login.go:99: connecting to the Management service https://api.netbird.io:443
2025-10-07T19:29:26Z DEBG client/net/dialer_dial.go:20: Dialing tcp api.netbird.io:443

Expected behavior

I would expect the CLI to use the management URL I provide.

Are you using NetBird Cloud?

Self-hosted.

NetBird version

$ netbird version
0.59.3

Is any other VPN software installed?

No

Debug output

To help us resolve the problem, please attach the following anonymized status output

$ netbird status -dA
Peers detail:
Events: No events recorded
OS: linux/arm64
Daemon version: 0.59.3
CLI version: 0.59.3
Profile: default
Management: Disconnected, reason: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login
Signal: Disconnected
Relays:
Nameservers:
FQDN:
NetBird IP: N/A
Interface type: N/A
Quantum resistance: false
Lazy connection: false
Networks: -
Forwarding rules: 0
Peers count: 0/0 Connected

Create and upload a debug bundle, and share the returned file key:

$ netbird debug for 1m -AS -U
Error: failed to set log level to TRACE: engine not initialized

Additional context

Add any other context about the problem here.

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)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @clarkmcc on GitHub (Oct 7, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4601 **Describe the problem** When running netbird login, the CLI is not respecting my value for the management URL. ``` $ netbird login --management-url="https://foobar.com:443" --log-level debug --log-file console 2025-10-07T19:29:25Z DEBG client/internal/login.go:99: connecting to the Management service https://api.netbird.io:443 2025-10-07T19:29:26Z DEBG client/net/dialer_dial.go:20: Dialing tcp api.netbird.io:443 ``` **Expected behavior** I would expect the CLI to use the management URL I provide. **Are you using NetBird Cloud?** Self-hosted. **NetBird version** ``` $ netbird version 0.59.3 ``` **Is any other VPN software installed?** No **Debug output** To help us resolve the problem, please attach the following anonymized status output ``` $ netbird status -dA Peers detail: Events: No events recorded OS: linux/arm64 Daemon version: 0.59.3 CLI version: 0.59.3 Profile: default Management: Disconnected, reason: rpc error: code = PermissionDenied desc = no peer auth method provided, please use a setup key or interactive SSO login Signal: Disconnected Relays: Nameservers: FQDN: NetBird IP: N/A Interface type: N/A Quantum resistance: false Lazy connection: false Networks: - Forwarding rules: 0 Peers count: 0/0 Connected ``` Create and upload a debug bundle, and share the returned file key: ``` $ netbird debug for 1m -AS -U Error: failed to set log level to TRACE: engine not initialized ``` **Additional context** Add any other context about the problem here. **Have you tried these troubleshooting steps?** - [ ] 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) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:23:49 -04:00
Author
Owner

@clarkmcc commented on GitHub (Oct 7, 2025):

Perhaps this behavior was intentionally changed as part of this issue https://github.com/netbirdio/netbird/issues/1104. If so, it seems a poor user experience to have a global flag that is ignored with certain subcommands. If the --management-url flag is only supported on netbird up, then there may be a good case for not making it a global flag.

Edit: since the docs and the CLI flags both show that you should be able to use the --management-url in the netbird login command, I'm thinking this behavior I'm seeing is probably a bug rather than an intentional design decision.

<!-- gh-comment-id:3378590911 --> @clarkmcc commented on GitHub (Oct 7, 2025): Perhaps this behavior was intentionally changed as part of this issue https://github.com/netbirdio/netbird/issues/1104. If so, it seems a poor user experience to have a global flag that is ignored with certain subcommands. If the `--management-url` flag is only supported on `netbird up`, then there may be a good case for not making it a global flag. Edit: since [the docs](https://docs.netbird.io/how-to/cli) and the CLI flags both show that you should be able to use the `--management-url` in the `netbird login` command, I'm thinking this behavior I'm seeing is probably a bug rather than an intentional design decision.
Author
Owner

@hakansa commented on GitHub (Oct 9, 2025):

#4609 fixes this bug

<!-- gh-comment-id:3384983476 --> @hakansa commented on GitHub (Oct 9, 2025): #4609 fixes this bug
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#9873