You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Enhance CLI and Profiles documentation with environment variable examples and details on disabling profiles feature
* Remove deprecated environment variable examples and notes related to the profiles feature in CLI documentation
* Enhance CLI and Profiles documentation with additional environment variable examples and details on disabling update settings functionality
* Update cli.mdx
---------
Co-authored-by: Maycon Santos <[email protected]>
Copy file name to clipboardExpand all lines: src/pages/how-to/cli.mdx
+60Lines changed: 60 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,21 @@ netbird up
47
47
```
48
48
The `up` command would process the variables, read the configuration file on `/opt/netbird/config.json` and attempt to connect to the management service running at `https://api.self-hosted.com:33073`.
49
49
50
+
Here are some additional examples of environment variables:
51
+
```shell
52
+
# Disable profiles feature
53
+
export NB_DISABLE_PROFILES=true
54
+
55
+
# Disable update settings functionality
56
+
export NB_DISABLE_UPDATE_SETTINGS=true
57
+
58
+
# Set custom log level
59
+
export NB_LOG_LEVEL=debug
60
+
61
+
# Set custom daemon address
62
+
export NB_DAEMON_ADDR="tcp://localhost:8080"
63
+
```
64
+
50
65
## Commands
51
66
### up
52
67
Single command to log in and start the NetBird client. It can send a signal to the daemon service or run in the foreground with the flag `--foreground-mode`.
@@ -432,6 +447,19 @@ You can set a custom configuration path with the flag `--config`
432
447
sudo netbird service install --config /opt/netbird/config.json
433
448
```
434
449
450
+
#### Service-specific flags
451
+
```shell
452
+
--disable-profiles Disables profiles feature. If enabled, the client will not be able to change or edit any profile. To persist this setting, use: netbird service install --disable-profiles
453
+
--disable-update-settings Disables update settings feature. If enabled, the client will not be able to change or edit any settings. To persist this setting, use: netbird service install --disable-update-settings
454
+
455
+
```
456
+
457
+
<Note>
458
+
The `--disable-profiles` flag can also be set using the `NB_DISABLE_PROFILES` environment variable. Set it to any value (e.g., `true`, `1`, `yes`) to enable this feature.
459
+
460
+
The `--disable-update-settings` flag can also be set using the `NB_DISABLE_UPDATE_SETTINGS` environment variable. Set it to any value (e.g., `true`, `1`, `yes`) to enable this feature.
461
+
</Note>
462
+
435
463
### service uninstall
436
464
The uninstall uninstalls the daemon service from the system.
437
465
#### Usage
@@ -448,6 +476,10 @@ The minimal form of running the command is:
448
476
sudo netbird service start
449
477
```
450
478
479
+
<Note>
480
+
If you installed the service with `--disable-profiles` or `--disable-update-settings`, these settings will persist and the respective features will remain disabled when the service starts.
481
+
</Note>
482
+
451
483
### service stop
452
484
Stops the daemon service
453
485
#### Usage
@@ -456,6 +488,34 @@ The minimal form of running the command is:
456
488
sudo netbird service stop
457
489
```
458
490
491
+
### service restart
492
+
Restarts the daemon service
493
+
#### Usage
494
+
The minimal form of running the command is:
495
+
```shell
496
+
sudo netbird service restart
497
+
```
498
+
499
+
### service status
500
+
Shows the status of the daemon service
501
+
#### Usage
502
+
The minimal form of running the command is:
503
+
```shell
504
+
sudo netbird service status
505
+
```
506
+
507
+
### service reconfigure
508
+
Reconfigures the daemon service with current settings
509
+
#### Usage
510
+
The minimal form of running the command is:
511
+
```shell
512
+
sudo netbird service reconfigure
513
+
```
514
+
515
+
<Note>
516
+
If you installed the service with `--disable-profiles` or `--disable-update-settings`, these settings will persist and the respective features will remain disabled after reconfiguration.
517
+
</Note>
518
+
459
519
### debug
460
520
The `debug`command provides tools for diagnosing and understanding the internal operations of the NetBird daemon.
Copy file name to clipboardExpand all lines: src/pages/how-to/profiles.mdx
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,38 @@ If you're upgrading from NetBird below version `0.52.0` that did not support pro
77
77
copied to a new profile named `default`.
78
78
* The `default` profile is set as active, and you can start using it immediately.
79
79
80
+
## Disabling Profiles Feature
81
+
82
+
In some environments, you may want to disable the profiles feature entirely. This can be useful for:
83
+
84
+
***Managed environments** where users should not be able to switch between different NetBird accounts
85
+
***Security policies** that require a single, fixed configuration
86
+
***Automated deployments** where profile switching could interfere with operations
87
+
88
+
To disable the profiles feature, you can use the `--disable-profiles` flag when installing the service:
89
+
90
+
```shell
91
+
sudo netbird service install --disable-profiles
92
+
```
93
+
94
+
Alternatively, you can set the `NB_DISABLE_PROFILES` environment variable:
95
+
96
+
```shell
97
+
export NB_DISABLE_PROFILES=true
98
+
sudo netbird service install
99
+
```
100
+
101
+
When profiles are disabled:
102
+
* Users cannot create, switch, or remove profiles
103
+
* The profile management UI is disabled
104
+
* All profile-related CLI commands are disabled
105
+
* The client operates with a single, fixed configuration
106
+
* Profile switching is completely prevented
107
+
108
+
<Note>
109
+
You can also disable update settings functionality using the `--disable-update-settings` flag or `NB_DISABLE_UPDATE_SETTINGS` environment variable. This prevents users from modifying any configuration settings, providing an additional layer of control in managed environments.
0 commit comments