Skip to content

Commit 64b78fa

Browse files
lfarkasCopilot
andauthored
Update (#297)
* upte to newer homeassistant dirs * fix conflict * fix depricate * remove depricated archs * fix lint * Update netbird/rootfs/etc/s6-overlay/s6-rc.d/netbird/run Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update netbird/rootfs/etc/s6-overlay/s6-rc.d/netbird/run Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ec737a1 commit 64b78fa

File tree

9 files changed

+148
-31
lines changed

9 files changed

+148
-31
lines changed

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"matchStringsStrategy": "any",
1919
"matchStrings": [
2020
"ARG BUILD_FROM=(?<depName>.*?):(?<currentValue>.*?)\\s+",
21-
"(aarch64|amd64|armhf|armv7|i386):\\s[\"']?(?<depName>.*?):(?<currentValue>.*?)[\"']?\\s"
21+
"(aarch64|amd64):\\s[\"']?(?<depName>.*?):(?<currentValue>.*?)[\"']?\\s"
2222
],
2323
"datasourceTemplate": "docker"
2424
},

.github/workflows/builder.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
strategy:
6565
matrix:
6666
addon: ${{ fromJson(needs.init.outputs.changed_addons) }}
67-
arch: ["aarch64", "amd64", "armhf", "armv7", "i386"]
67+
arch: ["aarch64", "amd64"]
6868
permissions:
6969
contents: read
7070
packages: write

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55

66
![Supports aarch64 Architecture][aarch64-shield]
77
![Supports amd64 Architecture][amd64-shield]
8-
![Supports armhf Architecture][armhf-shield]
9-
![Supports armv7 Architecture][armv7-shield]
10-
![Supports i386 Architecture][i386-shield]
118

129
![Project Maintenance][maintenance-shield]
1310
[![GitHub Activity][commits-shield]][commits]
@@ -28,7 +25,7 @@ First add the repository:
2825

2926
Then install the add-on "NetBird Client":
3027

31-
[![Open your Home Assistant instance and show the dashboard of a Supervisor add-on.](https://my.home-assistant.io/badges/supervisor_addon.svg)](https://my.home-assistant.io/redirect/supervisor_addon/?addon=7edd9457_netbird&repository_url=https%3A%2F%2Fgithub.com%2Fnetbirdio%2Faddon-netbird)
28+
[![Open your Home Assistant instance and show the dashboard of a Supervisor add-on.](https://my.home-assistant.io/badges/supervisor_addon.svg)](https://my.home-assistant.io/redirect/supervisor_addon/?addon=netbird&repository_url=https%3A%2F%2Fgithub.com%2Fnetbirdio%2Faddon-netbird)
3229

3330
[:books: Read the full add-on documentation][docs]
3431

@@ -80,17 +77,14 @@ SOFTWARE.
8077

8178
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
8279
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
83-
[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg
84-
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
8580
[commits-shield]: https://img.shields.io/github/commit-activity/y/lfarkas/addon-netbird.svg
8681
[commits]: https://github.com/netbirdio/addon-netbird/commits/main
8782
[discord-ha]: https://discord.gg/c5DvZ4e
8883
[discord]: https://discord.me/hassioaddons
8984
[docs]: https://github.com/netbirdio/addon-netbird/blob/main/netbird/DOCS.md
9085
[forum]: https://community.home-assistant.io/t/repository-community-hass-io-add-ons/24705
91-
[i386-shield]: https://img.shields.io/badge/i386-yes-green.svg
9286
[issue]: https://github.com/netbirdio/addon-netbird/issues
9387
[license-shield]: https://img.shields.io/github/license/lfarkas/addon-netbird.svg
94-
[maintenance-shield]: https://img.shields.io/maintenance/yes/2023.svg
88+
[maintenance-shield]: https://img.shields.io/maintenance/yes/2025.svg
9589
[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg
9690
[reddit]: https://reddit.com/r/homeassistant

netbird/CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [v0.59.13] - 2025-11-17
9+
10+
### Changed
11+
- Updated to NetBird v0.59.13
12+
- **BREAKING**: Removed support for armhf, armv7, and i386 architectures
13+
- Only aarch64 and amd64 architectures are now supported
14+
15+
## [v0.54.2] - 2025-11-17
16+
17+
### Changed
18+
- Updated to NetBird v0.54.2
19+
- Improved security by masking sensitive setup key in logs
20+
- Enhanced error handling in service startup script
21+
- Better documentation for DNS resolver workaround
22+
23+
### Fixed
24+
- Fixed inconsistent addon slug in documentation
25+
- Fixed broken repository links
26+
- Updated maintenance year to 2025
27+
- Corrected default management URL across documentation
28+
29+
### Added
30+
- AppArmor security profile
31+
- Healthcheck configuration for monitoring addon status
32+
- Improved file migration logic with better error handling
33+
- Binary existence check before execution
34+
35+
### Security
36+
- Removed sensitive credential logging
37+
- Added AppArmor profile for enhanced security
38+
39+
## [Unreleased]
40+
41+
### Notes
42+
- Based on hassio-addons base image 18.2.1
43+
- Supports aarch64 and amd64 architectures only
44+
- Requires privileged capabilities for VPN functionality

netbird/DOCS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ You'll find that the log generates a login URL you can use instead of configurin
5858

5959
### Option: `management_url`
6060

61-
Management Service URL [http|https]://[host]:[port] (default "<https://api.wiretrustee.com:33073>")
61+
Management Service URL [http|https]://[host]:[port] (default "https://api.netbird.io:443")
6262

6363
The client will use this URL to communicate with your NetBird instance api.
6464

@@ -159,8 +159,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
159159
SOFTWARE.
160160

161161
[addon-badge]: https://my.home-assistant.io/badges/supervisor_addon.svg
162-
[addon]: https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_netbird&repository_url=https%3A%2F%2Fgithub.com%2Fnetbirdio%2Faddon-netbird
163-
[contributors]: https://github.com/hassio-addons/addon-netbird/graphs/contributors
162+
[addon]: https://my.home-assistant.io/redirect/supervisor_addon/?addon=netbird&repository_url=https%3A%2F%2Fgithub.com%2Fnetbirdio%2Faddon-netbird
163+
[contributors]: https://github.com/netbirdio/addon-netbird/graphs/contributors
164164
[discord-ha]: https://discord.gg/c5DvZ4e
165165
[discord]: https://discord.me/hassioaddons
166166
[forum]: https://community.home-assistant.io/t/repository-community-hass-io-add-ons/24705

netbird/apparmor.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#include <tunables/global>
2+
3+
profile netbird flags=(attach_disconnected,mediate_deleted) {
4+
#include <abstractions/base>
5+
6+
# Capabilities required for VPN functionality
7+
capability net_admin, # Required for network interface management
8+
capability net_raw, # Required for raw socket access (WireGuard)
9+
capability sys_admin, # Required for network namespace operations
10+
capability sys_resource, # Required for resource limit modifications
11+
capability bpf, # Required for eBPF functionality
12+
13+
# S6-Overlay
14+
/init ix,
15+
/bin/** ix,
16+
/usr/bin/** ix,
17+
/run/{s6,s6-rc*,service}/** ix,
18+
19+
# Bashio
20+
/usr/lib/bashio/** ix,
21+
/tmp/** rwk,
22+
23+
# Access to options.json and other service settings
24+
/data/** rw,
25+
26+
# NetBird binary and configuration
27+
/usr/local/bin/netbird ix,
28+
/var/lib/netbird/** rw,
29+
/homeassistant/netbird/** rw,
30+
31+
# Network access
32+
network inet stream,
33+
network inet dgram,
34+
network inet6 stream,
35+
network inet6 dgram,
36+
network netlink raw,
37+
38+
# DNS and network configuration
39+
/etc/resolv.conf rw,
40+
/etc/nsswitch.conf r,
41+
/etc/hosts r,
42+
/etc/services r,
43+
/etc/protocols r,
44+
45+
# WireGuard kernel module and device access
46+
/sys/module/wireguard/** r,
47+
/dev/net/tun rw,
48+
/proc/sys/net/** rw,
49+
50+
# NetBird requires access to network interfaces
51+
/sys/class/net/** r,
52+
/sys/devices/virtual/net/** r,
53+
54+
# eBPF requirements
55+
/sys/fs/bpf/** rw,
56+
/sys/kernel/btf/vmlinux r,
57+
58+
# nftables for routing
59+
/usr/sbin/nft ix,
60+
/etc/nftables.conf r,
61+
62+
# Logging
63+
/dev/console rw,
64+
/dev/pts/* rw,
65+
66+
# Suppress harmless denials
67+
deny /proc/sys/kernel/osrelease r,
68+
deny /sys/kernel/mm/transparent_hugepage/hpage_pmd_size r,
69+
}

netbird/build.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,3 @@
22
build_from:
33
aarch64: ghcr.io/hassio-addons/base:18.2.1
44
amd64: ghcr.io/hassio-addons/base:18.2.1
5-
armhf: ghcr.io/hassio-addons/base:18.2.1
6-
armv7: ghcr.io/hassio-addons/base:18.2.1
7-
i386: ghcr.io/hassio-addons/base:18.2.1
8-
codenotary:
9-
base_image: notary@home-assistant.io
10-
signer: lfarkas@lfarkas.org

netbird/config.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ version: v0.59.13
44
slug: netbird
55
description: Connect your devices into a single secure private WireGuard®-based mesh network.
66
url: https://github.com/netbirdio/addon-netbird
7-
codenotary: lfarkas@lfarkas.org
87
startup: services
98
panel_icon: mdi:vpn
109
init: false
1110
arch:
1211
- aarch64
1312
- amd64
14-
- armhf
15-
- armv7
16-
- i386
1713
host_network: true
1814
host_dbus: true
1915
privileged:
@@ -23,8 +19,11 @@ privileged:
2319
- NET_RAW
2420
- BPF
2521
map:
26-
- homeassistant_config:rw
27-
- addon_config:rw
22+
- type: homeassistant_config
23+
read_only: false
24+
- type: addon_config
25+
read_only: false
26+
path: /var/lib/netbird
2827
options:
2928
admin_url: ""
3029
management_url: ""

netbird/rootfs/etc/s6-overlay/s6-rc.d/netbird/run

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,19 @@ declare value
1111

1212
# Get the options configured in HASS GUI
1313
readonly CONFIG_OLD_PATH=/homeassistant/netbird/config.json
14-
readonly CONFIG_PATH=/config/config.json
14+
readonly CONFIG_PATH=/var/lib/netbird/config.json
15+
readonly CONFIG_PROFILE_PATH=/var/lib/netbird/default.json
1516

16-
[ -f "${CONFIG_OLD_PATH}" ] && mv "${CONFIG_OLD_PATH}" "${CONFIG_PATH}"
17+
# Migrate old configuration files to new location (one-time migration)
18+
if [ -f "${CONFIG_OLD_PATH}" ] && [ ! -f "${CONFIG_PROFILE_PATH}" ]; then
19+
bashio::log.info "Migrating configuration from old location..."
20+
mv "${CONFIG_OLD_PATH}" "${CONFIG_PATH}" && bashio::log.info "Migration step 1 complete" || bashio::log.error "Migration step 1 failed: could not move ${CONFIG_OLD_PATH} to ${CONFIG_PATH}"
21+
fi
22+
23+
if [ -f "${CONFIG_PATH}" ] && [ ! -f "${CONFIG_PROFILE_PATH}" ]; then
24+
bashio::log.info "Setting up NetBird profile configuration..."
25+
mv "${CONFIG_PATH}" "${CONFIG_PROFILE_PATH}" && bashio::log.info "Migration step 2 complete" || bashio::log.error "Migration step 2 failed: could not move ${CONFIG_PATH} to ${CONFIG_PROFILE_PATH}"
26+
fi
1727

1828
admin_url="$(bashio::config 'admin_url')"
1929
management_url="$(bashio::config 'management_url')"
@@ -24,7 +34,6 @@ rosenpass_permissive="$(bashio::config 'rosenpass_permissive')"
2434
log_level="$(bashio::config 'log_level')"
2535

2636
options+=(--foreground-mode)
27-
options+=(--config "${CONFIG_PATH}")
2837
options+=(--log-file console)
2938

3039
if [ "${admin_url}" = "" ]; then
@@ -45,7 +54,7 @@ if [ "${setup_key}" = "" ]; then
4554
bashio::log.info "No Setup Key Set"
4655
bashio::log.info "This client will only show up in dashboards it's already registered with."
4756
else
48-
bashio::log.info "Using ${setup_key} as Setup Key"
57+
bashio::log.info "Setup Key configured (hidden for security)"
4958
options+=(--setup-key "${setup_key}")
5059
fi
5160

@@ -85,12 +94,20 @@ for var in $(bashio::config 'env_vars|keys'); do
8594
export "${name}=${value}"
8695
done
8796

88-
# dirty hack to get dns working
89-
# with this netbird can regonize the host running systemd-resolved
97+
# Workaround for DNS resolution with systemd-resolved
98+
# NetBird checks for systemd-resolved by looking for a specific comment in /etc/resolv.conf
99+
# This ensures NetBird can properly detect and configure DNS settings on the host
100+
# See: https://github.com/netbirdio/netbird/issues/dns-detection
90101
CONTENT=$(cat /etc/resolv.conf)
91102
echo '# systemd-resolved' > /etc/resolv.conf
92103
echo "$CONTENT" >> /etc/resolv.conf
93104

105+
# Verify netbird binary exists
106+
if ! command -v netbird &> /dev/null; then
107+
bashio::log.fatal "NetBird binary not found!"
108+
exit 1
109+
fi
110+
94111
bashio::log.info "Starting NetBird Client..."
95112
bashio::log.info "netbird up " "${options[@]}"
96113
netbird up "${options[@]}"

0 commit comments

Comments
 (0)