I create setup key ,but i can not login with setupkey and manage_url params, what should I do? #1496

Open
opened 2025-11-20 05:31:42 -05:00 by saavagebueno · 6 comments
Owner

Originally created by @mazhiqiang666 on GitHub (Dec 15, 2024).

Describe the problem

A clear and concise description of what the problem is.

To Reproduce

cmd :
netbird up --setup-key xxxxx --management-url xxxxxx

I use this cmd to login to self-hosted netbird , it tell me Error: login failed: rpc error: code = PermissionDenied desc = peer login has expired, please log in once more, How can I solve this problem?

image
Originally created by @mazhiqiang666 on GitHub (Dec 15, 2024). **Describe the problem** A clear and concise description of what the problem is. **To Reproduce** cmd : netbird up --setup-key xxxxx --management-url xxxxxx I use this cmd to login to self-hosted netbird , it tell me Error: login failed: rpc error: code = PermissionDenied desc = peer login has expired, please log in once more, How can I solve this problem? <img width="730" alt="image" src="https://github.com/user-attachments/assets/5807cae9-fea9-4cd8-9fd1-457e0e5c655f" />
saavagebueno added the triage-needed label 2025-11-20 05:31:42 -05:00
Author
Owner

@viegelinsch commented on GitHub (Mar 27, 2025):

macOS 15.3.2 (24D81)
Intel CPU
netbird version = 0.39.1

Trying to connect to original server so without the option --management-url - same error message.

netbird-ui opens browser, shows succesfull login and then complains about not being able to connect to service.

Any suggestions how to do triage?

@viegelinsch commented on GitHub (Mar 27, 2025): macOS 15.3.2 (24D81) Intel CPU netbird version = 0.39.1 Trying to connect to original server so without the option `--management-url` - same error message. netbird-ui opens browser, shows succesfull login and then complains about not being able to connect to service. Any suggestions how to do triage?
Author
Owner

@hakansa commented on GitHub (Mar 27, 2025):

@viegelinsch can you remove that peer on management and retry login again?

@hakansa commented on GitHub (Mar 27, 2025): @viegelinsch can you remove that peer on management and retry login again?
Author
Owner

@viegelinsch commented on GitHub (Mar 27, 2025):

Found the solution in https://github.com/netbirdio/netbird/issues/2613#issuecomment-2359920152.

Classical: "Have you tried to switch it off and on again?"

Uninstall, delete residue files, reboot, install, connect with setup key. Works.

Let's see for how long. Thanks @hakansa for triggering me.

@viegelinsch commented on GitHub (Mar 27, 2025): Found the solution in https://github.com/netbirdio/netbird/issues/2613#issuecomment-2359920152. Classical: "Have you tried to switch it off and on again?" Uninstall, delete residue files, reboot, install, connect with setup key. Works. Let's see for how long. Thanks @hakansa for triggering me.
Author
Owner

@hakansa commented on GitHub (Mar 27, 2025):

great, we will investigate this to find the root cause.

@hakansa commented on GitHub (Mar 27, 2025): great, we will investigate this to find the root cause.
Author
Owner

@braginini commented on GitHub (Mar 27, 2025):

@viegelinsch
Have you added the peer with SSO before? If you did, then the setup-key won't apply. This is done by design as setup keys should be used for server machines.

@braginini commented on GitHub (Mar 27, 2025): @viegelinsch Have you added the peer with SSO before? If you did, then the setup-key won't apply. This is done by design as setup keys should be used for server machines.
Author
Owner

@ZD-FLoM commented on GitHub (Sep 18, 2025):

I can reproduce this with the following steps:

  1. New RPi, running Diet Pi
  2. Install netbird (55.0), run netbird up
  3. Go through the login URL to test the peer
  4. Peer session expires from default settings
  5. Try netbird up --setup-key xxxxx
  6. Get same error as OP
  7. Try netbird down and up again with key
  8. Cannot login, same error

Updated to 57.0, still same issue

@ZD-FLoM commented on GitHub (Sep 18, 2025): I can reproduce this with the following steps: 1. New RPi, running Diet Pi 2. Install netbird (55.0), run netbird up 4. Go through the login URL to test the peer 5. Peer session expires from default settings 6. Try netbird up --setup-key xxxxx 7. Get same error as OP 8. Try netbird down and up again with key 9. Cannot login, same error Updated to 57.0, still same issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1496