Skip to content

Commit e26716f

Browse files
authored
fix(profile): config path (#397)
* fix(profile): config path (#397)
1 parent 8941c2a commit e26716f

File tree

8 files changed

+16
-19
lines changed

8 files changed

+16
-19
lines changed

src/pages/how-to/cli.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Below is the list of global flags:
2525
```shell
2626
--admin-url string Admin Panel URL [http|https]://[host]:[port] (default "https://app.netbird.io")
2727
-A, --anonymize anonymize IP addresses and non-netbird.io domains in logs and status output
28-
-c, --config string Netbird config file location (default "/etc/netbird/config.json")
2928
--daemon-addr string Daemon service address to serve CLI requests [unix|tcp]://[path|host:port] (default "unix:///var/run/netbird.sock")
3029
--log-file string sets NetBird log path. If console is specified the the log will be output to stdout (default "/var/log/netbird/client.log")
3130
-l, --log-level string sets NetBird log level (default "info")

src/pages/how-to/examples.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The setup key could be found in the NetBird Management dashboard under the Setup
107107
Set the ```NB_SETUP_KEY``` environment variable and run the command.
108108

109109
```bash
110-
docker run --rm --name PEER_NAME --hostname PEER_NAME --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --cap-add=SYS_RESOURCE -d -e NB_SETUP_KEY=<SETUP KEY> -v netbird-client:/etc/netbird netbirdio/netbird:latest
110+
docker run --rm --name PEER_NAME --hostname PEER_NAME --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --cap-add=SYS_RESOURCE -d -e NB_SETUP_KEY=<SETUP KEY> -v netbird-client:/var/lib/netbird netbirdio/netbird:latest
111111
```
112112

113113
That is it! Enjoy using NetBird.

src/pages/how-to/installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For all systems:
5555

5656
For **Docker**, you can run with the following command:
5757
```bash
58-
docker run --network host --privileged --rm -d -e NB_SETUP_KEY=<SETUP KEY> -v netbird-client:/etc/netbird netbirdio/netbird:<TAG>
58+
docker run --network host --privileged --rm -d -e NB_SETUP_KEY=<SETUP KEY> -v netbird-client:/var/lib/netbird netbirdio/netbird:<TAG>
5959
```
6060
> TAG > 0.6.0 version
6161

src/pages/how-to/installation/docker.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ NetBird makes use of eBPF and raw sockets, therefore to guarantee the client sof
1616
The experience may vary depending on the docker daemon, operating system, or kernel version.
1717

1818
```bash
19-
docker run --rm --name PEER_NAME --hostname PEER_NAME --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --cap-add=SYS_RESOURCE -d -e NB_SETUP_KEY=<SETUP KEY> -v netbird-client:/etc/netbird netbirdio/netbird:latest
19+
docker run --rm --name PEER_NAME --hostname PEER_NAME --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --cap-add=SYS_RESOURCE -d -e NB_SETUP_KEY=<SETUP KEY> -v netbird-client:/var/lib/netbird netbirdio/netbird:latest
2020
```
2121

2222
See [Docker example](/how-to/examples#net-bird-client-in-docker) for details.
@@ -50,7 +50,7 @@ services:
5050
environment:
5151
- NB_SETUP_KEY=<SETUP KEY>
5252
volumes:
53-
- netbird-client:/etc/netbird
53+
- netbird-client:/var/lib/netbird
5454
image: netbirdio/netbird:latest
5555
volumes:
5656
netbird-client:
@@ -64,7 +64,7 @@ In case you are activating a server peer, you can use a [setup key](/how-to/regi
6464
1. Login to the Management Service. You need to have a `setup key` in hand (see [setup keys](/how-to/register-machines-using-setup-keys)).
6565

6666
```bash
67-
docker run --network host --privileged --rm -d -e NB_SETUP_KEY=<SETUP KEY> -v netbird-client:/etc/netbird netbirdio/netbird:<TAG>
67+
docker run --network host --privileged --rm -d -e NB_SETUP_KEY=<SETUP KEY> -v netbird-client:/var/lib/netbird netbirdio/netbird:<TAG>
6868
```
6969
> TAG > 0.6.0 version
7070

src/pages/how-to/installation/synology.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,11 @@ netbird service uninstall
104104
```
105105
3. Remove NetBird binary and configuration files.
106106

107-
/etc/netbird: This directory contains the NetBird configuration files.
108107
/usr/local/bin/netbird: The installation script placed the NetBird binary here.
109-
/var/lib/netbird: This directory contains data related to the NetBird service.
108+
/var/lib/netbird: This directory contains the NetBird configuration files.
110109

111110
You can use the rm command to delete these files and directories:
112111
```bash
113-
rm -rf /etc/netbird
114112
rm /usr/local/bin/netbird
115113
rm -rf /var/lib/netbird
116114
```

src/pages/how-to/netbird-on-faas.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ netbird up -F
3232
Some container environments can be restricted as well. For example, Docker containers are not allowed to create new VPN interfaces by default. For that reason, you can run a NetBird agent in a standard mode to enable the netstack mode:
3333
```bash
3434
docker run --rm --name PEER_NAME --hostname PEER_NAME -d \
35-
-e NB_SETUP_KEY=<SETUP KEY> -e NB_USE_NETSTACK_MODE=true -e NB_SOCKS5_LISTENER_PORT=1080 -v netbird-client:/etc/netbird netbirdio/netbird:latest
35+
-e NB_SETUP_KEY=<SETUP KEY> -e NB_USE_NETSTACK_MODE=true -e NB_SOCKS5_LISTENER_PORT=1080 -v netbird-client:/var/lib/netbird netbirdio/netbird:latest
3636
```
3737
This is useful when you want to configure a simple routing peer without adding privileged permissions or linux capabilities.
3838

src/pages/how-to/profiles.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ Think of it as a separate "NetBird account" on your machine:
5252

5353
Profiles live in your system or user config folders:
5454

55-
| OS | System-wide path | User path |
56-
| ------ | --------------------------------- | ----------------------------------------------------- |
57-
| Linux | `/var/lib/netbird/profiles/...` | `~/.config/netbird/<profile>.json` |
58-
| macOS | `/Library/Application Support/...`| `~/Library/Application Support/NetBird/<profile>.json`|
59-
| Windows| `%ProgramData%\Netbird\profiles\` | `%APPDATA%\Netbird\<profile>.json` |
55+
| OS | Config path |
56+
| ------ | --------------------------------- |
57+
| Linux | `/var/lib/netbird/...` |
58+
| macOS | `/var/lib/netbird...`|
59+
| Windows| `%ProgramData%\Netbird\profiles\` |
6060

6161
---
6262

src/pages/how-to/troubleshooting-client.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ You can set the environment variable `NB_LOG_LEVEL` to `debug` to enable debug l
236236

237237
```shell
238238
docker run --rm --name PEER_NAME --hostname PEER_NAME --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --cap-add=SYS_RESOURCE -d \
239-
-e NB_SETUP_KEY=<SETUP KEY> -e NB_LOG_LEVEL=debug -v netbird-client:/etc/netbird netbirdio/netbird:latest
239+
-e NB_SETUP_KEY=<SETUP KEY> -e NB_LOG_LEVEL=debug -v netbird-client:/var/lib/netbird netbirdio/netbird:latest
240240
```
241241

242242
### On Android
@@ -328,8 +328,8 @@ sudo bash -c 'PIONS_LOG_DEBUG=all NB_LOG_LEVEL=debug netbird up -F' > /tmp/netbi
328328
A single machine can only connect to one NetBird account as the same user/login method throughout the lifetime of
329329
the `config.json` file:
330330

331-
- `/etc/netbird/config.json` for Linux/MacOS
332-
- `C:\ProgramData\netbird\config.json` for Windows
331+
- `/var/lib/netbird/default.json` for Linux/MacOS
332+
- `C:\ProgramData\netbird\default.json` for Windows
333333

334334
You might get errors like below when trying to use Setup Key/different SSO user account during login:
335335

@@ -358,7 +358,7 @@ If you know the exact previous Peer which was logged in, you can just delete it
358358
Otherwise, to resolve the issue, you will need to remove the file manually to use the machine as a different user/Setup Key while the NetBird client daemon is stopped:
359359

360360
1. `netbird service stop`
361-
2. `sudo rm /etc/netbird/config.json` (*nix) or `rm C:\ProgramData\netbird\config.json` (Windows)
361+
2. `sudo rm /var/lib/netbird/default.json` (*nix) or `rm C:\ProgramData\netbird\config.json` (Windows)
362362
3. `netbird service start`
363363

364364
## Debugging access to network resources

0 commit comments

Comments
 (0)