This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Home Assistant add-on for NetBird, a WireGuard-based mesh VPN client. The add-on packages the NetBird client binary into a Home Assistant Supervisor add-on container.
addon-netbird/
├── netbird/ # Add-on directory
│ ├── config.yaml # Add-on configuration schema
│ ├── build.yaml # Build configuration (base images per architecture)
│ ├── Dockerfile # Multi-stage build pulling from netbirdio/netbird
│ ├── DOCS.md # User documentation
│ ├── rootfs/ # Container filesystem overlay
│ │ └── etc/s6-overlay/s6-rc.d/netbird/
│ │ ├── run # Main service script (netbird up)
│ │ └── finish # Service exit handler
│ └── translations/en.yaml # UI translations
├── repository.json # Home Assistant add-on repository metadata
└── .github/workflows/
├── builder.yaml # CI build workflow
└── lint.yaml # Add-on linting workflow
The add-on uses the Home Assistant Builder system. Builds are triggered automatically via GitHub Actions when changes are pushed to main affecting monitored files: build.yaml, config.yaml, Dockerfile, or rootfs/.
There is no local build command. The CI system uses home-assistant/builder action. For testing, push to a PR branch - the workflow builds with --test flag on PRs and publishes on merge to main.
- netbird/config.yaml: Defines add-on metadata, supported architectures, required privileges (NET_ADMIN, SYS_ADMIN, etc.), and user-configurable options schema
- netbird/Dockerfile: Copies
netbirdbinary from upstreamnetbirdio/netbirdimage intohassio-addons/baseimage - netbird/rootfs/etc/s6-overlay/s6-rc.d/netbird/run: Service startup script using bashio for config parsing, runs
netbird upwith options from Home Assistant config
User-configurable options (defined in config.yaml schema):
admin_url/management_url: Custom NetBird server URLssetup_key: Registration key (optional if using login URL from logs)hostname: Custom peer hostnamerosenpass/rosenpass_permissive: Post-quantum encryption settingsenv_vars: AdditionalNB_*environment variableslog_level: trace/debug/info/notice/warning/error/fatal
The CI runs frenck/action-addon-linter on all add-on directories. YAML linting follows rules in .yamllint.
NetBird version is pinned in two places that must stay in sync:
netbird/config.yaml-versionfieldnetbird/Dockerfile-FROM netbirdio/netbird:<version>tag
Renovate bot handles automated version updates via .github/renovate.json.