diff --git a/.git-setup-info b/.git-setup-info new file mode 100644 index 00000000000..8bb483829f8 --- /dev/null +++ b/.git-setup-info @@ -0,0 +1,59 @@ +# Git Configuration for ProxmoxVE Development + +## Recommended Git Configuration + +### Set up remotes for easy syncing with upstream: + +```bash +# View your current remotes +git remote -v + +# If you don't have 'upstream' configured, add it: +git remote add upstream https://github.com/community-scripts/ProxmoxVE.git + +# Verify both remotes exist: +git remote -v +# Should show: +# origin https://github.com/YOUR_USERNAME/ProxmoxVE.git (fetch) +# origin https://github.com/YOUR_USERNAME/ProxmoxVE.git (push) +# upstream https://github.com/community-scripts/ProxmoxVE.git (fetch) +# upstream https://github.com/community-scripts/ProxmoxVE.git (push) +``` + +### Configure Git User (if not done globally) + +```bash +git config user.name "Your Name" +git config user.email "your.email@example.com" + +# Or configure globally: +git config --global user.name "Your Name" +git config --global user.email "your.email@example.com" +``` + +### Useful Git Workflows + +**Keep your fork up-to-date:** +```bash +git fetch upstream +git rebase upstream/main +git push origin main +``` + +**Create feature branch:** +```bash +git checkout -b feature/my-awesome-app +# Make changes... +git commit -m "feat: add my awesome app" +git push origin feature/my-awesome-app +``` + +**Pull latest from upstream:** +```bash +git fetch upstream +git merge upstream/main +``` + +--- + +For more help, see: docs/CONTRIBUTION_GUIDE.md diff --git a/ct/netbird.sh b/ct/netbird.sh new file mode 100644 index 00000000000..6b4aa8414b6 --- /dev/null +++ b/ct/netbird.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/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 00000000000..35528ebe861 --- /dev/null +++ b/frontend/public/json/netbird.json @@ -0,0 +1,52 @@ +{ + "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 00000000000..e2f96199ea8 --- /dev/null +++ b/install/netbird-install.sh @@ -0,0 +1,123 @@ +#!/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 ' | \| | ___| |_| |_) |_ _ __ __| | | | \ V / | ' +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 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 + msg_warn "No setup key provided. Run 'netbird up' within the container to connect." + 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 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 + ;; + 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" + netbird login 2>&1 || true + echo "" + + msg_info "Connecting to NetBird" + if netbird up; then + msg_ok "Connected to NetBird" + else + msg_warn "Connection failed. Run 'netbird up' within the container to retry." + fi + ;; + 3) + msg_info "Skipping NetBird connection" + msg_ok "Run 'netbird up' within the container to connect." + ;; + *) + 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"