From 68c55895a7c6758b9d599040f16509949fe19a90 Mon Sep 17 00:00:00 2001 From: Hakan Sariman Date: Fri, 25 Jul 2025 14:59:39 +0300 Subject: [PATCH 1/4] Update profiles configuration paths in how-to guide --- src/pages/how-to/profiles.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/how-to/profiles.mdx b/src/pages/how-to/profiles.mdx index 69f8c90a..6753a179 100644 --- a/src/pages/how-to/profiles.mdx +++ b/src/pages/how-to/profiles.mdx @@ -52,11 +52,11 @@ Think of it as a separate "NetBird account" on your machine: Profiles live in your system or user config folders: -| OS | System-wide path | User path | -| ------ | --------------------------------- | ----------------------------------------------------- | -| Linux | `/var/lib/netbird/profiles/...` | `~/.config/netbird/.json` | -| macOS | `/Library/Application Support/...`| `~/Library/Application Support/NetBird/.json`| -| Windows| `%ProgramData%\Netbird\profiles\` | `%APPDATA%\Netbird\.json` | +| OS | Config path | +| ------ | --------------------------------- | +| Linux | `/var/lib/netbird/...` | +| macOS | `/var/lib/netbird...`| +| Windows| `%ProgramData%\Netbird\profiles\` | --- From 33faa07dc0818a42bb90c906f9ce31721673f9e1 Mon Sep 17 00:00:00 2001 From: Hakan Sariman Date: Fri, 25 Jul 2025 15:08:15 +0300 Subject: [PATCH 2/4] Update NetBird configuration paths in documentation to reflect changes from /etc/netbird to /var/lib/netbird --- src/pages/how-to/cli.mdx | 1 - src/pages/how-to/db-workload-migration.mdx | 2 +- src/pages/how-to/examples.mdx | 2 +- src/pages/how-to/installation.mdx | 2 +- src/pages/how-to/installation/docker.mdx | 6 +++--- src/pages/how-to/installation/synology.mdx | 4 ++-- src/pages/how-to/netbird-on-faas.mdx | 2 +- src/pages/how-to/setup-keys-add-servers-to-network.mdx | 2 +- src/pages/how-to/troubleshooting-client.mdx | 8 ++++---- 9 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/pages/how-to/cli.mdx b/src/pages/how-to/cli.mdx index 7cdb8edc..1f49cd66 100644 --- a/src/pages/how-to/cli.mdx +++ b/src/pages/how-to/cli.mdx @@ -25,7 +25,6 @@ Below is the list of global flags: ```shell --admin-url string Admin Panel URL [http|https]://[host]:[port] (default "https://app.netbird.io") -A, --anonymize anonymize IP addresses and non-netbird.io domains in logs and status output - -c, --config string Netbird config file location (default "/etc/netbird/config.json") --daemon-addr string Daemon service address to serve CLI requests [unix|tcp]://[path|host:port] (default "unix:///var/run/netbird.sock") --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") -l, --log-level string sets NetBird log level (default "info") diff --git a/src/pages/how-to/db-workload-migration.mdx b/src/pages/how-to/db-workload-migration.mdx index c92db2b6..ff0d2f21 100644 --- a/src/pages/how-to/db-workload-migration.mdx +++ b/src/pages/how-to/db-workload-migration.mdx @@ -200,7 +200,7 @@ The output should be similar to: Memory: 15.9M (peak: 16.1M) CPU: 24ms CGroup: /system.slice/netbird.service - └─2865 /usr/bin/netbird service run --config /etc/netbird/config.j> + └─2865 /usr/bin/netbird service run> ``` To enable the service on startup, run: diff --git a/src/pages/how-to/examples.mdx b/src/pages/how-to/examples.mdx index 8f5eb95d..4cc5cce2 100644 --- a/src/pages/how-to/examples.mdx +++ b/src/pages/how-to/examples.mdx @@ -107,7 +107,7 @@ The setup key could be found in the NetBird Management dashboard under the Setup Set the ```NB_SETUP_KEY``` environment variable and run the command. ```bash -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= -v netbird-client:/etc/netbird netbirdio/netbird:latest +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= -v netbird-client:/var/lib/netbird netbirdio/netbird:latest ``` That is it! Enjoy using NetBird. diff --git a/src/pages/how-to/installation.mdx b/src/pages/how-to/installation.mdx index 7c0acdb9..448e162b 100644 --- a/src/pages/how-to/installation.mdx +++ b/src/pages/how-to/installation.mdx @@ -55,7 +55,7 @@ For all systems: For **Docker**, you can run with the following command: ```bash -docker run --network host --privileged --rm -d -e NB_SETUP_KEY= -v netbird-client:/etc/netbird netbirdio/netbird: +docker run --network host --privileged --rm -d -e NB_SETUP_KEY= -v netbird-client:/var/lib/netbird netbirdio/netbird: ``` > TAG > 0.6.0 version diff --git a/src/pages/how-to/installation/docker.mdx b/src/pages/how-to/installation/docker.mdx index 82d20a2b..ed3da985 100644 --- a/src/pages/how-to/installation/docker.mdx +++ b/src/pages/how-to/installation/docker.mdx @@ -16,7 +16,7 @@ NetBird makes use of eBPF and raw sockets, therefore to guarantee the client sof The experience may vary depending on the docker daemon, operating system, or kernel version. ```bash -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= -v netbird-client:/etc/netbird netbirdio/netbird:latest +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= -v netbird-client:/var/lib/netbird netbirdio/netbird:latest ``` See [Docker example](/how-to/examples#net-bird-client-in-docker) for details. @@ -50,7 +50,7 @@ services: environment: - NB_SETUP_KEY= volumes: - - netbird-client:/etc/netbird + - netbird-client:/var/lib/netbird image: netbirdio/netbird:latest volumes: netbird-client: @@ -64,7 +64,7 @@ In case you are activating a server peer, you can use a [setup key](/how-to/regi 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)). ```bash -docker run --network host --privileged --rm -d -e NB_SETUP_KEY= -v netbird-client:/etc/netbird netbirdio/netbird: +docker run --network host --privileged --rm -d -e NB_SETUP_KEY= -v netbird-client:/var/lib/netbird netbirdio/netbird: ``` > TAG > 0.6.0 version diff --git a/src/pages/how-to/installation/synology.mdx b/src/pages/how-to/installation/synology.mdx index 55c49613..f538add7 100644 --- a/src/pages/how-to/installation/synology.mdx +++ b/src/pages/how-to/installation/synology.mdx @@ -104,13 +104,13 @@ netbird service uninstall ``` 3. Remove NetBird binary and configuration files. -/etc/netbird: This directory contains the NetBird configuration files. +/var/lib/netbird: This directory contains the NetBird configuration files. /usr/local/bin/netbird: The installation script placed the NetBird binary here. /var/lib/netbird: This directory contains data related to the NetBird service. You can use the rm command to delete these files and directories: ```bash -rm -rf /etc/netbird +rm -rf /var/lib/netbird rm /usr/local/bin/netbird rm -rf /var/lib/netbird ``` diff --git a/src/pages/how-to/netbird-on-faas.mdx b/src/pages/how-to/netbird-on-faas.mdx index 74f320aa..37cffe13 100644 --- a/src/pages/how-to/netbird-on-faas.mdx +++ b/src/pages/how-to/netbird-on-faas.mdx @@ -32,7 +32,7 @@ netbird up -F 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: ```bash docker run --rm --name PEER_NAME --hostname PEER_NAME -d \ --e NB_SETUP_KEY= -e NB_USE_NETSTACK_MODE=true -e NB_SOCKS5_LISTENER_PORT=1080 -v netbird-client:/etc/netbird netbirdio/netbird:latest +-e NB_SETUP_KEY= -e NB_USE_NETSTACK_MODE=true -e NB_SOCKS5_LISTENER_PORT=1080 -v netbird-client:/var/lib/netbird netbirdio/netbird:latest ``` This is useful when you want to configure a simple routing peer without adding privileged permissions or linux capabilities. diff --git a/src/pages/how-to/setup-keys-add-servers-to-network.mdx b/src/pages/how-to/setup-keys-add-servers-to-network.mdx index 21096d98..73a1f89f 100644 --- a/src/pages/how-to/setup-keys-add-servers-to-network.mdx +++ b/src/pages/how-to/setup-keys-add-servers-to-network.mdx @@ -119,7 +119,7 @@ This should show the service as active and running. Memory: 26.3M CPU: 113ms CGroup: /system.slice/netbird.service - └─3819 /usr/bin/netbird service run --config /etc/netbird/config.json --log-level info --daemon-ad + └─3819 /usr/bin/netbird service run --log-level info --daemon-ad ``` Next, ensure NetBird starts automatically on boot: diff --git a/src/pages/how-to/troubleshooting-client.mdx b/src/pages/how-to/troubleshooting-client.mdx index d92304d9..7728fbaf 100644 --- a/src/pages/how-to/troubleshooting-client.mdx +++ b/src/pages/how-to/troubleshooting-client.mdx @@ -236,7 +236,7 @@ You can set the environment variable `NB_LOG_LEVEL` to `debug` to enable debug l ```shell 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= -e NB_LOG_LEVEL=debug -v netbird-client:/etc/netbird netbirdio/netbird:latest +-e NB_SETUP_KEY= -e NB_LOG_LEVEL=debug -v netbird-client:/var/lib/netbird netbirdio/netbird:latest ``` ### On Android @@ -328,8 +328,8 @@ sudo bash -c 'PIONS_LOG_DEBUG=all NB_LOG_LEVEL=debug netbird up -F' > /tmp/netbi A single machine can only connect to one NetBird account as the same user/login method throughout the lifetime of the `config.json` file: -- `/etc/netbird/config.json` for Linux/MacOS -- `C:\ProgramData\netbird\config.json` for Windows +- `/var/lib/netbird/default.json` for Linux/MacOS +- `C:\ProgramData\netbird\default.json` for Windows You might get errors like below when trying to use Setup Key/different SSO user account during login: @@ -358,7 +358,7 @@ If you know the exact previous Peer which was logged in, you can just delete it 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: 1. `netbird service stop` -2. `sudo rm /etc/netbird/config.json` (*nix) or `rm C:\ProgramData\netbird\config.json` (Windows) +2. `sudo rm /var/lib/netbird/default.json` (*nix) or `rm C:\ProgramData\netbird\config.json` (Windows) 3. `netbird service start` ## Debugging access to network resources From 9994669168ebabac18709744fc5e74fa88e7efc5 Mon Sep 17 00:00:00 2001 From: Hakan Sariman Date: Fri, 25 Jul 2025 15:23:05 +0300 Subject: [PATCH 3/4] fix dup --- src/pages/how-to/installation/synology.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/how-to/installation/synology.mdx b/src/pages/how-to/installation/synology.mdx index f538add7..79e3593b 100644 --- a/src/pages/how-to/installation/synology.mdx +++ b/src/pages/how-to/installation/synology.mdx @@ -104,13 +104,11 @@ netbird service uninstall ``` 3. Remove NetBird binary and configuration files. -/var/lib/netbird: This directory contains the NetBird configuration files. /usr/local/bin/netbird: The installation script placed the NetBird binary here. -/var/lib/netbird: This directory contains data related to the NetBird service. +/var/lib/netbird: This directory contains the NetBird configuration files. You can use the rm command to delete these files and directories: ```bash -rm -rf /var/lib/netbird rm /usr/local/bin/netbird rm -rf /var/lib/netbird ``` From a0330bf06736a4e737aa2ce46721a87dd953c7ef Mon Sep 17 00:00:00 2001 From: Hakan Sariman Date: Fri, 25 Jul 2025 15:27:53 +0300 Subject: [PATCH 4/4] Update NetBird service command examples to include configuration file paths --- src/pages/how-to/db-workload-migration.mdx | 2 +- src/pages/how-to/setup-keys-add-servers-to-network.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/how-to/db-workload-migration.mdx b/src/pages/how-to/db-workload-migration.mdx index ff0d2f21..c92db2b6 100644 --- a/src/pages/how-to/db-workload-migration.mdx +++ b/src/pages/how-to/db-workload-migration.mdx @@ -200,7 +200,7 @@ The output should be similar to: Memory: 15.9M (peak: 16.1M) CPU: 24ms CGroup: /system.slice/netbird.service - └─2865 /usr/bin/netbird service run> + └─2865 /usr/bin/netbird service run --config /etc/netbird/config.j> ``` To enable the service on startup, run: diff --git a/src/pages/how-to/setup-keys-add-servers-to-network.mdx b/src/pages/how-to/setup-keys-add-servers-to-network.mdx index 73a1f89f..21096d98 100644 --- a/src/pages/how-to/setup-keys-add-servers-to-network.mdx +++ b/src/pages/how-to/setup-keys-add-servers-to-network.mdx @@ -119,7 +119,7 @@ This should show the service as active and running. Memory: 26.3M CPU: 113ms CGroup: /system.slice/netbird.service - └─3819 /usr/bin/netbird service run --log-level info --daemon-ad + └─3819 /usr/bin/netbird service run --config /etc/netbird/config.json --log-level info --daemon-ad ``` Next, ensure NetBird starts automatically on boot: