Can not start netbird on IKuai's docker. #519

Closed
opened 2025-11-20 05:12:55 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @duanyunlun on GitHub (Nov 27, 2023).

Describe the problem
I setup the docker in IKuai's docker plugin but the netbird's log shows that I may lost some Environment variables, which I don't know what are they. Hope anyone can explain the Environment variables meaning to me:

SYS_ADMIN
SYS_RESOURCE
NET_ADMIN
NET_RAW
BPF

Here's the IKuai's docker settings (doc_LAN is the network of docker, not the Host LAN)
image

Here's the logs:

2023-11-27T08:50:33Z INFO client/internal/login.go:130: peer has been successfully registered on Management Service
2023-11-27T08:50:33Z INFO client/internal/connect.go:47: starting NetBird client version 0.24.3
2023-11-27T08:50:35Z WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: failed to set memlock rlimit: operation not permitted
2023-11-27T08:50:35Z ERRO client/internal/routemanager/manager.go:42: server router is not supported: couldn't initialize nftables or iptables clients. Using a dummy firewall manager for route rules
2023-11-27T08:50:35Z INFO iface/module_linux.go:76: couldn't access device /dev/net/tun, go error stat /dev/net/tun: no such file or directory, will attempt to load tun module, if running on container add flag --cap-add=NET_ADMIN
......
Originally created by @duanyunlun on GitHub (Nov 27, 2023). **Describe the problem** I setup the docker in IKuai's docker plugin but the netbird's log shows that I may lost some Environment variables, which I don't know what are they. Hope anyone can explain the Environment variables meaning to me: SYS_ADMIN SYS_RESOURCE NET_ADMIN NET_RAW BPF Here's the IKuai's docker settings (doc_LAN is the network of docker, not the Host LAN) ![image](https://github.com/netbirdio/netbird/assets/15923235/e36eb8f6-e077-41e7-97d7-c19dab04820e) Here's the logs: ``` 2023-11-27T08:50:33Z INFO client/internal/login.go:130: peer has been successfully registered on Management Service 2023-11-27T08:50:33Z INFO client/internal/connect.go:47: starting NetBird client version 0.24.3 2023-11-27T08:50:35Z WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: failed to set memlock rlimit: operation not permitted 2023-11-27T08:50:35Z ERRO client/internal/routemanager/manager.go:42: server router is not supported: couldn't initialize nftables or iptables clients. Using a dummy firewall manager for route rules 2023-11-27T08:50:35Z INFO iface/module_linux.go:76: couldn't access device /dev/net/tun, go error stat /dev/net/tun: no such file or directory, will attempt to load tun module, if running on container add flag --cap-add=NET_ADMIN ...... ```
saavagebueno added the clientwaiting-feedbackthird-party-integrationdocker labels 2025-11-20 05:12:55 -05:00
Author
Owner

@bcmmbaga commented on GitHub (Nov 30, 2023):

Hi @duanyunlun, these are related to Docker runtime privileges and Linux capabilities. SYS_ADMIN, SYS_RESOURCE, NET_ADMIN, and BPF are capability keys that allow additional capabilities to give Docker more privileges. Please refer to the Docker documentation here for a more detailed explanation regarding the use case for each.

Could you please try running the following command to start the Netbird client in Docker

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

@bcmmbaga commented on GitHub (Nov 30, 2023): Hi @duanyunlun, these are related to Docker runtime privileges and Linux capabilities. `SYS_ADMIN`, `SYS_RESOURCE`, `NET_ADMIN`, and `BPF` are capability keys that allow additional capabilities to give Docker more privileges. Please refer to the Docker documentation [here](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) for a more detailed explanation regarding the use case for each. Could you please try running the following command to start the Netbird client in Docker `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`
Author
Owner

@duanyunlun commented on GitHub (Dec 6, 2023):

@bcmmbaga The IKuai's docker can not run custom command, so I think it can not be used as a "Normal" Docker Engine.

@duanyunlun commented on GitHub (Dec 6, 2023): @bcmmbaga The IKuai's docker can not run custom command, so I think it can not be used as a "Normal" Docker Engine.
Author
Owner

@mlsmaycon commented on GitHub (Dec 8, 2023):

Hello @duanyunlun can you check this page https://bbs.ikuai8.com/forum.php?mod=viewthread&tid=143433&highlight=docker? It seems that there is support for the --cap-add flags in recent version, at least the first comment there states that all docker functionality is there (if my translated is correct).

@mlsmaycon commented on GitHub (Dec 8, 2023): Hello @duanyunlun can you check this page https://bbs.ikuai8.com/forum.php?mod=viewthread&tid=143433&highlight=docker? It seems that there is support for the --cap-add flags in recent version, at least the first comment there states that all docker functionality is there (if my translated is correct).
Author
Owner

@nazarewk commented on GitHub (Apr 17, 2025):

I'm closing this for lack of feedback/activity, feel free to comment to reopen

@nazarewk commented on GitHub (Apr 17, 2025): I'm closing this for lack of feedback/activity, feel free to comment to reopen
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#519