Running NetBird as an app

Has anyone managed to get NetBird working in TrueNAS SCALE 24.10 (Electric Eel)?

I can install the app, via this YAML config

name: netbird
services:
    netbird:
        cap_add:
            - NET_ADMIN
        environment:
            - NB_SETUP_KEY=xxxxxxxxxxxx
        volumes:
            - /mnt/Tank/Docker/Data/netbird-client:/etc/netbird
        image: netbirdio/netbird:latest
volumes:
    netbird-client:
        external: true
        name: netbird-client

and get it to register with the NetBird service and reply to pings, but I’m unable to access the GUI or the shares on the box.

I have a few reasons to prefer NetBird over Tailscale for this particular deployment, but getting the former to work seems more difficult than the latter…

I think I got it:

You have to specify network_mode = host in the YAML file:

name: netbird
services:
    netbird:
        cap_add:
            - NET_ADMIN
        environment:
            - NB_SETUP_KEY=xxxxx
        volumes:
            - /mnt/Tank/Docker/Data/netbird-client:/etc/netbird
        image: netbirdio/netbird:latest
        network_mode: host
volumes:
    netbird-client:
        external: true
        name: netbird-client

This works.

However - and this is extreme nitpicking, of course - apparently you can’t have both NetBird and Tailscale running with host networking at the same time (in this specific server I’d use NetBird for user access and Tailscale for management).

I’ll investigate the issue further, but for now my immediate need has been addressed.

1 Like

Don’t forget the NB_MANAGEMENT_URL if you selfhost.

docker run --rm -d \
 --cap-add=NET_ADMIN \
 -e NB_SETUP_KEY=SETUP_KEY \
 -v netbird-client:/etc/netbird \
 -e NB_MANAGEMENT_URL=https://netbird.Domain.TDL \
 netbirdio/netbird:latest
1 Like

Could I get a step by step on how to do this using the Custom App button?

Thanks,

Apps → Discover Apps → click on the three vertical dots to the right of Custom App → Install via YAML, then paste this

name: netbird
services:
    netbird:
        cap_add:
            - NET_ADMIN
        environment:
            - NB_SETUP_KEY=[SETUP KEY CREATED VIA NETBIRD CONTROL PANEL]
        volumes:
            - /mnt/Tank/Docker/Data/netbird-client:/etc/netbird
        image: netbirdio/netbird:latest
        network_mode: host
        restart: always
volumes:
    netbird-client:
        external: true
        name: netbird-client

You may have to create the netbird-client folder inside your Docker dataset, I don’t recall if I had to (BTW, the whole /mnt/Tank/Docker/Data should be adjusted to your specific pool and datasets)

2 Likes

That was easy - works great.
Thanks a lot!

1 Like