Client-side Peer logout mechanism (covering both config.json and management cleanup) #787

Closed
opened 2025-11-20 05:17:33 -05:00 by saavagebueno · 9 comments
Owner

Originally created by @roonodz on GitHub (Apr 10, 2024).

Is your feature request related to a problem? Please describe.
We use ansible to automatically enroll our servers in Netbird.

But sometimes we want to remove them. We do have an ansible code that will properly clear the server before it will be destroy so it would be nice to have a logout feature in the netbird client.

The problem is as follows

  1. We can't use the ephemeral option because 10min is too short. Not all our servers should be deleted for such a short period of downtime.
  2. We can't use the netbird client because there's no option to signoff/logout.

Describe the solution you'd like
Ideally, it would be great to have both options:

  1. Configure the ephemeral timer at key setup. So we can setup a longer delay like 24h.
  2. Add a parameter to signoff/logout from the netbird client command line.

Additional context
None

Originally created by @roonodz on GitHub (Apr 10, 2024). **Is your feature request related to a problem? Please describe.** We use ansible to automatically enroll our servers in Netbird. But sometimes we want to remove them. We do have an ansible code that will properly clear the server before it will be destroy so it would be nice to have a logout feature in the netbird client. The problem is as follows 1. We can't use the ephemeral option because 10min is too short. Not all our servers should be deleted for such a short period of downtime. 2. We can't use the netbird client because there's no option to signoff/logout. **Describe the solution you'd like** Ideally, it would be great to have both options: 1. Configure the ephemeral timer at key setup. So we can setup a longer delay like 24h. 2. Add a parameter to signoff/logout from the netbird client command line. **Additional context** None
saavagebueno added the peer-managementfeature-requestclientmanagement-service labels 2025-11-20 05:17:33 -05:00
Author
Owner

@b100dian commented on GitHub (May 29, 2024):

There is an /etc/netbird/config.json or /var/snap/netbird/common/config.json that can be moved away (deleted if you know what you're doing) to achieve this in my experience

@b100dian commented on GitHub (May 29, 2024): There is an /etc/netbird/config.json or /var/snap/netbird/common/config.json that can be moved away (deleted if you know what you're doing) to achieve this in my experience
Author
Owner

@enyachoke commented on GitHub (May 30, 2024):

@b100dian will this clean up the peer for the server as well?

@enyachoke commented on GitHub (May 30, 2024): @b100dian will this clean up the peer for the server as well?
Author
Owner

@roonodz commented on GitHub (May 30, 2024):

Yes, my goal was to clean up the NetBird server database. The server is being decommissioned anyway.
And remove the configuration file does not achieve this goal.

@roonodz commented on GitHub (May 30, 2024): Yes, my goal was to clean up the NetBird server database. The server is being decommissioned anyway. And remove the configuration file does not achieve this goal.
Author
Owner

@b100dian commented on GitHub (Jun 1, 2024):

No, it doesn't remove the peer registration. This type of logout by removing configuration was useful for me when I cloned a VM that was already logged in.

@b100dian commented on GitHub (Jun 1, 2024): No, it doesn't remove the peer registration. This type of logout by removing configuration was useful for me when I cloned a VM that was already logged in.
Author
Owner

@matanbaruch commented on GitHub (Aug 8, 2025):

@roonodz
netbird logout was added
https://github.com/netbirdio/netbird/pull/4268

@matanbaruch commented on GitHub (Aug 8, 2025): @roonodz netbird logout was added https://github.com/netbirdio/netbird/pull/4268
Author
Owner

@saule1508 commented on GitHub (Aug 11, 2025):

it is called netbird deregister now. Unfortunately the logout functionality still does not exist

@saule1508 commented on GitHub (Aug 11, 2025): it is called netbird deregister now. Unfortunately the logout functionality still does not exist
Author
Owner

@lixmal commented on GitHub (Aug 12, 2025):

What do you mean does not exist? What's missing?

@lixmal commented on GitHub (Aug 12, 2025): What do you mean does not exist? What's missing?
Author
Owner

@saule1508 commented on GitHub (Aug 12, 2025):

Sorry was not clear, and to be honest not totally clear for me ! From an end-user point of view it does indeed the trick, if they deregister and then do up again they start fresh with a new session that will be valid for 24 hours. But from an infra point of view, isn't that going to have a negative impact if all the users continuously deregister and register again ? Or can I safely advise the users to do that ?

In fact there is another issue that probably better describe my use case : https://github.com/netbirdio/netbird/issues/4209

So it is really avoiding to start working on something and be kicked out because the SSO login has expired

@saule1508 commented on GitHub (Aug 12, 2025): Sorry was not clear, and to be honest not totally clear for me ! From an end-user point of view it does indeed the trick, if they deregister and then do up again they start fresh with a new session that will be valid for 24 hours. But from an infra point of view, isn't that going to have a negative impact if all the users continuously deregister and register again ? Or can I safely advise the users to do that ? In fact there is another issue that probably better describe my use case : https://github.com/netbirdio/netbird/issues/4209 So it is really avoiding to start working on something and be kicked out because the SSO login has expired
Author
Owner

@nazarewk commented on GitHub (Aug 12, 2025):

Closing as completed by https://github.com/netbirdio/netbird/pull/4268 as the original use case seems to be supported by this.

@nazarewk commented on GitHub (Aug 12, 2025): Closing as completed by https://github.com/netbirdio/netbird/pull/4268 as the original use case seems to be supported by this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#787