From 43a47d9922b282160ccdb6f44972bbd841402a42 Mon Sep 17 00:00:00 2001 From: Adrian Rodriguez Date: Sat, 14 Mar 2026 00:25:55 +0100 Subject: [PATCH 1/4] feat: add Bambuddy LXC container script --- ct/bambuddy.sh | 78 +++++++++++++++++++++++++++++++++++++ install/bambuddy-install.sh | 69 ++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 ct/bambuddy.sh create mode 100644 install/bambuddy-install.sh diff --git a/ct/bambuddy.sh b/ct/bambuddy.sh new file mode 100644 index 00000000..f8193dca --- /dev/null +++ b/ct/bambuddy.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/Adrian-RDA/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: [Adrian-RDA] +# License: MIT | https://github.com/Adrian-RDA/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/maziggy/bambuddy + +APP="Bambuddy" +var_tags="${var_tags:-media;3d-printing}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/bambuddy ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "bambuddy" "maziggy/bambuddy"; then + msg_info "Stopping Service" + systemctl stop bambuddy + msg_ok "Stopped Service" + + msg_info "Backing up Configuration and Data" + cp /opt/bambuddy/.env /opt/bambuddy.env.bak + cp -r /opt/bambuddy/data /opt/bambuddy_data_bak + msg_ok "Backed up Configuration and Data" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bambuddy" "maziggy/bambuddy" "tarball" "latest" "/opt/bambuddy" + + msg_info "Updating Python Dependencies" + cd /opt/bambuddy + $STD uv venv + $STD uv pip install -r requirements.txt + msg_ok "Updated Python Dependencies" + + msg_info "Rebuilding Frontend" + cd /opt/bambuddy/frontend + $STD npm install + $STD npm run build + msg_ok "Rebuilt Frontend" + + msg_info "Restoring Configuration and Data" + cp /opt/bambuddy.env.bak /opt/bambuddy/.env + cp -r /opt/bambuddy_data_bak/. /opt/bambuddy/data/ + rm -f /opt/bambuddy.env.bak + rm -rf /opt/bambuddy_data_bak + msg_ok "Restored Configuration and Data" + + msg_info "Starting Service" + systemctl start bambuddy + msg_ok "Started Service" + msg_ok "Updated successfully!" + fi + 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 it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}" diff --git a/install/bambuddy-install.sh b/install/bambuddy-install.sh new file mode 100644 index 00000000..aac40d55 --- /dev/null +++ b/install/bambuddy-install.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: [Adrian-RDA] +# License: MIT | https://github.com/Adrian-RDA/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/maziggy/bambuddy + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + libglib2.0-0 +msg_ok "Installed Dependencies" + +PYTHON_VERSION="3.13" setup_uv +NODE_VERSION="22" setup_nodejs + +fetch_and_deploy_gh_release "bambuddy" "maziggy/bambuddy" "tarball" "latest" "/opt/bambuddy" + +msg_info "Setting up Python Environment" +cd /opt/bambuddy +$STD uv venv +$STD uv pip install -r requirements.txt +msg_ok "Set up Python Environment" + +msg_info "Building Frontend" +cd /opt/bambuddy/frontend +$STD npm install +$STD npm run build +msg_ok "Built Frontend" + +msg_info "Configuring Bambuddy" +mkdir -p /opt/bambuddy/data /opt/bambuddy/logs +cat </opt/bambuddy/.env +DEBUG=false +LOG_LEVEL=INFO +LOG_TO_FILE=true +EOF +msg_ok "Configured Bambuddy" + +msg_info "Creating Service" +cat </etc/systemd/system/bambuddy.service +[Unit] +Description=Bambuddy - Bambu Lab Print Management +Documentation=https://github.com/maziggy/bambuddy +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/bambuddy +ExecStart=/opt/bambuddy/.venv/bin/uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now bambuddy +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc From 3738b2a18b63ce84010f8cf3738a1d539900f2e2 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Sat, 14 Mar 2026 13:02:13 +0100 Subject: [PATCH 2/4] Update bambuddy-install.sh --- install/bambuddy-install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/install/bambuddy-install.sh b/install/bambuddy-install.sh index aac40d55..f00025be 100644 --- a/install/bambuddy-install.sh +++ b/install/bambuddy-install.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash # Copyright (c) 2021-2026 community-scripts ORG -# Author: [Adrian-RDA] -# License: MIT | https://github.com/Adrian-RDA/ProxmoxVE/raw/main/LICENSE +# Author: Adrian-RDA +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/maziggy/bambuddy source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" @@ -14,13 +14,11 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y \ - libglib2.0-0 +$STD apt-get install -y libglib2.0-0 msg_ok "Installed Dependencies" PYTHON_VERSION="3.13" setup_uv NODE_VERSION="22" setup_nodejs - fetch_and_deploy_gh_release "bambuddy" "maziggy/bambuddy" "tarball" "latest" "/opt/bambuddy" msg_info "Setting up Python Environment" From 497e135c818d65cf3ee07a8b9c50aa79d5acf0cf Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Sat, 14 Mar 2026 13:03:05 +0100 Subject: [PATCH 3/4] Update bambuddy.sh --- ct/bambuddy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ct/bambuddy.sh b/ct/bambuddy.sh index f8193dca..b2256673 100644 --- a/ct/bambuddy.sh +++ b/ct/bambuddy.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/Adrian-RDA/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2026 community-scripts ORG -# Author: [Adrian-RDA] -# License: MIT | https://github.com/Adrian-RDA/ProxmoxVE/raw/main/LICENSE +# Author:[Adrian-RDA +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/maziggy/bambuddy APP="Bambuddy" From 42ffd777ddb6b22a14150fc1416f6082c038f99b Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Sat, 14 Mar 2026 13:03:30 +0100 Subject: [PATCH 4/4] typo --- ct/bambuddy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/bambuddy.sh b/ct/bambuddy.sh index b2256673..e93d53da 100644 --- a/ct/bambuddy.sh +++ b/ct/bambuddy.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2026 community-scripts ORG -# Author:[Adrian-RDA +# Author: Adrian-RDA # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/maziggy/bambuddy