Add docs for profile ownership and IPC authz

This commit is contained in:
Theodor S. Midtlien
2026-09-25 16:18:52 +02:00
parent 0d44d0b7ba
commit e56f8ae3c0
8 changed files with 273 additions and 95 deletions
+15 -8
View File
@@ -56,13 +56,17 @@ Each profile has two parts:
The `default` profile is special: its ID is always `default`. You can rename its display label,
but it keeps that reserved ID and cannot be removed.
The default profile is stored as `default.json` in NetBird's state directory. Additional service profiles are stored under a per-user subdirectory as `<id>.json`:
The default profile is stored as `default.json` in NetBird's state directory. New profiles are stored in the `profiles.v1` subdirectory as `<id>.json`:
| OS | Default state directory | Additional profile example |
| --- | --- | --- |
| Linux and macOS | `/var/lib/netbird/` | `/var/lib/netbird/<username>/<id>.json` |
| FreeBSD | `/var/db/netbird/` | `/var/db/netbird/<username>/<id>.json` |
| Windows | `%ProgramData%\Netbird\` | `%ProgramData%\Netbird\<username>\<id>.json` |
| Linux and macOS | `/var/lib/netbird/` | `/var/lib/netbird/profiles.v1/<id>.json` |
| FreeBSD | `/var/db/netbird/` | `/var/db/netbird/profiles.v1/<id>.json` |
| Windows | `%ProgramData%\Netbird\` | `%ProgramData%\Netbird\profiles.v1\<id>.json` |
Profiles from earlier versions stay in their per-user subdirectory, for example `/var/lib/netbird/<username>/<id>.json`.
Each profile has an owner, and only the owner can use it. See [Profile ownership and daemon access](/client/profile-ownership).
`NB_STATE_DIR` overrides the default state directory. Treat profile files as credentials: stop the service before manual maintenance, restrict access, and prefer the GUI or CLI for normal profile management.
@@ -124,7 +128,7 @@ When profiles are disabled:
With the CLI, you can manage profiles easily. The main command is:
```bash
netbird profile <add|list|select|rename|remove> [name|handle]
netbird profile <add|list|select|rename|remove|claim> [name|handle]
````
<Note>
@@ -210,12 +214,12 @@ For example, running this command might output:
```text
NAME ACTIVE
work ✓
work *
default
home
```
A **✓** in the `ACTIVE` column marks the active profile; inactive profiles are left blank.
The list shows only the profiles that you own. A `*` in the `ACTIVE` column marks the active profile; inactive profiles are left blank.
To also show each profile's short ID, add the `--show-id` flag:
@@ -225,7 +229,7 @@ netbird profile list --show-id
```text
ID NAME ACTIVE
a1b2c3d4 work ✓
a1b2c3d4 work *
default default
e5f6a7b8 home
```
@@ -233,6 +237,9 @@ e5f6a7b8 home
This is useful when several profiles share the same name. The ID column lets you tell them
apart and select or remove the right one by its ID prefix.
To show the owner of each profile, add `--show-owner`. To claim a profile for a user, see
[Claim a profile](/client/profile-ownership#claim-a-profile).
### Select (Switch) a Profile
To switch to a specific profile, use: