Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions src/pages/how-to/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.

Expand Down
32 changes: 32 additions & 0 deletions src/pages/how-to/profiles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down