Feature: switching between multiple profiles (one being active) #1595

Closed
opened 2025-11-20 05:33:26 -05:00 by saavagebueno · 16 comments
Owner

Originally created by @mlsmaycon on GitHub (Feb 3, 2025).

See https://github.com/netbirdio/netbird/issues/446 for supporting multiple networks/accounts simultaneously


Current Default Configuration:

  • We’ve been planning to move the configuration to a user path, which will allow us to move to a more secure structure, especially for shared user computers. With this, we see the following paths for profiles: Default and setup-key activated keys: /etc/netbird/profiles/default.json
    User profiles: /home/user/.config/netbird/profiles.

Creating a New Profile with CLI:

  • Running netbird profiles new <profile_name> will create a memory placeholder for the new profile. This will allow us to define the place to store the configuration depending on the user input when login in.

  • After running netbird up, the profile file is created. If the users used a setup key, the file is saved in the /etc/netbird/profiles directory, otherwise it will be saved in the user's directory.

Creating a New Profile with GUI:

  • We can create the profile and leave it in memory, or, as GUI activation is usually user-bound, we can create the profile on disk already since we know the user.

Storing selected profile
Storing Profile State:

  • The most recently selected profile should be stored in a state file located at /var/lib/netbird or another designated user profile state path (to be determined). So, on system boot or daemon restart, we have the last profile.

Switching Profiles and Side Effects
Profile Switching Commands:

  • netbird profiles select <profile_name> - Selects the specified profile.

  • netbird up --profile <profile_name> - Brings up the VPN with the selected profile.

  • netbird login --profile <profile_name> - Logs in using the selected profile.

Side Effect:

  • Switching profiles will disconnect the current running process.
  • Switching profile will immediately start the connection with the other profile unless a --skip-concect flag is passed

Behavior on netbird Commands
On netbird down:

  • The CLI should display the current profile when the netbird down command is executed.

On netbird up:

  • The CLI should display the current profile when the netbird up command is executed.

On netbird service restart:

  • The last selected profile should be reloaded from the state stored in /var/lib/netbird or the user profile state path (to be determined).

Compatibility with Existing Installations
Handling Existing Installs:

The current profile will be copied into /etc/netbird/profiles/default.json.

Graphical User Interface (GUI) changes
Profile Display:

  • The GUI will show the current profile between the “Connected” and “Connect” options.
    Display order:
    Connected
    =====================
    FancyProfile > Add profile
    =====================
    Connect FancyProfile > Select
    Disconnect Delete → warning box

Profile Management:

  • A submenu will list all profiles with options to create new profiles. Each profile will have options to select or delete it.

  • The GUI settings menu will switch to the selected profile settings.

Profile Loading on Restart:

  • Upon restarting, the application will load the current profile from the stored state using the daemon.
Originally created by @mlsmaycon on GitHub (Feb 3, 2025). See https://github.com/netbirdio/netbird/issues/446 for supporting multiple networks/accounts simultaneously --- Current Default Configuration: - We’ve been planning to move the configuration to a user path, which will allow us to move to a more secure structure, especially for shared user computers. With this, we see the following paths for profiles: Default and setup-key activated keys: /etc/netbird/profiles/default.json User profiles: /home/user/.config/netbird/profiles. Creating a New Profile with CLI: - Running netbird profiles new <profile_name> will create a memory placeholder for the new profile. This will allow us to define the place to store the configuration depending on the user input when login in. - After running netbird up, the profile file is created. If the users used a setup key, the file is saved in the /etc/netbird/profiles directory, otherwise it will be saved in the user's directory. Creating a New Profile with GUI: - We can create the profile and leave it in memory, or, as GUI activation is usually user-bound, we can create the profile on disk already since we know the user. Storing selected profile Storing Profile State: - The most recently selected profile should be stored in a state file located at /var/lib/netbird or another designated user profile state path (to be determined). So, on system boot or daemon restart, we have the last profile. Switching Profiles and Side Effects Profile Switching Commands: - netbird profiles select <profile_name> - Selects the specified profile. - netbird up --profile <profile_name> - Brings up the VPN with the selected profile. - netbird login --profile <profile_name> - Logs in using the selected profile. Side Effect: - Switching profiles will disconnect the current running process. - Switching profile will immediately start the connection with the other profile unless a `--skip-concect` flag is passed Behavior on netbird Commands On netbird down: - The CLI should display the current profile when the netbird down command is executed. On netbird up: - The CLI should display the current profile when the netbird up command is executed. On netbird service restart: - The last selected profile should be reloaded from the state stored in /var/lib/netbird or the user profile state path (to be determined). Compatibility with Existing Installations Handling Existing Installs: The current profile will be copied into /etc/netbird/profiles/default.json. Graphical User Interface (GUI) changes Profile Display: - The GUI will show the current profile between the “Connected” and “Connect” options. Display order: Connected ===================== FancyProfile > Add profile ===================== Connect FancyProfile > Select Disconnect Delete → warning box Profile Management: - A submenu will list all profiles with options to create new profiles. Each profile will have options to select or delete it. - The GUI settings menu will switch to the selected profile settings. Profile Loading on Restart: - Upon restarting, the application will load the current profile from the stored state using the daemon.
saavagebueno added the enhancementfeature-request labels 2025-11-20 05:33:26 -05:00
Author
Owner

@1nerdyguy commented on GitHub (Feb 3, 2025):

I'd like to see this, but would have a few requests/concerns:

Would there be a way to set a 'default' profile prior to user login? Basically, we love to use netbird to provide line of sight to a DC for offsite machines.

Could the Netbird service disconnect from the user session when a user logs out, and connect back to this 'default'?

@1nerdyguy commented on GitHub (Feb 3, 2025): I'd like to see this, but would have a few requests/concerns: Would there be a way to set a 'default' profile prior to user login? Basically, we love to use netbird to provide line of sight to a DC for offsite machines. Could the Netbird service disconnect from the user session when a user logs out, and connect back to this 'default'?
Author
Owner

@Oriann commented on GitHub (Feb 21, 2025):

Could the Netbird service disconnect from the user session when a user logs out, and connect back to this 'default'?

This would be a handy feature because selecting things takes time...

Also abou whole concept of this thing I think its OK, disconnecting when switching profiles is natural for me because I think the concept is not built on handling 2 different networks.

Looking forward to test this out.

@Oriann commented on GitHub (Feb 21, 2025): > Could the Netbird service disconnect from the user session when a user logs out, and connect back to this 'default'? This would be a handy feature because selecting things takes time... Also abou whole concept of this thing I think its OK, disconnecting when switching profiles is natural for me because I think the concept is not built on handling 2 different networks. Looking forward to test this out.
Author
Owner

@arnehude commented on GitHub (Mar 11, 2025):

This feature would be awesome! Hope to see it soon!

Regarding the profiles, i'd love to have another button to directly jump to the file explorer.
Also an import/export function would be great.

@arnehude commented on GitHub (Mar 11, 2025): This feature would be awesome! Hope to see it soon! Regarding the profiles, i'd love to have another button to directly jump to the file explorer. Also an import/export function would be great.
Author
Owner

@StefanEger commented on GitHub (Mar 19, 2025):

Is there a timeline for this? this feature would be extremely helpful.

@StefanEger commented on GitHub (Mar 19, 2025): Is there a timeline for this? this feature would be extremely helpful.
Author
Owner

@easyjoh commented on GitHub (Apr 19, 2025):

I would propose that it should be possible to be connected to multiple networks at the same time. E.g. a private/personal network and a work network.

Also there could be peer-servers which should be accessable from multiple networks.

@easyjoh commented on GitHub (Apr 19, 2025): I would propose that it should be possible to be connected to multiple networks at the same time. E.g. a private/personal network and a work network. Also there could be peer-servers which should be accessable from multiple networks.
Author
Owner

@1nerdyguy commented on GitHub (Apr 19, 2025):

@easyjoh

How do you propose we handle conflicts, if allowing multiple networks to be connected at once?

If Network A is allowed access to Resource 1, but Network B disallows access to Resource 1, which wins?

I'd prefer to have both a 'fallback' network, such as something that allows access to an extremely limited resource pool, and then have it connect to a network based on user login with credentials. This also follows SASE principles of identification and authorization to access resources.

@1nerdyguy commented on GitHub (Apr 19, 2025): @easyjoh How do you propose we handle conflicts, if allowing multiple networks to be connected at once? If Network A is allowed access to Resource 1, but Network B disallows access to Resource 1, which wins? I'd prefer to have both a 'fallback' network, such as something that allows access to an extremely limited resource pool, and then have it connect to a network based on user login with credentials. This also follows SASE principles of identification and authorization to access resources.
Author
Owner

@nazarewk commented on GitHub (May 6, 2025):

I would propose that it should be possible to be connected to multiple networks at the same time. E.g. a private/personal network and a work network.

see https://github.com/netbirdio/netbird/issues/446

@nazarewk commented on GitHub (May 6, 2025): > I would propose that it should be possible to be connected to multiple networks at the same time. E.g. a private/personal network and a work network. see https://github.com/netbirdio/netbird/issues/446
Author
Owner

@zerobearing2 commented on GitHub (May 20, 2025):

Would love to see this happen soon! It's blocking me from using for multiple work related networks right now.

👍 upvote

@zerobearing2 commented on GitHub (May 20, 2025): Would love to see this happen soon! It's blocking me from using for multiple work related networks right now. 👍 upvote
Author
Owner

@saguarobrian commented on GitHub (May 20, 2025):

Love to see this as your competitors have this

@saguarobrian commented on GitHub (May 20, 2025): Love to see this as your competitors have this
Author
Owner

@rickiewars commented on GitHub (May 22, 2025):

Would be amazing to have a list of configuration files to switch between.
e.g. a config option which has the list of your configs.
When you click one config, and you then click on (disconnect and) connect, the server configured in that config file will be connected to.
It doesn't even need to be a simultanious connection to multiple servers, one at a time is indeed plenty in most cases.

@rickiewars commented on GitHub (May 22, 2025): Would be amazing to have a list of configuration files to switch between. e.g. a `config` option which has the list of your configs. When you click one config, and you then click on (`disconnect` and) `connect`, the server configured in that config file will be connected to. It doesn't even need to be a simultanious connection to multiple servers, one at a time is indeed plenty in most cases.
Author
Owner

@netandreus commented on GitHub (Jun 27, 2025):

Looking forward to this.

@netandreus commented on GitHub (Jun 27, 2025): Looking forward to this.
Author
Owner

@rearden888 commented on GitHub (Jul 15, 2025):

Definitely another vote for this. I am in the situation of having two netbird networks, one for work and one for home. I would suggest tabling the "two networks connected simultaneously" issue, that seems like a second level feature. Simply being able to create separate profiles and have a well-established mechanism to switch between them would be very welcome.

@rearden888 commented on GitHub (Jul 15, 2025): Definitely another vote for this. I am in the situation of having two netbird networks, one for work and one for home. I would suggest tabling the "two networks connected simultaneously" issue, that seems like a second level feature. Simply being able to create separate profiles and have a well-established mechanism to switch between them would be very welcome.
Author
Owner

@saguarobrian commented on GitHub (Jul 15, 2025):

ZeroTier has a menu option and can be connected to multiple networks at the same time and enable or disable the connections.

@saguarobrian commented on GitHub (Jul 15, 2025): ZeroTier has a menu option and can be connected to multiple networks at the same time and enable or disable the connections.
Author
Owner

@sh00t3r commented on GitHub (Jul 15, 2025):

Also waiting for this would be very useful!

@sh00t3r commented on GitHub (Jul 15, 2025): Also waiting for this would be very useful!
Author
Owner

@mlsmaycon commented on GitHub (Jul 15, 2025):

Hey folks, you can track the progress here: https://github.com/netbirdio/netbird/pull/3980, some of the binaries are also available in the release workflows if you want to try it before. But be aware that a few things will change with this release, like config file location.

@mlsmaycon commented on GitHub (Jul 15, 2025): Hey folks, you can track the progress here: https://github.com/netbirdio/netbird/pull/3980, some of the binaries are also available in the release workflows if you want to try it before. But be aware that a few things will change with this release, like config file location.
Author
Owner

@nazarewk commented on GitHub (Jul 30, 2025):

We have released v0.52.0, which introduced this feature. This is an MVP that we plan to quickly build upon with user experience improvements.

I am closing this feature request. Please report any problems you encounter and feedback you might have in separate follow-up issues. Linking back to this feature request would help with quicker identification and addressing of those.

@nazarewk commented on GitHub (Jul 30, 2025): We have released `v0.52.0`, which introduced this feature. This is an MVP that we plan to quickly build upon with user experience improvements. I am closing this feature request. Please report any problems you encounter and feedback you might have in separate follow-up issues. Linking back to this feature request would help with quicker identification and addressing of those.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1595