From cadb58e7b3382587e53e7154c1014cb667791205 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 18 Dec 2025 08:36:59 +0000 Subject: [PATCH 01/22] Add NetBird scripts with correct ProxmoxVED source URL Fix the build.func source URL to use ProxmoxVED instead of ProxmoxVE, allowing the scripts to actually run in this repository. --- ct/netbird.sh | 48 ++++++++ frontend/public/json/netbird.json | 50 ++++++++ install/netbird-install.sh | 193 ++++++++++++++++++++++++++++++ 3 files changed, 291 insertions(+) create mode 100644 ct/netbird.sh create mode 100644 frontend/public/json/netbird.json create mode 100644 install/netbird-install.sh diff --git a/ct/netbird.sh b/ct/netbird.sh new file mode 100644 index 000000000..7ad572a45 --- /dev/null +++ b/ct/netbird.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: TechHutTV +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://netbird.io/ + +APP="NetBird" +var_tags="network;vpn" +var_cpu="1" +var_ram="512" +var_disk="4" +var_os="debian" +var_version="13" +var_unprivileged="1" +var_tun="${var_tun:-yes}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { +header_info +check_container_storage +check_container_resources + +if [[ ! -f /etc/netbird/config.json ]]; then +msg_error "No ${APP} Installation Found!" +exit +fi + +msg_info "Updating ${APP}" +$STD apt update +$STD apt -y upgrade +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access NetBird by entering the container and running:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}netbird up${CL}" diff --git a/frontend/public/json/netbird.json b/frontend/public/json/netbird.json new file mode 100644 index 000000000..7fcefd128 --- /dev/null +++ b/frontend/public/json/netbird.json @@ -0,0 +1,50 @@ +{ + "name": "NetBird", + "slug": "netbird", + "categories": [4], + "date_created": "2025-12-02", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": "https://docs.netbird.io/", + "website": "https://netbird.io/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/netbird.webp", + "config_path": "/etc/netbird/config.json", + "description": "NetBird is an open-source VPN management platform that creates secure peer-to-peer networks using WireGuard. It enables secure connectivity between devices anywhere in the world without complex firewall configurations or port forwarding. NetBird offers features like zero-configuration networking, SSO integration, access control policies, and a centralized management dashboard. It's designed to be simple to deploy and manage, making it ideal for connecting remote teams, securing IoT devices, or building secure infrastructure networks.", + "install_methods": [ + { + "type": "default", + "script": "ct/netbird.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 4, + "os": "debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "The NetBird client (agent) allows a peer to join a pre-existing NetBird deployment. If a NetBird deployment is not yet available, there are both managed and self-hosted options available.", + "type": "info" + }, + { + "text": "After installation, enter the container and run `netbird` to to view the commands.", + "type": "info" + }, + { + "text": "Use a Setup Key from your NetBird dashboard or SSO login to authenticate during setup or in the container.", + "type": "info" + }, + { + "text": "Check connection status with `netbird status`.", + "type": "info" + } + ] +} diff --git a/install/netbird-install.sh b/install/netbird-install.sh new file mode 100644 index 000000000..0bbff962f --- /dev/null +++ b/install/netbird-install.sh @@ -0,0 +1,193 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: TechHutTV +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://netbird.io/ + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +echo "" +echo ' _ _ _____ _____ ____ _ _ _____ ____ ' +echo '| \ | ||_ _| ____| _ \| | | | ____| _ \' +echo '| \| | _ | | | _| |_| |_ _ __ __ _| | | \' +echo '| . ` |/ _ \ | | |_ | __ <| | \'__/ _` | | | \' +echo '| |\ | __/ |_| |__| |_) | | | | (__ | |_| |' +echo '|_| \_|\___|\___|\__|____/|_|_| \___|\_____/' +echo "" + +msg_info "Installing Dependencies" +$STD apt install -y \ +curl \ +ca-certificates \ +gnupg +msg_ok "Installed Dependencies" + +msg_info "Setting up NetBird Repository" +curl -sSL https://pkgs.netbird.io/debian/public.key \ +| gpg --dearmor -o /usr/share/keyrings/netbird-archive-keyring.gpg +chmod 0644 /usr/share/keyrings/netbird-archive-keyring.gpg +echo 'deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://pkgs.netbird.io/debian stable main' \ +| tee /etc/apt/sources.list.d/netbird.list > /dev/null +$STD apt update +msg_ok "Set up NetBird Repository" + +msg_info "Installing NetBird" +$STD apt install -y netbird +msg_ok "Installed NetBird" + +msg_info "Enabling NetBird Service" +$STD netbird service install 2>/dev/null || true +$STD netbird service start 2>/dev/null || true +$STD systemctl enable netbird +msg_ok "Enabled NetBird Service" + +# NetBird Deployment Type Selection + +echo "" +echo -e "${BL}NetBird Deployment Type${CL}" +echo "─────────────────────────────────────────" +echo "Are you using NetBird Managed or Self-Hosted?" +echo "" +echo " 1) NetBird Managed (default) - Use NetBird's managed service" +echo " 2) Self-Hosted - Use your own NetBird management server" +echo "" + +read -rp "Select deployment type [1]: " DEPLOYMENT_TYPE +DEPLOYMENT_TYPE="${DEPLOYMENT_TYPE:-1}" + +NETBIRD_MGMT_URL="" +case "$DEPLOYMENT_TYPE" in +1) +msg_info "Using NetBird Managed service" +;; +2) +echo "" +echo -e "${BL}Self-Hosted Configuration${CL}" +echo "─────────────────────────────────────────" +echo "Enter your NetBird management server URL." +echo "Example: https://management.example.com" +echo "" +read -rp "Management URL: " NETBIRD_MGMT_URL + +if [[ -z "$NETBIRD_MGMT_URL" ]]; then +msg_warn "No management URL provided. Run 'netbird up --management-url ' within the container to connect." +else +# Ensure URL doesn't end with trailing slash +NETBIRD_MGMT_URL="${NETBIRD_MGMT_URL%/}" +msg_info "Management URL configured: ${GN}${NETBIRD_MGMT_URL}${CL}" +fi +;; +*) +msg_warn "Invalid selection. Using NetBird Managed service." +;; +esac + +# NetBird Connection Setup + +echo "" +echo -e "${BL}NetBird Connection Setup${CL}" +echo "─────────────────────────────────────────" +echo "Choose how to connect to your NetBird network:" +echo "" +echo " 1) Setup Key (default) - Use a pre-generated setup key" +echo " 2) SSO Login - Authenticate via browser with your identity provider" +echo " 3) Skip - Configure later with 'netbird up'" +echo "" + +read -rp "Select authentication method [1]: " AUTH_METHOD +AUTH_METHOD="${AUTH_METHOD:-1}" + +case "$AUTH_METHOD" in +1) +# Setup Key authentication +echo "" +echo "Enter your NetBird setup key from the NetBird dashboard." +echo "" +read -rp "Setup key: " NETBIRD_SETUP_KEY +echo "" + +if [[ -z "$NETBIRD_SETUP_KEY" ]]; then +if [[ -n "$NETBIRD_MGMT_URL" ]]; then +msg_warn "No setup key provided. Run 'netbird up -k --management-url $NETBIRD_MGMT_URL' within the container to connect." +else +msg_warn "No setup key provided. Run 'netbird up -k ' within the container to connect." +fi +else +echo -e "Setup key: ${GN}${NETBIRD_SETUP_KEY}${CL}" +read -rp "Press Enter to continue or Ctrl+C to cancel..." + +msg_info "Connecting to NetBird with setup key" +if [[ -n "$NETBIRD_MGMT_URL" ]]; then +if netbird up -k "$NETBIRD_SETUP_KEY" --management-url "$NETBIRD_MGMT_URL"; then +msg_ok "Connected to NetBird" +else +msg_warn "Connection failed. Run 'netbird up -k --management-url $NETBIRD_MGMT_URL' within the container to retry." +fi +else +if netbird up -k "$NETBIRD_SETUP_KEY"; then +msg_ok "Connected to NetBird" +else +msg_warn "Connection failed. Run 'netbird up -k ' within the container to retry." +fi +fi +fi +;; +2) +# SSO authentication +echo "" +echo -e "${BL}SSO Authentication${CL}" +echo "─────────────────────────────────────────" +echo "A login URL will appear below." +echo "Copy the URL and open it in your browser to authenticate." +echo "" + +msg_info "Starting SSO login" +if [[ -n "$NETBIRD_MGMT_URL" ]]; then +netbird login --management-url "$NETBIRD_MGMT_URL" 2>&1 || true +else +netbird login 2>&1 || true +fi +echo "" + +msg_info "Connecting to NetBird" +if [[ -n "$NETBIRD_MGMT_URL" ]]; then +if netbird up --management-url "$NETBIRD_MGMT_URL"; then +msg_ok "Connected to NetBird" +else +msg_warn "Connection failed. Run 'netbird up --management-url $NETBIRD_MGMT_URL' within the container to retry." +fi +else +if netbird up; then +msg_ok "Connected to NetBird" +else +msg_warn "Connection failed. Run 'netbird up' within the container to retry." +fi +fi +;; +3) +msg_info "Skipping NetBird connection" +if [[ -n "$NETBIRD_MGMT_URL" ]]; then +msg_ok "Run 'netbird up --management-url $NETBIRD_MGMT_URL' within the container to connect." +else +msg_ok "Run 'netbird up' within the container to connect." +fi +;; +*) +msg_warn "Invalid selection. Run 'netbird up' within the container to connect." +;; +esac + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt -y autoremove +$STD apt -y autoclean +msg_ok "Cleaned" From 00a837b623d562da4774048e7751fd25fbff35a3 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 18 Dec 2025 08:50:30 +0000 Subject: [PATCH 02/22] Fix ASCII banner syntax error in netbird-install.sh Use heredoc instead of echo statements to avoid backslash escaping issues that caused bash parsing errors. --- install/netbird-install.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 0bbff962f..95612de20 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -13,14 +13,15 @@ setting_up_container network_check update_os -echo "" -echo ' _ _ _____ _____ ____ _ _ _____ ____ ' -echo '| \ | ||_ _| ____| _ \| | | | ____| _ \' -echo '| \| | _ | | | _| |_| |_ _ __ __ _| | | \' -echo '| . ` |/ _ \ | | |_ | __ <| | \'__/ _` | | | \' -echo '| |\ | __/ |_| |__| |_) | | | | (__ | |_| |' -echo '|_| \_|\___|\___|\__|____/|_|_| \___|\_____/' -echo "" +cat <<'EOF' + + _ _ _ ____ _ _ +| \ | | ___| |_| __ )(_)_ __ __| | +| \| |/ _ \ __| _ \| | '__/ _` | +| |\ | __/ |_| |_) | | | | (_| | +|_| \_|\___|\__|____/|_|_| \__,_| + +EOF msg_info "Installing Dependencies" $STD apt install -y \ From a810fa2718fd13463b285d52d4fce81d267e181a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 18 Dec 2025 08:58:35 +0000 Subject: [PATCH 03/22] Simplify NetBird service enablement --- install/netbird-install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 95612de20..675225bbd 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -44,9 +44,7 @@ $STD apt install -y netbird msg_ok "Installed NetBird" msg_info "Enabling NetBird Service" -$STD netbird service install 2>/dev/null || true -$STD netbird service start 2>/dev/null || true -$STD systemctl enable netbird +$STD systemctl enable --now netbird msg_ok "Enabled NetBird Service" # NetBird Deployment Type Selection From 7f5f7f4c1fcce828f8edc4d569c6d81cc1a26059 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 18 Dec 2025 09:13:46 +0000 Subject: [PATCH 04/22] Simplify NetBird scripts for proper container setup - Use ${var:-default} pattern for all variables to enable advanced mode - Remove interactive prompts that blocked automated installs - Use cleanup_lxc instead of manual apt cleanup - Users configure NetBird with 'netbird up' after container creation --- ct/netbird.sh | 14 +-- install/netbird-install.sh | 172 +++---------------------------------- 2 files changed, 17 insertions(+), 169 deletions(-) diff --git a/ct/netbird.sh b/ct/netbird.sh index 7ad572a45..4b5714756 100644 --- a/ct/netbird.sh +++ b/ct/netbird.sh @@ -7,13 +7,13 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # Source: https://netbird.io/ APP="NetBird" -var_tags="network;vpn" -var_cpu="1" -var_ram="512" -var_disk="4" -var_os="debian" -var_version="13" -var_unprivileged="1" +var_tags="${var_tags:-network;vpn}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-4}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" var_tun="${var_tun:-yes}" header_info "$APP" diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 675225bbd..8c2b12ec8 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -5,7 +5,7 @@ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://netbird.io/ -source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors @@ -13,180 +13,28 @@ setting_up_container network_check update_os -cat <<'EOF' - - _ _ _ ____ _ _ -| \ | | ___| |_| __ )(_)_ __ __| | -| \| |/ _ \ __| _ \| | '__/ _` | -| |\ | __/ |_| |_) | | | | (_| | -|_| \_|\___|\__|____/|_|_| \__,_| - -EOF - msg_info "Installing Dependencies" -$STD apt install -y \ -curl \ -ca-certificates \ -gnupg +$STD apt-get install -y \ + curl \ + ca-certificates \ + gnupg msg_ok "Installed Dependencies" msg_info "Setting up NetBird Repository" -curl -sSL https://pkgs.netbird.io/debian/public.key \ -| gpg --dearmor -o /usr/share/keyrings/netbird-archive-keyring.gpg +curl -sSL https://pkgs.netbird.io/debian/public.key | gpg --dearmor -o /usr/share/keyrings/netbird-archive-keyring.gpg chmod 0644 /usr/share/keyrings/netbird-archive-keyring.gpg -echo 'deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://pkgs.netbird.io/debian stable main' \ -| tee /etc/apt/sources.list.d/netbird.list > /dev/null -$STD apt update +echo 'deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://pkgs.netbird.io/debian stable main' | tee /etc/apt/sources.list.d/netbird.list >/dev/null +$STD apt-get update msg_ok "Set up NetBird Repository" msg_info "Installing NetBird" -$STD apt install -y netbird +$STD apt-get install -y netbird msg_ok "Installed NetBird" msg_info "Enabling NetBird Service" $STD systemctl enable --now netbird msg_ok "Enabled NetBird Service" -# NetBird Deployment Type Selection - -echo "" -echo -e "${BL}NetBird Deployment Type${CL}" -echo "─────────────────────────────────────────" -echo "Are you using NetBird Managed or Self-Hosted?" -echo "" -echo " 1) NetBird Managed (default) - Use NetBird's managed service" -echo " 2) Self-Hosted - Use your own NetBird management server" -echo "" - -read -rp "Select deployment type [1]: " DEPLOYMENT_TYPE -DEPLOYMENT_TYPE="${DEPLOYMENT_TYPE:-1}" - -NETBIRD_MGMT_URL="" -case "$DEPLOYMENT_TYPE" in -1) -msg_info "Using NetBird Managed service" -;; -2) -echo "" -echo -e "${BL}Self-Hosted Configuration${CL}" -echo "─────────────────────────────────────────" -echo "Enter your NetBird management server URL." -echo "Example: https://management.example.com" -echo "" -read -rp "Management URL: " NETBIRD_MGMT_URL - -if [[ -z "$NETBIRD_MGMT_URL" ]]; then -msg_warn "No management URL provided. Run 'netbird up --management-url ' within the container to connect." -else -# Ensure URL doesn't end with trailing slash -NETBIRD_MGMT_URL="${NETBIRD_MGMT_URL%/}" -msg_info "Management URL configured: ${GN}${NETBIRD_MGMT_URL}${CL}" -fi -;; -*) -msg_warn "Invalid selection. Using NetBird Managed service." -;; -esac - -# NetBird Connection Setup - -echo "" -echo -e "${BL}NetBird Connection Setup${CL}" -echo "─────────────────────────────────────────" -echo "Choose how to connect to your NetBird network:" -echo "" -echo " 1) Setup Key (default) - Use a pre-generated setup key" -echo " 2) SSO Login - Authenticate via browser with your identity provider" -echo " 3) Skip - Configure later with 'netbird up'" -echo "" - -read -rp "Select authentication method [1]: " AUTH_METHOD -AUTH_METHOD="${AUTH_METHOD:-1}" - -case "$AUTH_METHOD" in -1) -# Setup Key authentication -echo "" -echo "Enter your NetBird setup key from the NetBird dashboard." -echo "" -read -rp "Setup key: " NETBIRD_SETUP_KEY -echo "" - -if [[ -z "$NETBIRD_SETUP_KEY" ]]; then -if [[ -n "$NETBIRD_MGMT_URL" ]]; then -msg_warn "No setup key provided. Run 'netbird up -k --management-url $NETBIRD_MGMT_URL' within the container to connect." -else -msg_warn "No setup key provided. Run 'netbird up -k ' within the container to connect." -fi -else -echo -e "Setup key: ${GN}${NETBIRD_SETUP_KEY}${CL}" -read -rp "Press Enter to continue or Ctrl+C to cancel..." - -msg_info "Connecting to NetBird with setup key" -if [[ -n "$NETBIRD_MGMT_URL" ]]; then -if netbird up -k "$NETBIRD_SETUP_KEY" --management-url "$NETBIRD_MGMT_URL"; then -msg_ok "Connected to NetBird" -else -msg_warn "Connection failed. Run 'netbird up -k --management-url $NETBIRD_MGMT_URL' within the container to retry." -fi -else -if netbird up -k "$NETBIRD_SETUP_KEY"; then -msg_ok "Connected to NetBird" -else -msg_warn "Connection failed. Run 'netbird up -k ' within the container to retry." -fi -fi -fi -;; -2) -# SSO authentication -echo "" -echo -e "${BL}SSO Authentication${CL}" -echo "─────────────────────────────────────────" -echo "A login URL will appear below." -echo "Copy the URL and open it in your browser to authenticate." -echo "" - -msg_info "Starting SSO login" -if [[ -n "$NETBIRD_MGMT_URL" ]]; then -netbird login --management-url "$NETBIRD_MGMT_URL" 2>&1 || true -else -netbird login 2>&1 || true -fi -echo "" - -msg_info "Connecting to NetBird" -if [[ -n "$NETBIRD_MGMT_URL" ]]; then -if netbird up --management-url "$NETBIRD_MGMT_URL"; then -msg_ok "Connected to NetBird" -else -msg_warn "Connection failed. Run 'netbird up --management-url $NETBIRD_MGMT_URL' within the container to retry." -fi -else -if netbird up; then -msg_ok "Connected to NetBird" -else -msg_warn "Connection failed. Run 'netbird up' within the container to retry." -fi -fi -;; -3) -msg_info "Skipping NetBird connection" -if [[ -n "$NETBIRD_MGMT_URL" ]]; then -msg_ok "Run 'netbird up --management-url $NETBIRD_MGMT_URL' within the container to connect." -else -msg_ok "Run 'netbird up' within the container to connect." -fi -;; -*) -msg_warn "Invalid selection. Run 'netbird up' within the container to connect." -;; -esac - motd_ssh customize - -msg_info "Cleaning up" -$STD apt -y autoremove -$STD apt -y autoclean -msg_ok "Cleaned" +cleanup_lxc From 012aa28a5508a73273ff5a2857b75689ea32e821 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 18 Dec 2025 09:20:13 +0000 Subject: [PATCH 05/22] Restore interactive NetBird setup prompts - Add deployment type selection (Managed vs Self-Hosted) - Add authentication method selection (Setup Key, SSO, Skip) - Interactive prompts work in production when run through build.func - Proper indentation and cleanup_lxc usage --- install/netbird-install.sh | 127 +++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 8c2b12ec8..a3b99fd87 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -35,6 +35,133 @@ msg_info "Enabling NetBird Service" $STD systemctl enable --now netbird msg_ok "Enabled NetBird Service" +# NetBird Deployment Type Selection +echo "" +echo -e "${BL}NetBird Deployment Type${CL}" +echo "─────────────────────────────────────────" +echo "Are you using NetBird Managed or Self-Hosted?" +echo "" +echo " 1) NetBird Managed (default) - Use NetBird's managed service" +echo " 2) Self-Hosted - Use your own NetBird management server" +echo "" + +read -r -p "Select deployment type [1]: " DEPLOYMENT_TYPE +DEPLOYMENT_TYPE="${DEPLOYMENT_TYPE:-1}" + +NETBIRD_MGMT_URL="" +case "$DEPLOYMENT_TYPE" in + 1) + msg_ok "Using NetBird Managed service" + ;; + 2) + echo "" + echo -e "${BL}Self-Hosted Configuration${CL}" + echo "─────────────────────────────────────────" + echo "Enter your NetBird management server URL." + echo "Example: https://management.example.com" + echo "" + read -r -p "Management URL: " NETBIRD_MGMT_URL + + if [[ -z "$NETBIRD_MGMT_URL" ]]; then + msg_warn "No management URL provided. Run 'netbird up --management-url ' to connect." + else + NETBIRD_MGMT_URL="${NETBIRD_MGMT_URL%/}" + msg_ok "Management URL configured: ${NETBIRD_MGMT_URL}" + fi + ;; + *) + msg_warn "Invalid selection. Using NetBird Managed service." + ;; +esac + +# NetBird Connection Setup +echo "" +echo -e "${BL}NetBird Connection Setup${CL}" +echo "─────────────────────────────────────────" +echo "Choose how to connect to your NetBird network:" +echo "" +echo " 1) Setup Key (default) - Use a pre-generated setup key" +echo " 2) SSO Login - Authenticate via browser with your identity provider" +echo " 3) Skip - Configure later with 'netbird up'" +echo "" + +read -r -p "Select authentication method [1]: " AUTH_METHOD +AUTH_METHOD="${AUTH_METHOD:-1}" + +case "$AUTH_METHOD" in + 1) + echo "" + echo "Enter your NetBird setup key from the NetBird dashboard." + echo "" + read -r -p "Setup key: " NETBIRD_SETUP_KEY + echo "" + + if [[ -z "$NETBIRD_SETUP_KEY" ]]; then + if [[ -n "$NETBIRD_MGMT_URL" ]]; then + msg_warn "No setup key provided. Run 'netbird up -k --management-url $NETBIRD_MGMT_URL' to connect." + else + msg_warn "No setup key provided. Run 'netbird up -k ' to connect." + fi + else + msg_info "Connecting to NetBird with setup key" + if [[ -n "$NETBIRD_MGMT_URL" ]]; then + if $STD netbird up -k "$NETBIRD_SETUP_KEY" --management-url "$NETBIRD_MGMT_URL"; then + msg_ok "Connected to NetBird" + else + msg_warn "Connection failed. Run 'netbird up -k --management-url $NETBIRD_MGMT_URL' to retry." + fi + else + if $STD netbird up -k "$NETBIRD_SETUP_KEY"; then + msg_ok "Connected to NetBird" + else + msg_warn "Connection failed. Run 'netbird up -k ' to retry." + fi + fi + fi + ;; + 2) + echo "" + echo -e "${BL}SSO Authentication${CL}" + echo "─────────────────────────────────────────" + echo "A login URL will appear below." + echo "Copy the URL and open it in your browser to authenticate." + echo "" + + msg_info "Starting SSO login" + if [[ -n "$NETBIRD_MGMT_URL" ]]; then + netbird login --management-url "$NETBIRD_MGMT_URL" 2>&1 || true + else + netbird login 2>&1 || true + fi + echo "" + + msg_info "Connecting to NetBird" + if [[ -n "$NETBIRD_MGMT_URL" ]]; then + if $STD netbird up --management-url "$NETBIRD_MGMT_URL"; then + msg_ok "Connected to NetBird" + else + msg_warn "Connection failed. Run 'netbird up --management-url $NETBIRD_MGMT_URL' to retry." + fi + else + if $STD netbird up; then + msg_ok "Connected to NetBird" + else + msg_warn "Connection failed. Run 'netbird up' to retry." + fi + fi + ;; + 3) + if [[ -n "$NETBIRD_MGMT_URL" ]]; then + msg_ok "Skipped. Run 'netbird up --management-url $NETBIRD_MGMT_URL' to connect." + else + msg_ok "Skipped. Run 'netbird up' to connect." + fi + ;; + *) + msg_warn "Invalid selection. Run 'netbird up' to connect." + ;; +esac + motd_ssh customize cleanup_lxc From a7ef3c18148c22b22777cee1b325cd3479adf036 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 18 Dec 2025 09:35:31 +0000 Subject: [PATCH 06/22] Add app variable for cleanup_lxc compatibility --- install/netbird-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index a3b99fd87..0d6fa9e27 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -6,6 +6,7 @@ # Source: https://netbird.io/ source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +app="netbird" color verb_ip6 catch_errors From 65838068c4690e59d0e2e13811f2be4dc6ef85ca Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Mon, 29 Dec 2025 08:22:24 -0800 Subject: [PATCH 07/22] Update install/netbird-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/netbird-install.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 0d6fa9e27..c0149c4dd 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -14,12 +14,6 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y \ - curl \ - ca-certificates \ - gnupg -msg_ok "Installed Dependencies" msg_info "Setting up NetBird Repository" curl -sSL https://pkgs.netbird.io/debian/public.key | gpg --dearmor -o /usr/share/keyrings/netbird-archive-keyring.gpg From 62fcad52ac077dde30e23261c2b7e5670a73bf61 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Mon, 29 Dec 2025 08:22:40 -0800 Subject: [PATCH 08/22] Update install/netbird-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/netbird-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index c0149c4dd..17415acda 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -6,7 +6,6 @@ # Source: https://netbird.io/ source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -app="netbird" color verb_ip6 catch_errors From 18817d96a5665ca7eaaf314eb8b9156dfcac2972 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Mon, 29 Dec 2025 08:22:51 -0800 Subject: [PATCH 09/22] Update install/netbird-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/netbird-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 17415acda..acd33fb6b 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -15,10 +15,11 @@ update_os msg_info "Setting up NetBird Repository" -curl -sSL https://pkgs.netbird.io/debian/public.key | gpg --dearmor -o /usr/share/keyrings/netbird-archive-keyring.gpg -chmod 0644 /usr/share/keyrings/netbird-archive-keyring.gpg -echo 'deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://pkgs.netbird.io/debian stable main' | tee /etc/apt/sources.list.d/netbird.list >/dev/null -$STD apt-get update +setup_deb882_repo \ + "netbird" \ + "https://pkgs.netbird.io/debian/public.key" \ + "https://pkgs.netbird.io/debian" \ + "stable" msg_ok "Set up NetBird Repository" msg_info "Installing NetBird" From 2971329b1b4451b73c008efb680556e5f552c106 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Mon, 29 Dec 2025 08:23:03 -0800 Subject: [PATCH 10/22] Update install/netbird-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/netbird-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index acd33fb6b..d86022444 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -40,7 +40,7 @@ echo " 1) NetBird Managed (default) - Use NetBird's managed service" echo " 2) Self-Hosted - Use your own NetBird management server" echo "" -read -r -p "Select deployment type [1]: " DEPLOYMENT_TYPE +read -r -p "${TAB3}Select deployment type [1]: " DEPLOYMENT_TYPE DEPLOYMENT_TYPE="${DEPLOYMENT_TYPE:-1}" NETBIRD_MGMT_URL="" From b9bbc3b38a6ac8e10b76d8e3433f3fdb22894aaf Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Mon, 29 Dec 2025 08:43:14 -0800 Subject: [PATCH 11/22] Fix description formatting in netbird.json --- frontend/public/json/netbird.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/netbird.json b/frontend/public/json/netbird.json index 7fcefd128..fe67583b3 100644 --- a/frontend/public/json/netbird.json +++ b/frontend/public/json/netbird.json @@ -11,7 +11,7 @@ "website": "https://netbird.io/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/netbird.webp", "config_path": "/etc/netbird/config.json", - "description": "NetBird is an open-source VPN management platform that creates secure peer-to-peer networks using WireGuard. It enables secure connectivity between devices anywhere in the world without complex firewall configurations or port forwarding. NetBird offers features like zero-configuration networking, SSO integration, access control policies, and a centralized management dashboard. It's designed to be simple to deploy and manage, making it ideal for connecting remote teams, securing IoT devices, or building secure infrastructure networks.", + "description": "NetBird is an open source VPN management platform that creates secure peer-to-peer networks using WireGuard. It enables secure connectivity between devices anywhere in the world without complex firewall configurations or port forwarding. NetBird offers features like zero-configuration networking, SSO integration, access control policies, and a centralized management dashboard. It's designed to be simple to deploy and manage, making it ideal for connecting remote teams, securing IoT devices, or building secure infrastructure networks.", "install_methods": [ { "type": "default", From 77d67f983c3fc9c63bdb49e544379cb9e270c690 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:02:57 -0800 Subject: [PATCH 12/22] Update frontend/public/json/netbird.json Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- frontend/public/json/netbird.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/netbird.json b/frontend/public/json/netbird.json index fe67583b3..b30180fb8 100644 --- a/frontend/public/json/netbird.json +++ b/frontend/public/json/netbird.json @@ -35,7 +35,7 @@ "type": "info" }, { - "text": "After installation, enter the container and run `netbird` to to view the commands.", + "text": "After installation, enter the container and run `netbird` to view the commands.", "type": "info" }, { From 296ca948cf1d8a8a4572b82a47650901351aed83 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:03:06 -0800 Subject: [PATCH 13/22] Update install/netbird-install.sh Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- install/netbird-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index d86022444..555dac6fd 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -23,7 +23,7 @@ setup_deb882_repo \ msg_ok "Set up NetBird Repository" msg_info "Installing NetBird" -$STD apt-get install -y netbird +$STD apt install -y netbird msg_ok "Installed NetBird" msg_info "Enabling NetBird Service" From 09556aa6ac22ce2ce60c82d50d322934be774866 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:03:24 -0800 Subject: [PATCH 14/22] Update install/netbird-install.sh Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- install/netbird-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 555dac6fd..8fc0beb1f 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -27,7 +27,7 @@ $STD apt install -y netbird msg_ok "Installed NetBird" msg_info "Enabling NetBird Service" -$STD systemctl enable --now netbird +$STD systemctl enable -q --now netbird msg_ok "Enabled NetBird Service" # NetBird Deployment Type Selection From 04bb146fc471e6f4a39567f28e787ce47d5a90ed Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:03:47 -0800 Subject: [PATCH 15/22] Update install/netbird-install.sh Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- install/netbird-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 8fc0beb1f..0e904a3dd 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -30,7 +30,7 @@ msg_info "Enabling NetBird Service" $STD systemctl enable -q --now netbird msg_ok "Enabled NetBird Service" -# NetBird Deployment Type Selection +echo "" echo "" echo -e "${BL}NetBird Deployment Type${CL}" echo "─────────────────────────────────────────" From 6f27868a49a5001f5217b7ddd159be9e8d150356 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:03:57 -0800 Subject: [PATCH 16/22] Update install/netbird-install.sh Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- install/netbird-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 0e904a3dd..1a4bcbba5 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -69,7 +69,7 @@ case "$DEPLOYMENT_TYPE" in ;; esac -# NetBird Connection Setup +echo "" echo "" echo -e "${BL}NetBird Connection Setup${CL}" echo "─────────────────────────────────────────" From 2d86a4199ebc279bf0ea88653175fa23db83b778 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:13:47 -0800 Subject: [PATCH 17/22] Update frontend/public/json/netbird.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- frontend/public/json/netbird.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/public/json/netbird.json b/frontend/public/json/netbird.json index b30180fb8..2fc4b72eb 100644 --- a/frontend/public/json/netbird.json +++ b/frontend/public/json/netbird.json @@ -9,7 +9,7 @@ "interface_port": null, "documentation": "https://docs.netbird.io/", "website": "https://netbird.io/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/netbird.webp", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/netbird.webp", "config_path": "/etc/netbird/config.json", "description": "NetBird is an open source VPN management platform that creates secure peer-to-peer networks using WireGuard. It enables secure connectivity between devices anywhere in the world without complex firewall configurations or port forwarding. NetBird offers features like zero-configuration networking, SSO integration, access control policies, and a centralized management dashboard. It's designed to be simple to deploy and manage, making it ideal for connecting remote teams, securing IoT devices, or building secure infrastructure networks.", "install_methods": [ From 57646838f2b841bb81ec75d1b1725c5f3decc9c6 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:14:00 -0800 Subject: [PATCH 18/22] Update install/netbird-install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- install/netbird-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 1a4bcbba5..72edecbc1 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2025 community-scripts ORG +# Copyright (c) 2021-2026 community-scripts ORG # Author: TechHutTV # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://netbird.io/ From 1504a65bfb0eedbe3ae0fbf1a51ffdf43d8d1823 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:14:10 -0800 Subject: [PATCH 19/22] Update ct/netbird.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/netbird.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/netbird.sh b/ct/netbird.sh index 4b5714756..e7fde16af 100644 --- a/ct/netbird.sh +++ b/ct/netbird.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG +# Copyright (c) 2021-2026 community-scripts ORG # Author: TechHutTV # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://netbird.io/ From 452bb94233f5a8e246246d36448328ca223402d8 Mon Sep 17 00:00:00 2001 From: Brandon Hopkins <76761586+TechHutTV@users.noreply.github.com> Date: Sat, 10 Jan 2026 16:26:20 -0800 Subject: [PATCH 20/22] Update ct/netbird.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com> --- ct/netbird.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/netbird.sh b/ct/netbird.sh index e7fde16af..aaa1cdb26 100644 --- a/ct/netbird.sh +++ b/ct/netbird.sh @@ -33,7 +33,7 @@ fi msg_info "Updating ${APP}" $STD apt update -$STD apt -y upgrade +$STD apt upgrade -y msg_ok "Updated Successfully" exit } From bd4f1f8f7a6c13a9942ec1e1c4d587b62609022c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Sun, 11 Jan 2026 01:59:06 +0100 Subject: [PATCH 21/22] Apply suggestion from @tremor021 --- install/netbird-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/netbird-install.sh b/install/netbird-install.sh index 72edecbc1..bd0078521 100644 --- a/install/netbird-install.sh +++ b/install/netbird-install.sh @@ -13,7 +13,6 @@ setting_up_container network_check update_os - msg_info "Setting up NetBird Repository" setup_deb882_repo \ "netbird" \ From 07261d16f977197aee65beb3192db5ddf1ef1b8e Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Sun, 11 Jan 2026 12:56:38 +0100 Subject: [PATCH 22/22] refactor --- ct/netbird.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/ct/netbird.sh b/ct/netbird.sh index aaa1cdb26..8495258d1 100644 --- a/ct/netbird.sh +++ b/ct/netbird.sh @@ -22,27 +22,27 @@ color catch_errors function update_script() { -header_info -check_container_storage -check_container_resources + header_info + check_container_storage + check_container_resources -if [[ ! -f /etc/netbird/config.json ]]; then -msg_error "No ${APP} Installation Found!" -exit -fi + if [[ ! -f /etc/netbird/config.json ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi -msg_info "Updating ${APP}" -$STD apt update -$STD apt upgrade -y -msg_ok "Updated Successfully" -exit + msg_info "Updating Netbird" + $STD apt update + $STD apt upgrade -y + msg_ok "Updated successfully!" + exit } start build_container description -msg_ok "Completed Successfully!\n" +msg_ok "Completed successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access NetBird by entering the container and running:${CL}" echo -e "${TAB}${GATEWAY}${BGN}netbird up${CL}"