NetBird
Install the NetBird client into an existing Debian or Ubuntu LXC container from the Proxmox VE host.
add-netbird-lxc.sh gives an existing container access to /dev/net/tun and
installs NetBird inside it. It does not connect the container to a NetBird
network.
| Run it | On the Proxmox VE host. require_pve_host exits with code 232 anywhere else |
| Target | An existing LXC container picked from a list |
| Container OS | Debian or Ubuntu. Anything else, Alpine included, exits with code 238 |
| Port | None |
| Source | tools/addon/add-netbird-lxc.sh |
Run
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/add-netbird-lxc.sh)"Prompts
| Prompt | Answer |
|---|---|
This will add NetBird to an existing LXC Container ONLY. Proceed(y/n)? | y continues, n exits. Anything else asks again |
Select a container to add NetBird to: (list titled Containers on <node>) | Pick one container from pct list |
What it changes
On the host:
-
Starts the container if it is not running and waits until
pct statusreportsrunning. -
Appends two lines to
/etc/pve/lxc/<CTID>.conf:lxc.cgroup2.devices.allow: c 10:200 rwm lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
Inside the container:
- Installs
curlif missing, plusca-certificatesandgpg. - Removes the old
/usr/share/keyrings/netbird-archive-keyring.gpgand adds thehttps://pkgs.netbird.io/debianrepository (suitestable, componentmain) withsetup_deb822_repo. - Installs the
netbird-uipackage. - If the container has a
docker.serviceunit, writes/etc/systemd/system/netbird.service.d/after-docker.confso NetBird starts after Docker (After=docker.service,Wants=docker.service).
No credentials are created.
After the install
Reboot the container so the new device entries apply, then run inside it:
netbird upUpdate
The script has no update path and installs no update_ helper. NetBird comes
from an APT repository, so apt inside the container updates it.
Remove
The script has no uninstall path. Remove the package inside the container and delete the two lines from the container configuration by hand.
Limits
- The two configuration lines are appended without checking whether they
already exist. Running the script twice against the same container leaves
duplicate entries in
/etc/pve/lxc/<CTID>.conf. - The container list has no cancel branch: cancelling the dialog ends the script through its error handler.
- Only LXC containers on the node you run it on are listed.