Skip to content

Commit fb42eba

Browse files
committed
feat: update the Docker command in the docs
as per the suggestion netbirdio/netbird#2290 (comment)
1 parent 030284f commit fb42eba

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/pages/how-to/examples.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,16 @@ You would need to obtain a [setup key](/how-to/register-machines-using-setup-key
104104

105105
The setup key could be found in the NetBird Management dashboard under the Setup Keys tab - [https://app.netbird.io/setup-keys](https://app.netbird.io/setup-keys).
106106

107-
Set the ```NB_SETUP_KEY``` environment variable and run the command.
107+
Set the environment variables:
108+
109+
- `PEER_NAME` - Peer's name and hostname as appearing in the Dashboard/DNS queries
110+
- `NB_SETUP_KEY`
111+
- `EXTERNAL_INTERFACE` - an external interface, the machine uses for Internet access
112+
113+
and run the command:
108114

109115
```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
116+
docker run --rm -d --name "$PEER_NAME" --hostname "$PEER_NAME" --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --cap-add=SYS_RESOURCE -e NB_SETUP_KEY="$NB_SETUP_KEY" -v netbird-client:"/etc/netbird" --sysctl "net.ipv4.conf.all.src_valid_mark=1" --sysctl "net.ipv4.conf.all.rp_filter=2" --sysctl "net.ipv4.conf.${EXTERNAL_INTERFACE}.rp_filter=2" netbirdio/netbird:latest
111117
```
112118

113119
That is it! Enjoy using NetBird.

0 commit comments

Comments
 (0)