fix(profile): config path (#397)

* fix(profile): config path (#397)
This commit is contained in:
hakansa
2025-07-25 15:52:04 +03:00
committed by GitHub
parent 8941c2a49b
commit e26716f40a
8 changed files with 16 additions and 19 deletions

View File

@@ -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")

View File

@@ -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=<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=<SETUP KEY> -v netbird-client:/var/lib/netbird netbirdio/netbird:latest
```
That is it! Enjoy using NetBird.

View File

@@ -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=<SETUP KEY> -v netbird-client:/etc/netbird netbirdio/netbird:<TAG>
docker run --network host --privileged --rm -d -e NB_SETUP_KEY=<SETUP KEY> -v netbird-client:/var/lib/netbird netbirdio/netbird:<TAG>
```
> TAG > 0.6.0 version

View File

@@ -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=<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=<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=<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=<SETUP KEY> -v netbird-client:/etc/netbird netbirdio/netbird:<TAG>
docker run --network host --privileged --rm -d -e NB_SETUP_KEY=<SETUP KEY> -v netbird-client:/var/lib/netbird netbirdio/netbird:<TAG>
```
> TAG > 0.6.0 version

View File

@@ -104,13 +104,11 @@ netbird service uninstall
```
3. Remove NetBird binary and configuration files.
/etc/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 /etc/netbird
rm /usr/local/bin/netbird
rm -rf /var/lib/netbird
```

View File

@@ -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=<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=<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.

View File

@@ -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/<profile>.json` |
| macOS | `/Library/Application Support/...`| `~/Library/Application Support/NetBird/<profile>.json`|
| Windows| `%ProgramData%\Netbird\profiles\` | `%APPDATA%\Netbird\<profile>.json` |
| OS | Config path |
| ------ | --------------------------------- |
| Linux | `/var/lib/netbird/...` |
| macOS | `/var/lib/netbird...`|
| Windows| `%ProgramData%\Netbird\profiles\` |
---

View File

@@ -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=<SETUP KEY> -e NB_LOG_LEVEL=debug -v netbird-client:/etc/netbird netbirdio/netbird:latest
-e NB_SETUP_KEY=<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