[PR #2401] [WIP] profile switching (multiple networks) #17213

Open
opened 2026-08-05 04:07:04 -04:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/2401

State: closed
Merged: No


Describe your changes

This issue attempts to support switching between multiple management servers and/or users ("networks") as described in #446.

I have thought of 3 approaches to implement this:

  1. Rewrite the config and daemon in large parts to support this
  2. Somehow store the currently used config both in the daemon and client persistently (config for config path, anyone?)
  3. Have multiple configs and symlink to /etc/netbird/config.json and restart the daemon after changing configs

For obvious reasons, I decided on approach 3. I'm still currently facing an issue where the service doesn't start on macOS unless I reinstall it, but otherwise this works. A GUI integration is planned, but I won't be writing support for Android / iOS anytime soon.

The usage looks like this:

netbird profiles # list profiles
netbird profile # show current profile
netbird profile <name> # switch to profile <name> (/etc/netbird/profiles/<name>.json)

#2233
#446 (in parts)

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/2401 **State:** closed **Merged:** No --- ## Describe your changes This issue attempts to support switching between multiple management servers and/or users ("networks") as described in #446. I have thought of 3 approaches to implement this: 1. Rewrite the config and daemon in large parts to support this 2. Somehow store the currently used config both in the daemon and client *persistently* (config for config path, anyone?) 3. Have multiple configs and symlink to /etc/netbird/config.json and restart the daemon after changing configs For obvious reasons, I decided on approach 3. I'm still currently facing an issue where the service doesn't start on macOS unless I reinstall it, but otherwise this works. A GUI integration is planned, but I won't be writing support for Android / iOS anytime soon. The usage looks like this: ```sh netbird profiles # list profiles netbird profile # show current profile netbird profile <name> # switch to profile <name> (/etc/netbird/profiles/<name>.json) ``` ## Issue ticket number and link #2233 #446 (in parts) ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
saavagebueno added the pull-request label 2026-08-05 04:07:04 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#17213