mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-16 15:36:36 +00:00
add disable profiles docs (#410)
* 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 <mlsmaycon@gmail.com>
This commit is contained in:
@@ -47,6 +47,21 @@ netbird up
|
||||
```
|
||||
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`.
|
||||
|
||||
Here are some additional examples of environment variables:
|
||||
```shell
|
||||
# Disable profiles feature
|
||||
export NB_DISABLE_PROFILES=true
|
||||
|
||||
# Disable update settings functionality
|
||||
export NB_DISABLE_UPDATE_SETTINGS=true
|
||||
|
||||
# Set custom log level
|
||||
export NB_LOG_LEVEL=debug
|
||||
|
||||
# Set custom daemon address
|
||||
export NB_DAEMON_ADDR="tcp://localhost:8080"
|
||||
```
|
||||
|
||||
## Commands
|
||||
### up
|
||||
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`
|
||||
sudo netbird service install --config /opt/netbird/config.json
|
||||
```
|
||||
|
||||
#### Service-specific flags
|
||||
```shell
|
||||
--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
|
||||
--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
|
||||
|
||||
```
|
||||
|
||||
<Note>
|
||||
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.
|
||||
|
||||
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.
|
||||
</Note>
|
||||
|
||||
### service uninstall
|
||||
The uninstall uninstalls the daemon service from the system.
|
||||
#### Usage
|
||||
@@ -448,6 +476,10 @@ The minimal form of running the command is:
|
||||
sudo netbird service start
|
||||
```
|
||||
|
||||
<Note>
|
||||
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.
|
||||
</Note>
|
||||
|
||||
### service stop
|
||||
Stops the daemon service
|
||||
#### Usage
|
||||
@@ -456,6 +488,34 @@ The minimal form of running the command is:
|
||||
sudo netbird service stop
|
||||
```
|
||||
|
||||
### service restart
|
||||
Restarts the daemon service
|
||||
#### Usage
|
||||
The minimal form of running the command is:
|
||||
```shell
|
||||
sudo netbird service restart
|
||||
```
|
||||
|
||||
### service status
|
||||
Shows the status of the daemon service
|
||||
#### Usage
|
||||
The minimal form of running the command is:
|
||||
```shell
|
||||
sudo netbird service status
|
||||
```
|
||||
|
||||
### service reconfigure
|
||||
Reconfigures the daemon service with current settings
|
||||
#### Usage
|
||||
The minimal form of running the command is:
|
||||
```shell
|
||||
sudo netbird service reconfigure
|
||||
```
|
||||
|
||||
<Note>
|
||||
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.
|
||||
</Note>
|
||||
|
||||
### debug
|
||||
The `debug` command provides tools for diagnosing and understanding the internal operations of the NetBird daemon.
|
||||
|
||||
|
||||
@@ -77,6 +77,38 @@ If you're upgrading from NetBird below version `0.52.0` that did not support pro
|
||||
copied to a new profile named `default`.
|
||||
* The `default` profile is set as active, and you can start using it immediately.
|
||||
|
||||
## Disabling Profiles Feature
|
||||
|
||||
In some environments, you may want to disable the profiles feature entirely. This can be useful for:
|
||||
|
||||
* **Managed environments** where users should not be able to switch between different NetBird accounts
|
||||
* **Security policies** that require a single, fixed configuration
|
||||
* **Automated deployments** where profile switching could interfere with operations
|
||||
|
||||
To disable the profiles feature, you can use the `--disable-profiles` flag when installing the service:
|
||||
|
||||
```shell
|
||||
sudo netbird service install --disable-profiles
|
||||
```
|
||||
|
||||
Alternatively, you can set the `NB_DISABLE_PROFILES` environment variable:
|
||||
|
||||
```shell
|
||||
export NB_DISABLE_PROFILES=true
|
||||
sudo netbird service install
|
||||
```
|
||||
|
||||
When profiles are disabled:
|
||||
* Users cannot create, switch, or remove profiles
|
||||
* The profile management UI is disabled
|
||||
* All profile-related CLI commands are disabled
|
||||
* The client operates with a single, fixed configuration
|
||||
* Profile switching is completely prevented
|
||||
|
||||
<Note>
|
||||
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.
|
||||
</Note>
|
||||
|
||||
---
|
||||
|
||||
## Profile CLI Commands
|
||||
|
||||
Reference in New Issue
Block a user