mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-12-02 21:08:10 +01:00
Compare commits
45
Commits
No files matched your search
@@ -590,6 +590,64 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-12-02
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Docling-Serve [@MickLesk](https://github.com/MickLesk) ([#19237](https://github.com/community-scripts/ProxmoxVE/pull/19237))
|
||||
- Kopia [@MickLesk](https://github.com/MickLesk) ([#19238](https://github.com/community-scripts/ProxmoxVE/pull/19238))
|
||||
|
||||
## 2026-12-01
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- XWiki [@freakms](https://github.com/freakms) ([#19239](https://github.com/community-scripts/ProxmoxVE/pull/19239))
|
||||
- OpenWA [@MickLesk](https://github.com/MickLesk) ([#19236](https://github.com/community-scripts/ProxmoxVE/pull/19236))
|
||||
- Alexandrie [@MickLesk](https://github.com/MickLesk) ([#19240](https://github.com/community-scripts/ProxmoxVE/pull/19240))
|
||||
- NetBird Server VM ([#19215](https://github.com/community-scripts/ProxmoxVE/pull/19215))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 💥 Breaking Changes
|
||||
|
||||
- DroppedNeedle: build and update the Rust v3 [@MickLesk](https://github.com/MickLesk) ([#18735](https://github.com/community-scripts/ProxmoxVE/pull/18735))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- VM's: let a Cloud-Init VM be reached by SSH key only [@MickLesk](https://github.com/MickLesk) ([core#328](https://github.com/community-scripts/core/pull/328))
|
||||
|
||||
## 2026-11-30
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Warpgate [@MickLesk](https://github.com/MickLesk) ([#19218](https://github.com/community-scripts/ProxmoxVE/pull/19218))
|
||||
- Obico [@a55uka](https://github.com/a55uka) ([#19217](https://github.com/community-scripts/ProxmoxVE/pull/19217))
|
||||
- agentgateway [@andy-vdg](https://github.com/andy-vdg) ([#19216](https://github.com/community-scripts/ProxmoxVE/pull/19216))
|
||||
- Roundcube [@MickLesk](https://github.com/MickLesk) ([#19214](https://github.com/community-scripts/ProxmoxVE/pull/19214))
|
||||
- Langfuse [@steveonjava](https://github.com/steveonjava) ([#19144](https://github.com/community-scripts/ProxmoxVE/pull/19144))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Fix/bookorbit build [@johanngrobe](https://github.com/johanngrobe) ([#19227](https://github.com/community-scripts/ProxmoxVE/pull/19227))
|
||||
- Mealie: set backend __version__ on bare-metal install/update [@rtreichl](https://github.com/rtreichl) ([#19229](https://github.com/community-scripts/ProxmoxVE/pull/19229))
|
||||
- Kan: build and run the API service [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#19207](https://github.com/community-scripts/ProxmoxVE/pull/19207))
|
||||
- speedtest-tracker: install cron for the scheduler [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#19209](https://github.com/community-scripts/ProxmoxVE/pull/19209))
|
||||
- VMs: allocate the EFI disk through vm_alloc_efi_disk [@MickLesk](https://github.com/MickLesk) ([#19206](https://github.com/community-scripts/ProxmoxVE/pull/19206))
|
||||
- Authelia: drop the base_settings call before variables [@MickLesk](https://github.com/MickLesk) ([#19180](https://github.com/community-scripts/ProxmoxVE/pull/19180))
|
||||
- koillection: bump PHP from 8.5 to 8.6 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#19200](https://github.com/community-scripts/ProxmoxVE/pull/19200))
|
||||
- nocobase: bump Node.js from 22 to 24 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#19194](https://github.com/community-scripts/ProxmoxVE/pull/19194))
|
||||
- formbricks: bump Node.js from 24 to 26 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#19193](https://github.com/community-scripts/ProxmoxVE/pull/19193))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Frigate: install without the Intel media driver when Intel's repository is unreachable [@MickLesk](https://github.com/MickLesk) ([#19063](https://github.com/community-scripts/ProxmoxVE/pull/19063))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- vm_alloc_efi_disk: pass a failed qm set on | Let Proxmox allocate and initialize the VM EFI disk [@MickLesk](https://github.com/MickLesk) ([core#327](https://github.com/community-scripts/core/pull/327))
|
||||
|
||||
## 2026-11-29
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: andy-vdg
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://agentgateway.dev/
|
||||
|
||||
APP="agentgateway"
|
||||
var_tags="${var_tags:-ai;proxy;mcp}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-2}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /etc/agentgateway/config.yaml ]]; then
|
||||
msg_error "No agentgateway Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "agentgateway" "agentgateway/agentgateway"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop agentgateway
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
create_backup /etc/agentgateway /opt/agentgateway_data
|
||||
|
||||
fetch_and_deploy_gh_release "agentgateway" "agentgateway/agentgateway" "singlefile" "latest" "/opt/agentgateway" "agentgateway-linux-$(arch_resolve "amd64" "arm64")"
|
||||
|
||||
restore_backup
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start agentgateway
|
||||
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 "${GATEWAY}${BGN}http://${IP}:4000/ui${CL}"
|
||||
@@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Smaug6739/Alexandrie
|
||||
|
||||
APP="Alexandrie"
|
||||
var_tags="${var_tags:-notes;markdown;knowledge-base}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-6}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
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/alexandrie ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "rustfs" "rustfs/rustfs"; then
|
||||
msg_info "Stopping RustFS"
|
||||
systemctl stop alexandrie-backend rustfs
|
||||
msg_ok "Stopped RustFS"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rustfs" "rustfs/rustfs" "prebuild" "latest" "/opt/rustfs" "rustfs-linux-$(arch_resolve x86_64 aarch64)-gnu-*.zip"
|
||||
chmod +x /opt/rustfs/rustfs
|
||||
|
||||
msg_info "Starting RustFS"
|
||||
systemctl start rustfs alexandrie-backend
|
||||
msg_ok "Started RustFS"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "alexandrie" "Smaug6739/Alexandrie"; then
|
||||
msg_info "Stopping Alexandrie"
|
||||
systemctl stop alexandrie-frontend alexandrie-backend
|
||||
msg_ok "Stopped Alexandrie"
|
||||
|
||||
setup_go
|
||||
NODE_VERSION="24" NODE_MODULE="bun" setup_nodejs
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "alexandrie" "Smaug6739/Alexandrie" "tarball"
|
||||
|
||||
msg_info "Building Alexandrie"
|
||||
cd /opt/alexandrie/backend
|
||||
CGO_ENABLED=0 $STD go build -o alexandrie .
|
||||
$STD go clean -cache -modcache
|
||||
cd /opt/alexandrie/frontend
|
||||
$STD bun install --frozen-lockfile
|
||||
NODE_ENV=production $STD bun run build
|
||||
rm -rf node_modules .nuxt ~/.bun/install/cache
|
||||
msg_ok "Built Alexandrie"
|
||||
|
||||
msg_info "Starting Alexandrie"
|
||||
systemctl start alexandrie-backend alexandrie-frontend
|
||||
msg_ok "Started Alexandrie"
|
||||
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 "${GATEWAY}${BGN}http://${IP}${CL}"
|
||||
@@ -17,8 +17,6 @@ var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
base_settings
|
||||
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
@@ -48,6 +48,7 @@ function update_script() {
|
||||
|
||||
$STD corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm --filter @bookorbit/types run build
|
||||
# vite's bundler (rolldown) crashes at random on some builds, rolldown#10860.
|
||||
for attempt in 1 2 3; do
|
||||
$STD pnpm --filter client run build-only && break
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/docling-project/docling-serve
|
||||
|
||||
APP="Docling-Serve"
|
||||
var_tags="${var_tags:-ai;documents;ocr}"
|
||||
var_cpu="${var_cpu:-4}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_docling_api_key="${var_docling_api_key:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/docling-serve ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "docling-serve" "docling-project/docling-serve"; then
|
||||
msg_info "Stopping Docling Serve"
|
||||
systemctl stop docling-serve
|
||||
msg_ok "Stopped Docling Serve"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
msg_info "Updating Docling Serve"
|
||||
$STD uv pip install --upgrade --python /opt/docling-serve/.venv/bin/python --torch-backend cpu "docling-serve[rapidocr,tesserocr]==${CHECK_UPDATE_RELEASE#v}"
|
||||
cat <<EOF >~/.docling-serve
|
||||
${CHECK_UPDATE_RELEASE#v}
|
||||
EOF
|
||||
msg_ok "Updated Docling Serve"
|
||||
|
||||
msg_info "Updating Docling Models"
|
||||
$STD /opt/docling-serve/.venv/bin/docling-tools models download -o /opt/docling-serve_data/models layout tableformer picture_classifier rapidocr
|
||||
msg_ok "Updated Docling Models"
|
||||
|
||||
msg_info "Starting Docling Serve"
|
||||
systemctl start docling-serve
|
||||
msg_ok "Started Docling Serve"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:5001${CL}"
|
||||
echo -e "${INFO}${YW}The API key is DOCLING_SERVE_API_KEY in /opt/docling-serve_data/.env${CL}"
|
||||
+36
-69
@@ -35,52 +35,46 @@ function update_script() {
|
||||
[[ -d /opt/musicseerr ]] && MIGRATING=true
|
||||
|
||||
if [[ "$MIGRATING" == "true" ]] || check_for_gh_release "droppedneedle" "DroppedNeedle/DroppedNeedle"; then
|
||||
FROM_V2=false
|
||||
[[ "$MIGRATING" == "true" || -d /opt/droppedneedle/venv ]] && FROM_V2=true
|
||||
OLD_VERSION="$(cat ~/.droppedneedle 2>/dev/null || true)"
|
||||
|
||||
if [[ "$MIGRATING" == "true" ]]; then
|
||||
msg_warn "Migrating Musicseerr to DroppedNeedle"
|
||||
msg_info "Stopping Musicseerr Service"
|
||||
systemctl disable -q --now musicseerr
|
||||
msg_ok "Stopped Musicseerr Service"
|
||||
DATA_DIR="/opt/musicseerr/backend"
|
||||
else
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop droppedneedle
|
||||
msg_ok "Stopped Service"
|
||||
DATA_DIR="/opt/droppedneedle/backend"
|
||||
fi
|
||||
|
||||
create_backup "$DATA_DIR/config" "$DATA_DIR/cache"
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "droppedneedle" "DroppedNeedle/DroppedNeedle" "tarball"
|
||||
NODE_VERSION="25" NODE_MODULE="pnpm@10.33.0" setup_nodejs
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd /opt/droppedneedle/frontend
|
||||
export NODE_OPTIONS="--max-old-space-size=3072"
|
||||
rm -rf node_modules build
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm run build
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Updating Application"
|
||||
mkdir -p /opt/droppedneedle/backend/config /opt/droppedneedle/backend/cache
|
||||
$STD uv venv --clear /opt/droppedneedle/venv
|
||||
$STD uv pip install -r /opt/droppedneedle/backend/requirements.txt --python=/opt/droppedneedle/venv/bin/python
|
||||
rm -rf /opt/droppedneedle/backend/static
|
||||
cp -r /opt/droppedneedle/frontend/build /opt/droppedneedle/backend/static
|
||||
msg_ok "Updated Application"
|
||||
|
||||
restore_backup
|
||||
ensure_dependencies ffmpeg python3
|
||||
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="backend/config backend/cache backend/plugins backend/imports frontend" fetch_and_deploy_gh_release "droppedneedle" "DroppedNeedle/DroppedNeedle" "prebuild" "latest" "/opt/droppedneedle" "droppedneedle-v*-$(arch_resolve x86_64 aarch64)-linux.tar.gz" &&
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "droppedneedle-frontend" "DroppedNeedle/DroppedNeedle" "prebuild" "latest" "/opt/droppedneedle/frontend" "droppedneedle-frontend-v*.tar.gz" || {
|
||||
echo "$OLD_VERSION" >~/.droppedneedle
|
||||
msg_error "Download failed; the old version stays recorded, run update again"
|
||||
exit 1
|
||||
}
|
||||
rm -f /usr/local/bin/droppedneedle /usr/local/bin/droppedneedle-tool
|
||||
|
||||
if [[ "$MIGRATING" == "true" ]]; then
|
||||
msg_info "Migrating Musicseerr Data"
|
||||
rm -rf /opt/droppedneedle/backend/config /opt/droppedneedle/backend/cache
|
||||
mkdir -p /opt/droppedneedle/backend
|
||||
cp -a /opt/musicseerr/backend/config /opt/droppedneedle/backend/config
|
||||
cp -a /opt/musicseerr/backend/cache /opt/droppedneedle/backend/cache
|
||||
rm -f /etc/systemd/system/musicseerr.service
|
||||
sed -i 's/musicseerr/droppedneedle/g' /bin/update
|
||||
rm -rf /opt/musicseerr
|
||||
msg_ok "Migrated Musicseerr Data"
|
||||
fi
|
||||
mkdir -p /opt/droppedneedle/backend/{config,cache,plugins,imports}
|
||||
|
||||
msg_info "Replacing systemd Service"
|
||||
cat <<EOF >/etc/systemd/system/droppedneedle.service
|
||||
msg_info "Writing systemd Service"
|
||||
SLSKD_LINE="$(grep -s '^Environment=SLSKD_DOWNLOADS_PATH=' /etc/systemd/system/droppedneedle.service || echo '# Environment=SLSKD_DOWNLOADS_PATH=<path-to-slskd-downloads>')"
|
||||
cat <<EOF >/etc/systemd/system/droppedneedle.service
|
||||
[Unit]
|
||||
Description=DroppedNeedle Service
|
||||
After=network.target
|
||||
@@ -90,59 +84,32 @@ Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/droppedneedle/backend
|
||||
Environment=ROOT_APP_DIR=/opt/droppedneedle/backend
|
||||
Environment=DROPPEDNEEDLE_STATIC_DIR=/opt/droppedneedle/frontend/static
|
||||
Environment=PORT=8688
|
||||
Environment=COMMIT_TAG=v$(<~/.droppedneedle)
|
||||
# Environment=SLSKD_DOWNLOADS_PATH=<path-to-slskd-downloads>
|
||||
ExecStart=/opt/droppedneedle/venv/bin/python -m maintenance.automatic_upgrade --start-target
|
||||
Environment=TZ=$(cat /etc/timezone 2>/dev/null || echo Etc/UTC)
|
||||
${SLSKD_LINE}
|
||||
ExecStart=/opt/droppedneedle/droppedneedle
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
rm -f /etc/systemd/system/musicseerr.service
|
||||
msg_ok "Replaced systemd Service"
|
||||
else
|
||||
if ! grep -q 'SLSKD' /etc/systemd/system/droppedneedle.service; then
|
||||
sed -i '\|=8688$|a# Environment=SLSKD_DOWNLOADS_PATH=<path-to-slskd-downloads>' /etc/systemd/system/droppedneedle.service
|
||||
fi
|
||||
sed -i 's|^ExecStart=.*|ExecStart=/opt/droppedneedle/venv/bin/python -m maintenance.automatic_upgrade --start-target|' /etc/systemd/system/droppedneedle.service
|
||||
if grep -q '^Environment=COMMIT_TAG=' /etc/systemd/system/droppedneedle.service; then
|
||||
sed -i "s|^Environment=COMMIT_TAG=.*|Environment=COMMIT_TAG=v$(<~/.droppedneedle)|" /etc/systemd/system/droppedneedle.service
|
||||
else
|
||||
sed -i "\|=8688$|a Environment=COMMIT_TAG=v$(<~/.droppedneedle)" /etc/systemd/system/droppedneedle.service
|
||||
fi
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
if [[ "$MIGRATING" == "true" ]]; then
|
||||
msg_info "Enabling DroppedNeedle Service"
|
||||
systemctl enable -q --now droppedneedle
|
||||
msg_ok "Enabled DroppedNeedle Service"
|
||||
systemctl enable -q droppedneedle
|
||||
msg_ok "Wrote systemd Service"
|
||||
|
||||
sed -i 's/musicseerr/droppedneedle/g' /bin/update
|
||||
rm -rf /opt/musicseerr
|
||||
|
||||
msg_info "Waiting up to 1min for backend to boot and retrieve Admin Username"
|
||||
for i in {1..30}; do
|
||||
username=$(/opt/droppedneedle/venv/bin/python -c 'import sqlite3; conn = sqlite3.connect("/opt/droppedneedle/backend/cache/library.db"); c = conn.cursor(); c.execute("SELECT username FROM auth_users WHERE role=\"admin\""); admin=c.fetchone(); print(admin[0]) if (admin and admin[0]) else None' 2>/dev/null || true)
|
||||
if [[ -n "$username" ]]; then
|
||||
break
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
if [[ -n "$username" ]]; then
|
||||
msg_ok "Admin Username retrieved (Admin Username is: ${username})"
|
||||
else
|
||||
msg_warn "Failed to retrieve Admin Username. The backend might still be starting."
|
||||
fi
|
||||
msg_ok "Migrated successfully!"
|
||||
else
|
||||
msg_info "Starting Service"
|
||||
systemctl start droppedneedle
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
rm -rf /opt/droppedneedle/venv
|
||||
msg_info "Starting Service"
|
||||
systemctl start droppedneedle
|
||||
msg_ok "Started Service"
|
||||
if [[ "$FROM_V2" == "true" ]]; then
|
||||
msg_warn "DroppedNeedle 3 needs a one-time upgrade of the v2 data: open http://${LOCAL_IP}:8688 and sign in with a v2 admin."
|
||||
msg_warn "Before pressing Upgrade: single sign-on and Spotify callback URLs move from /api/v1 to /api/v3. See docs/upgrading-from-v2.md upstream."
|
||||
msg_warn "No v2 admin with a password? The one-time sign-in code is in: journalctl -u droppedneedle | grep 'upgrade sign-in code'"
|
||||
fi
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ function update_script() {
|
||||
msg_ok "Stopped Formbricks"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "formbricks" "formbricks/formbricks" "tarball"
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@$(jq -r '.packageManager | split("@")[1]' /opt/formbricks/package.json)" setup_nodejs
|
||||
NODE_VERSION="26" NODE_MODULE="pnpm@$(jq -r '.packageManager | split("@")[1]' /opt/formbricks/package.json)" setup_nodejs
|
||||
|
||||
msg_info "Building Formbricks (Patience)"
|
||||
cd /opt/formbricks
|
||||
|
||||
@@ -31,12 +31,41 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ ! -f /etc/systemd/system/kan-api.service ]]; then
|
||||
msg_info "Creating API Service"
|
||||
cat <<EOF >/etc/systemd/system/kan-api.service
|
||||
[Unit]
|
||||
Description=Kan API
|
||||
After=network.target postgresql.service
|
||||
Requires=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/kan/apps/api/dist
|
||||
EnvironmentFile=/opt/kan/.env
|
||||
ExecStart=/usr/bin/node main.mjs
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
if [[ -f /opt/kan/apps/api/build.mjs ]]; then
|
||||
cd /opt/kan/apps/api
|
||||
$STD node build.mjs
|
||||
systemctl enable -q --now kan-api
|
||||
fi
|
||||
msg_ok "Created API Service"
|
||||
fi
|
||||
|
||||
if check_for_gh_tag "kan" "kanbn/kan"; then
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
|
||||
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop kan
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop kan kan-api
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
create_backup /opt/kan/.env
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_tag "kan" "kanbn/kan" "latest"
|
||||
@@ -50,6 +79,8 @@ function update_script() {
|
||||
export CI=true
|
||||
find /opt/kan/packages /opt/kan/apps -name 'tsconfig.json' -exec sed -i 's|"@kan/tsconfig/|"../../tooling/typescript/|g' {} +
|
||||
$STD pnpm build --filter=@kan/web
|
||||
cd /opt/kan/apps/api
|
||||
$STD node build.mjs
|
||||
unset NEXT_PUBLIC_USE_STANDALONE_OUTPUT CI
|
||||
msg_ok "Built Application"
|
||||
|
||||
@@ -64,9 +95,10 @@ function update_script() {
|
||||
$STD pnpm exec drizzle-kit migrate
|
||||
msg_ok "Ran Database Migrations"
|
||||
|
||||
msg_info "Starting Service"
|
||||
msg_info "Starting Services"
|
||||
systemctl enable -q --now kan-api
|
||||
systemctl start kan
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Started Services"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ function update_script() {
|
||||
systemctl stop apache2
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
PHP_VERSION="8.5" PHP_APACHE="YES" setup_php
|
||||
PHP_VERSION="8.6" PHP_APACHE="YES" setup_php
|
||||
setup_composer
|
||||
|
||||
msg_info "Creating a backup"
|
||||
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/kopia/kopia
|
||||
|
||||
APP="Kopia"
|
||||
var_tags="${var_tags:-backup}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_kopia_password="${var_kopia_password:-}"
|
||||
export var_kopia_repo_password="${var_kopia_repo_password:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /opt/kopia_data/.env ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "kopia" "kopia/kopia"; then
|
||||
msg_info "Stopping Kopia"
|
||||
systemctl stop kopia
|
||||
msg_ok "Stopped Kopia"
|
||||
|
||||
fetch_and_deploy_gh_release "kopia" "kopia/kopia" "binary" "latest" "" "kopia_*_linux_$(arch_resolve "amd64" "arm64").deb"
|
||||
|
||||
msg_info "Starting Kopia"
|
||||
systemctl start kopia
|
||||
msg_ok "Started Kopia"
|
||||
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 "${GATEWAY}${BGN}https://${IP}:51515${CL}"
|
||||
echo -e "${INFO}${YW}Credentials are stored in /opt/kopia_data/.env${CL}"
|
||||
@@ -0,0 +1,95 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Stephen Chin (steveonjava)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/langfuse/langfuse
|
||||
|
||||
APP="Langfuse"
|
||||
var_tags="${var_tags:-ai;monitoring;analytics}"
|
||||
var_cpu="${var_cpu:-4}"
|
||||
var_ram="${var_ram:-16384}"
|
||||
var_disk="${var_disk:-100}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_admin_email="${var_admin_email:-}"
|
||||
export var_admin_pass="${var_admin_pass:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/langfuse || ! -f /opt/langfuse_data/.env ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "seaweedfs" "seaweedfs/seaweedfs"; then
|
||||
msg_info "Stopping SeaweedFS"
|
||||
systemctl stop langfuse-storage
|
||||
msg_ok "Stopped SeaweedFS"
|
||||
|
||||
fetch_and_deploy_gh_release "seaweedfs" "seaweedfs/seaweedfs" "prebuild" "latest" "/opt/seaweedfs" "linux_$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Starting SeaweedFS"
|
||||
systemctl start langfuse-storage
|
||||
$STD curl --retry 30 --retry-delay 2 --retry-connrefused -fsS http://127.0.0.1:8333/healthz
|
||||
msg_ok "Started SeaweedFS"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "migrate" "golang-migrate/migrate"; then
|
||||
fetch_and_deploy_gh_release "migrate" "golang-migrate/migrate" "binary"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "langfuse" "langfuse/langfuse"; then
|
||||
msg_warn "Take a container snapshot before updating Langfuse; database migrations cannot be rolled back by this script."
|
||||
msg_info "Stopping Langfuse"
|
||||
systemctl stop langfuse-web langfuse-worker
|
||||
msg_ok "Stopped Langfuse"
|
||||
|
||||
create_backup "$HOME/.langfuse"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "langfuse" "langfuse/langfuse" "tarball"
|
||||
restore_backup
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@$(jq -r '.engines.pnpm' /opt/langfuse/package.json)" setup_nodejs
|
||||
RUST_TOOLCHAIN="$(sed -n 's/^channel = "\(.*\)"/\1/p' /opt/langfuse/packages/native/rust-toolchain.toml)" RUST_PROFILE="minimal" setup_rust
|
||||
|
||||
msg_info "Building Langfuse"
|
||||
cd /opt/langfuse
|
||||
HUSKY=0 $STD pnpm install --frozen-lockfile
|
||||
DOCKER_BUILD=1 NEXT_TELEMETRY_DISABLED=1 CI=true pnpm_config_verify_deps_before_run=false $STD pnpm turbo run build --filter=web... --filter=worker... --concurrency=1
|
||||
cp -r web/.next/static web/.next/standalone/web/.next/
|
||||
cp -r web/public web/.next/standalone/web/
|
||||
msg_ok "Built Langfuse"
|
||||
|
||||
msg_info "Starting Langfuse"
|
||||
systemctl restart langfuse-migrate
|
||||
systemctl start langfuse-web langfuse-worker
|
||||
$STD curl --retry 60 --retry-delay 2 --retry-connrefused -fsS http://127.0.0.1:3000/api/public/ready
|
||||
$STD curl --retry 30 --retry-delay 2 --retry-connrefused -fsS http://127.0.0.1:3030/api/health
|
||||
cat <<EOF >"$HOME/.langfuse"
|
||||
$(jq -r '.version' /opt/langfuse/package.json)
|
||||
EOF
|
||||
msg_ok "Started Langfuse"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
@@ -94,6 +94,7 @@ EOF
|
||||
$STD sed -i "s|https://github.com/mealie-recipes/mealie/commit/|https://github.com/mealie-recipes/mealie/releases/tag/|g" "$SITE_SETTINGS"
|
||||
$STD sed -i "s|value: data.buildId,|value: \"v${MEALIE_VERSION}\",|g" "$SITE_SETTINGS"
|
||||
$STD sed -i "s|value: data.production ? i18n.t(\"about.production\") : i18n.t(\"about.development\"),|value: \"bare-metal\",|g" "$SITE_SETTINGS"
|
||||
$STD sed -i "s|^__version__ = .*|__version__ = \"${MEALIE_VERSION}\"|" /opt/mealie/mealie/__init__.py
|
||||
export NUXT_TELEMETRY_DISABLED=1
|
||||
cd /opt/mealie/frontend
|
||||
if [[ "${FRONTEND_PKG}" == "pnpm" ]]; then
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
||||
|
||||
msg_info "Stopping NocoBase"
|
||||
systemctl stop nocobase
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: a55uka (a55uka)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/TheSpaghettiDetective/obico-server
|
||||
|
||||
APP="Obico"
|
||||
var_tags="${var_tags:-3d-printing;monitoring;ai}"
|
||||
var_cpu="${var_cpu:-4}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-15}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}" # arm64 verified: CI install + health check passed
|
||||
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/obico ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_branch "obico" "TheSpaghettiDetective/obico-server" "release"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop obico-tasks obico-web obico-ml-api
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
create_backup /opt/obico/.env
|
||||
|
||||
fetch_and_deploy_gh_branch "obico" "TheSpaghettiDetective/obico-server" "release" "/opt/obico"
|
||||
sed -i "s/^VERSION=.*/VERSION=$(cat ~/.obico)/" /opt/obico/.env
|
||||
|
||||
MOONRAKER_SHA=$(grep -oP 'checkout \K[a-f0-9]{40}' /opt/obico/backend/Dockerfile.base)
|
||||
if [[ -n "$MOONRAKER_SHA" && "$(git -C /opt/moonraker rev-parse HEAD 2>/dev/null)" != "$MOONRAKER_SHA" ]]; then
|
||||
msg_info "Updating Moonraker Metadata Library"
|
||||
[[ -d /opt/moonraker/.git ]] || $STD git clone https://github.com/Arksine/moonraker.git /opt/moonraker
|
||||
$STD git -C /opt/moonraker fetch --depth 1 origin "$MOONRAKER_SHA"
|
||||
$STD git -C /opt/moonraker checkout "$MOONRAKER_SHA"
|
||||
msg_ok "Updated Moonraker Metadata Library"
|
||||
fi
|
||||
|
||||
IMPORTLIB_METADATA_PIN=$(grep -oP 'importlib_metadata==\K[0-9.]+' /opt/obico/backend/Dockerfile.base)
|
||||
msg_info "Updating Python Environments"
|
||||
cd /opt/obico/backend
|
||||
$STD uv pip install -p .venv/bin/python -r requirements.txt
|
||||
$STD uv pip install -p .venv/bin/python "importlib_metadata==${IMPORTLIB_METADATA_PIN}"
|
||||
cd /opt/obico/ml_api
|
||||
$STD uv pip install -p .venv/bin/python -r requirements.txt onnxruntime opencv-python-headless
|
||||
msg_ok "Updated Python Environments"
|
||||
|
||||
if [[ "$(tr -d '\r' </opt/obico/ml_api/model/model-weights.onnx.sha256)" != "$(sha256sum /model_cache/ml_api/onnx/model-weights.onnx | cut -d' ' -f1)" ]]; then
|
||||
msg_info "Downloading Failure Detection Model"
|
||||
bash /opt/obico/ml_api/scripts/fetch_verified.sh "$(tr -d '\r' </opt/obico/ml_api/model/model-weights.onnx.url)" /model_cache/ml_api/onnx/model-weights.onnx 50000000 "$(tr -d '\r' </opt/obico/ml_api/model/model-weights.onnx.sha256)"
|
||||
msg_ok "Downloaded Failure Detection Model"
|
||||
fi
|
||||
|
||||
msg_info "Running Database Migrations"
|
||||
set -a
|
||||
source /opt/obico/.env
|
||||
set +a
|
||||
cd /opt/obico/backend
|
||||
$STD .venv/bin/python manage.py migrate --noinput
|
||||
$STD .venv/bin/python manage.py collectstatic --noinput
|
||||
msg_ok "Ran Database Migrations"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start obico-ml-api obico-web obico-tasks
|
||||
msg_ok "Started Services"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:3334${CL}"
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/rmyndharis/OpenWA
|
||||
|
||||
APP="OpenWA"
|
||||
var_tags="${var_tags:-whatsapp;messaging;api}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-6}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_api_key="${var_api_key:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
if [[ -n "$var_api_key" && ${#var_api_key} -lt 32 ]]; then
|
||||
msg_error "var_api_key must be at least 32 characters long."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/openwa ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "openwa" "rmyndharis/OpenWA"; then
|
||||
msg_info "Stopping OpenWA"
|
||||
systemctl stop openwa
|
||||
msg_ok "Stopped OpenWA"
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "openwa" "rmyndharis/OpenWA" "tarball"
|
||||
|
||||
msg_info "Building OpenWA"
|
||||
cd /opt/openwa
|
||||
export PUPPETEER_SKIP_DOWNLOAD=true
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
$STD npm run dashboard:build
|
||||
$STD npm prune --omit=dev
|
||||
rm -rf dashboard/node_modules ~/.npm
|
||||
msg_ok "Built OpenWA"
|
||||
|
||||
msg_info "Starting OpenWA"
|
||||
systemctl start openwa
|
||||
msg_ok "Started OpenWA"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:2785${CL}"
|
||||
echo -e "${INFO}${YW}Admin API key: API_MASTER_KEY in /opt/openwa_data/.env${CL}"
|
||||
+1
-23
@@ -30,29 +30,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
setup_mariadb
|
||||
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
|
||||
|
||||
if [[ "$CURRENT_PHP" != "8.4" ]]; then
|
||||
msg_info "Migrating PHP $CURRENT_PHP to 8.4"
|
||||
$STD curl -fsSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
|
||||
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
|
||||
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
|
||||
cat <<EOF >/etc/apt/sources.list.d/php.sources
|
||||
Types: deb
|
||||
URIs: https://packages.sury.org/php/
|
||||
Suites: $(lsb_release -sc)
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/deb.sury.org-php.gpg
|
||||
EOF
|
||||
apt_update_safe
|
||||
$STD apt remove -y php"${CURRENT_PHP//./}"*
|
||||
$STD apt install -y \
|
||||
php8.4 \
|
||||
php8.4-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl,fpm} \
|
||||
libapache2-mod-php8.4
|
||||
|
||||
msg_ok "Migrated PHP $CURRENT_PHP to 8.4"
|
||||
fi
|
||||
PHP_VERSION="8.4" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="mysql" setup_php
|
||||
|
||||
if [[ -f /opt/${APP}_version.txt ]]; then
|
||||
mv /opt/"${APP}_version.txt" ~/.pterodactyl-panel
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/roundcube/roundcubemail
|
||||
|
||||
APP="Roundcube"
|
||||
var_tags="${var_tags:-mail;webmail}"
|
||||
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_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_imap_host="${var_imap_host:-}"
|
||||
export var_smtp_host="${var_smtp_host:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/roundcube ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "roundcube" "roundcube/roundcubemail"; then
|
||||
msg_info "Stopping Roundcube"
|
||||
systemctl stop nginx
|
||||
msg_ok "Stopped Roundcube"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "roundcube" "roundcube/roundcubemail" "prebuild" "latest" "/opt/roundcube_update" "roundcubemail-*-complete.tar.gz"
|
||||
|
||||
msg_info "Updating Roundcube"
|
||||
$STD php /opt/roundcube_update/bin/installto.sh -y /opt/roundcube
|
||||
rm -rf /opt/roundcube_update
|
||||
chown -R www-data:www-data /opt/roundcube /opt/roundcube_data
|
||||
msg_ok "Updated Roundcube"
|
||||
|
||||
msg_info "Starting Roundcube"
|
||||
systemctl start nginx
|
||||
msg_ok "Started Roundcube"
|
||||
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 "${GATEWAY}${BGN}http://${IP}${CL}"
|
||||
@@ -31,6 +31,8 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
ensure_dependencies cron
|
||||
|
||||
if check_for_gh_release "speedtest-tracker" "alexjustesen/speedtest-tracker"; then
|
||||
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
|
||||
setup_composer
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/warp-tech/warpgate
|
||||
|
||||
APP="Warpgate"
|
||||
var_tags="${var_tags:-bastion;ssh;security}"
|
||||
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_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_admin_pass="${var_admin_pass:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /opt/warpgate/warpgate ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "warpgate" "warp-tech/warpgate"; then
|
||||
msg_info "Stopping Warpgate"
|
||||
systemctl stop warpgate
|
||||
msg_ok "Stopped Warpgate"
|
||||
|
||||
fetch_and_deploy_gh_release "warpgate" "warp-tech/warpgate" "singlefile" "latest" "/opt/warpgate" "warpgate-v*-$(arch_resolve "x86_64" "arm64")-linux"
|
||||
|
||||
msg_info "Starting Warpgate"
|
||||
systemctl start warpgate
|
||||
msg_ok "Started Warpgate"
|
||||
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 "${GATEWAY}${BGN}https://${IP}:8888/@warpgate${CL}"
|
||||
echo -e "${INFO}${YW}Admin login: admin, password in /opt/warpgate_data/.env (inside the container)${CL}"
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: freakms
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.xwiki.org
|
||||
|
||||
APP="XWiki"
|
||||
var_tags="${var_tags:-wiki}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-4096}"
|
||||
var_disk="${var_disk:-16}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
var_arm64="${var_arm64:-no}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /etc/xwiki/xwiki.cfg ]]; then
|
||||
msg_error "No XWiki Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
apt_update_safe
|
||||
if ! apt list --upgradable 2>/dev/null | grep -q '^xwiki-'; then
|
||||
msg_ok "XWiki is already up to date"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo
|
||||
msg_warn "The package update may include config file changes."
|
||||
echo -e "${TAB}${YW}How do you want to handle /etc/xwiki?${CL}"
|
||||
echo -e "${TAB} 1) Keep your current config"
|
||||
echo -e "${TAB} 2) Install the new package maintainer's config"
|
||||
if [[ "${PHS_SILENT:-0}" == "1" ]]; then
|
||||
CONFIG_CHOICE="1"
|
||||
else
|
||||
read -rp " Choose [1/2] (default: 1): " -t 60 CONFIG_CHOICE || CONFIG_CHOICE="1"
|
||||
fi
|
||||
[[ -z "$CONFIG_CHOICE" ]] && CONFIG_CHOICE="1"
|
||||
|
||||
msg_info "Stopping XWiki"
|
||||
systemctl stop tomcat10
|
||||
msg_ok "Stopped XWiki"
|
||||
|
||||
if [[ "$CONFIG_CHOICE" == "2" ]]; then
|
||||
BACKUP_DIR="/opt/xwiki_config_$(date +%Y%m%d%H%M)" create_backup /etc/xwiki
|
||||
DPKG_CONF_OPT="--force-confnew"
|
||||
else
|
||||
create_backup /etc/xwiki
|
||||
DPKG_CONF_OPT="--force-confold"
|
||||
fi
|
||||
|
||||
msg_info "Updating XWiki"
|
||||
$STD apt install -y --only-upgrade -o Dpkg::Options::="$DPKG_CONF_OPT" \
|
||||
xwiki-common xwiki-pgsql-common xwiki-tomcat10-common xwiki-tomcat10-pgsql
|
||||
msg_ok "Updated XWiki"
|
||||
|
||||
if [[ "$CONFIG_CHOICE" == "2" ]]; then
|
||||
msg_warn "New package config installed. Your previous config is in /opt/xwiki_config_*/files/etc/xwiki"
|
||||
else
|
||||
restore_backup
|
||||
fi
|
||||
|
||||
msg_info "Starting XWiki"
|
||||
systemctl start tomcat10
|
||||
msg_ok "Started XWiki"
|
||||
msg_ok "Updated successfully!"
|
||||
exit 0
|
||||
}
|
||||
|
||||
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}:8080/xwiki${CL}"
|
||||
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: andy-vdg
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://agentgateway.dev/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "agentgateway" "agentgateway/agentgateway" "singlefile" "latest" "/opt/agentgateway" "agentgateway-linux-$(arch_resolve "amd64" "arm64")"
|
||||
|
||||
msg_info "Configuring agentgateway"
|
||||
mkdir -p /etc/agentgateway /opt/agentgateway_data
|
||||
cat <<EOF >/etc/agentgateway/config.yaml
|
||||
# yaml-language-server: \$schema=https://agentgateway.dev/schema/config
|
||||
# The config agentgateway bootstraps on first run: traffic and the UI on port 4000,
|
||||
# state in SQLite. The UI has no login until you add policies:
|
||||
# https://agentgateway.dev/docs/standalone/latest/documentation/setup/ui/secure-ui/
|
||||
config:
|
||||
database:
|
||||
url: sqlite:///opt/agentgateway_data/data.db
|
||||
gateways:
|
||||
default:
|
||||
port: 4000
|
||||
ui:
|
||||
gateways: default
|
||||
EOF
|
||||
chmod 600 /etc/agentgateway/config.yaml
|
||||
msg_ok "Configured agentgateway"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/agentgateway.service
|
||||
[Unit]
|
||||
Description=agentgateway
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
ExecStart=/opt/agentgateway/agentgateway -f /etc/agentgateway/config.yaml
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now agentgateway
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,182 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/Smaug6739/Alexandrie
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_go
|
||||
NODE_VERSION="24" NODE_MODULE="bun" setup_nodejs
|
||||
setup_mariadb
|
||||
MARIADB_DB_NAME="alexandrie" MARIADB_DB_USER="alexandrie" MARIADB_DB_CREDS_FILE="/dev/null" setup_mariadb_db
|
||||
|
||||
fetch_and_deploy_gh_release "rustfs" "rustfs/rustfs" "prebuild" "latest" "/opt/rustfs" "rustfs-linux-$(arch_resolve x86_64 aarch64)-gnu-*.zip"
|
||||
chmod +x /opt/rustfs/rustfs
|
||||
fetch_and_deploy_gh_release "alexandrie" "Smaug6739/Alexandrie" "tarball"
|
||||
|
||||
msg_info "Building Alexandrie Backend"
|
||||
cd /opt/alexandrie/backend
|
||||
CGO_ENABLED=0 $STD go build -o alexandrie .
|
||||
$STD go clean -cache -modcache
|
||||
msg_ok "Built Alexandrie Backend"
|
||||
|
||||
msg_info "Building Alexandrie Frontend"
|
||||
cd /opt/alexandrie/frontend
|
||||
$STD bun install --frozen-lockfile
|
||||
NODE_ENV=production $STD bun run build
|
||||
rm -rf node_modules .nuxt ~/.bun/install/cache
|
||||
msg_ok "Built Alexandrie Frontend"
|
||||
|
||||
msg_info "Configuring Alexandrie"
|
||||
mkdir -p /opt/alexandrie_data/storage
|
||||
S3_ACCESS_KEY=$(random_password 20)
|
||||
S3_SECRET_KEY=$(random_password 40)
|
||||
cat <<EOF >/opt/alexandrie_data/.env
|
||||
BACKEND_PORT=8201
|
||||
GIN_MODE=release
|
||||
JWT_SECRET=$(random_password 64)
|
||||
FRONTEND_URL=http://${LOCAL_IP}
|
||||
COOKIE_DOMAIN=
|
||||
ALLOW_UNSECURE=true
|
||||
CONFIG_DISABLE_SIGNUP=false
|
||||
CONFIG_DISABLE_NATIVE_LOGIN=false
|
||||
|
||||
DATABASE_HOST=127.0.0.1
|
||||
DATABASE_PORT=3306
|
||||
DATABASE_NAME=${MARIADB_DB_NAME}
|
||||
DATABASE_USER=${MARIADB_DB_USER}
|
||||
DATABASE_PASSWORD=${MARIADB_DB_PASS}
|
||||
|
||||
MINIO_ENDPOINT=127.0.0.1:9000
|
||||
MINIO_PUBLIC_URL=http://${LOCAL_IP}
|
||||
MINIO_SECURE=false
|
||||
MINIO_ACCESSKEY=${S3_ACCESS_KEY}
|
||||
MINIO_SECRETKEY=${S3_SECRET_KEY}
|
||||
MINIO_BUCKET=alexandrie
|
||||
|
||||
SMTP_HOST=
|
||||
SMTP_MAIL=
|
||||
SMTP_MAIL_FROM=
|
||||
SMTP_PASSWORD=
|
||||
|
||||
NUXT_PUBLIC_BASE_API=http://${LOCAL_IP}
|
||||
NUXT_PUBLIC_BASE_CDN=http://${LOCAL_IP}
|
||||
NUXT_PUBLIC_BASE_URL=http://${LOCAL_IP}
|
||||
NUXT_PUBLIC_CDN_ENDPOINT=/alexandrie/
|
||||
NUXT_PUBLIC_CONFIG_DISABLE_SIGNUP_PAGE=false
|
||||
NUXT_PUBLIC_CONFIG_DISABLE_LANDING_PAGE=false
|
||||
|
||||
RUSTFS_ACCESS_KEY=${S3_ACCESS_KEY}
|
||||
RUSTFS_SECRET_KEY=${S3_SECRET_KEY}
|
||||
RUSTFS_VOLUMES=/opt/alexandrie_data/storage
|
||||
RUSTFS_ADDRESS=127.0.0.1:9000
|
||||
RUSTFS_CONSOLE_ENABLE=false
|
||||
RUSTFS_OBS_LOGGER_LEVEL=error
|
||||
EOF
|
||||
chmod 600 /opt/alexandrie_data/.env
|
||||
cat <<EOF >/etc/nginx/sites-available/alexandrie
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
client_max_body_size 1G;
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8201;
|
||||
proxy_set_header Host \$host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||
}
|
||||
|
||||
location ~ ^/alexandrie(-backups)?/ {
|
||||
proxy_pass http://127.0.0.1:9000;
|
||||
proxy_set_header Host \$host;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8200;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host \$host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
nginx_enable_site "alexandrie"
|
||||
msg_ok "Configured Alexandrie"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/rustfs.service
|
||||
[Unit]
|
||||
Description=RustFS Object Storage for Alexandrie
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/alexandrie_data
|
||||
EnvironmentFile=/opt/alexandrie_data/.env
|
||||
ExecStart=/opt/rustfs/rustfs
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
LimitNOFILE=65536
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/alexandrie-backend.service
|
||||
[Unit]
|
||||
Description=Alexandrie Backend
|
||||
After=network-online.target mariadb.service rustfs.service
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/alexandrie/backend
|
||||
EnvironmentFile=/opt/alexandrie_data/.env
|
||||
ExecStart=/opt/alexandrie/backend/alexandrie
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/alexandrie-frontend.service
|
||||
[Unit]
|
||||
Description=Alexandrie Frontend
|
||||
After=network-online.target alexandrie-backend.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/alexandrie/frontend
|
||||
EnvironmentFile=/opt/alexandrie_data/.env
|
||||
Environment=NODE_ENV=production
|
||||
Environment=HOST=127.0.0.1
|
||||
Environment=PORT=8200
|
||||
ExecStart=/usr/bin/node .output/server/index.mjs
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now rustfs alexandrie-backend alexandrie-frontend
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -33,6 +33,7 @@ PNPM_VERSION=$(jq -r '.packageManager | ltrimstr("pnpm@")' /opt/bookorbit/packag
|
||||
|
||||
$STD corepack prepare "pnpm@${PNPM_VERSION}" --activate
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm --filter @bookorbit/types run build
|
||||
# vite's bundler (rolldown) crashes at random on some builds, rolldown#10860.
|
||||
for attempt in 1 2 3; do
|
||||
$STD pnpm --filter client run build-only && break
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/docling-project/docling-serve
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
if [[ "$(arch_resolve)" == "amd64" ]] && ! { grep -qw -m1 'sse4_2' /proc/cpuinfo && grep -qw -m1 'popcnt' /proc/cpuinfo; }; then
|
||||
msg_error "Docling's NumPy builds require an x86-64-v2 CPU with SSE4.2 and POPCNT (Intel Nehalem, AMD Bulldozer or newer), which this CPU does not have."
|
||||
exit 236
|
||||
fi
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
libgl1 \
|
||||
libglib2.0-0t64 \
|
||||
tesseract-ocr \
|
||||
tesseract-ocr-deu \
|
||||
tesseract-ocr-eng \
|
||||
tesseract-ocr-fra \
|
||||
tesseract-ocr-osd \
|
||||
tesseract-ocr-spa
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
check_for_gh_release "docling-serve" "docling-project/docling-serve" "${var_appversion:-}"
|
||||
|
||||
msg_info "Installing Docling Serve ${CHECK_UPDATE_RELEASE#v}"
|
||||
$STD uv venv --python 3.12 /opt/docling-serve/.venv
|
||||
$STD uv pip install --python /opt/docling-serve/.venv/bin/python --torch-backend cpu "docling-serve[rapidocr,tesserocr]==${CHECK_UPDATE_RELEASE#v}"
|
||||
cat <<EOF >~/.docling-serve
|
||||
${CHECK_UPDATE_RELEASE#v}
|
||||
EOF
|
||||
msg_ok "Installed Docling Serve ${CHECK_UPDATE_RELEASE#v}"
|
||||
|
||||
msg_info "Downloading Docling Models"
|
||||
$STD /opt/docling-serve/.venv/bin/docling-tools models download -o /opt/docling-serve_data/models layout tableformer picture_classifier rapidocr
|
||||
msg_ok "Downloaded Docling Models"
|
||||
|
||||
msg_info "Configuring Docling Serve"
|
||||
cat <<EOF >/opt/docling-serve_data/.env
|
||||
UVICORN_HOST=0.0.0.0
|
||||
UVICORN_PORT=5001
|
||||
DOCLING_SERVE_ENABLE_UI=true
|
||||
DOCLING_SERVE_ARTIFACTS_PATH=/opt/docling-serve_data/models
|
||||
DOCLING_SERVE_API_KEY=${var_docling_api_key:-$(random_password 32)}
|
||||
TESSDATA_PREFIX=/usr/share/tesseract-ocr/5/tessdata
|
||||
EOF
|
||||
chmod 600 /opt/docling-serve_data/.env
|
||||
msg_ok "Configured Docling Serve"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/docling-serve.service
|
||||
[Unit]
|
||||
Description=Docling Serve
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/docling-serve_data
|
||||
EnvironmentFile=/opt/docling-serve_data/.env
|
||||
ExecStart=/opt/docling-serve/.venv/bin/docling-serve run
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now docling-serve
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -13,24 +13,15 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
PYTHON_VERSION="3.13" setup_uv
|
||||
fetch_and_deploy_gh_release "droppedneedle" "DroppedNeedle/DroppedNeedle" "tarball"
|
||||
NODE_VERSION="25" NODE_MODULE="pnpm@10.33.0" setup_nodejs
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
ffmpeg \
|
||||
python3
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd /opt/droppedneedle/frontend
|
||||
export NODE_OPTIONS="--max-old-space-size=3072"
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm run build
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Setting up Application"
|
||||
mkdir -p /opt/droppedneedle/backend/config /opt/droppedneedle/backend/cache
|
||||
$STD uv venv /opt/droppedneedle/venv
|
||||
$STD uv pip install -r /opt/droppedneedle/backend/requirements.txt --python=/opt/droppedneedle/venv/bin/python
|
||||
rm -rf /opt/droppedneedle/backend/static
|
||||
cp -r /opt/droppedneedle/frontend/build /opt/droppedneedle/backend/static
|
||||
msg_ok "Set up Application"
|
||||
fetch_and_deploy_gh_release "droppedneedle" "DroppedNeedle/DroppedNeedle" "prebuild" "latest" "/opt/droppedneedle" "droppedneedle-v*-$(arch_resolve x86_64 aarch64)-linux.tar.gz"
|
||||
fetch_and_deploy_gh_release "droppedneedle-frontend" "DroppedNeedle/DroppedNeedle" "prebuild" "latest" "/opt/droppedneedle/frontend" "droppedneedle-frontend-v*.tar.gz"
|
||||
mkdir -p /opt/droppedneedle/backend/{config,cache,plugins,imports}
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/droppedneedle.service
|
||||
@@ -43,10 +34,12 @@ Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/droppedneedle/backend
|
||||
Environment=ROOT_APP_DIR=/opt/droppedneedle/backend
|
||||
Environment=DROPPEDNEEDLE_STATIC_DIR=/opt/droppedneedle/frontend/static
|
||||
Environment=PORT=8688
|
||||
Environment=COMMIT_TAG=v$(<~/.droppedneedle)
|
||||
Environment=TZ=$(cat /etc/timezone 2>/dev/null || echo Etc/UTC)
|
||||
# Environment=SLSKD_DOWNLOADS_PATH=<path-to-slskd-downloads>
|
||||
ExecStart=/opt/droppedneedle/venv/bin/python -m maintenance.automatic_upgrade --start-target
|
||||
ExecStart=/opt/droppedneedle/droppedneedle
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ PG_DB_NAME="spicedb" PG_DB_USER="spicedb" setup_postgresql_db
|
||||
|
||||
fetch_and_deploy_gh_release "spicedb" "authzed/spicedb" "binary"
|
||||
fetch_and_deploy_gh_release "formbricks" "formbricks/formbricks" "tarball"
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@$(jq -r '.packageManager | split("@")[1]' /opt/formbricks/package.json)" setup_nodejs
|
||||
NODE_VERSION="26" NODE_MODULE="pnpm@$(jq -r '.packageManager | split("@")[1]' /opt/formbricks/package.json)" setup_nodejs
|
||||
|
||||
msg_info "Building Formbricks (Patience)"
|
||||
cd /opt/formbricks
|
||||
|
||||
@@ -124,15 +124,18 @@ msg_ok "Built SQLite Extensions"
|
||||
|
||||
if [[ "$(arch_resolve)" == "amd64" ]]; then
|
||||
msg_info "Building Intel Media Driver (Patience)"
|
||||
download_gpg_key "https://repositories.intel.com/gpu/intel-graphics.key" "/usr/share/keyrings/intel-graphics.gpg" "dearmor"
|
||||
sed -i '/intel-graphics.key/d' /opt/frigate/docker/main/build_intel_media_driver.sh
|
||||
$STD bash /opt/frigate/docker/main/build_intel_media_driver.sh
|
||||
cp -a /rootfs/. /
|
||||
rm -rf /rootfs
|
||||
rm -f /etc/apt/sources.list.d/intel-gpu-jammy.list /usr/share/keyrings/intel-graphics.gpg
|
||||
apt_update_safe
|
||||
ldconfig
|
||||
msg_ok "Built Intel Media Driver"
|
||||
if download_gpg_key "https://repositories.intel.com/gpu/intel-graphics.key" "/usr/share/keyrings/intel-graphics.gpg" "dearmor"; then
|
||||
sed -i '/intel-graphics.key/d' /opt/frigate/docker/main/build_intel_media_driver.sh
|
||||
$STD bash /opt/frigate/docker/main/build_intel_media_driver.sh
|
||||
cp -a /rootfs/. /
|
||||
rm -rf /rootfs
|
||||
rm -f /etc/apt/sources.list.d/intel-gpu-jammy.list /usr/share/keyrings/intel-graphics.gpg
|
||||
apt_update_safe
|
||||
ldconfig
|
||||
msg_ok "Built Intel Media Driver"
|
||||
else
|
||||
msg_warn "Intel's package repository cannot be reached from this network; Frigate is installed without the Intel media driver"
|
||||
fi
|
||||
fi
|
||||
|
||||
fetch_and_deploy_gh_release "go2rtc" "AlexxIT/go2rtc" "singlefile" "v1.9.14" "/usr/local/go2rtc/bin" "go2rtc_linux_$(arch_resolve)"
|
||||
|
||||
+28
-5
@@ -34,9 +34,11 @@ BETTER_AUTH_TRUSTED_ORIGINS=http://${LOCAL_IP}:3000
|
||||
POSTGRES_URL=postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
|
||||
NEXT_PUBLIC_ALLOW_CREDENTIALS=true
|
||||
TRELLO_APP_API_KEY=
|
||||
TRELLO_APP_API_SECRET=
|
||||
TRELLO_APP_SECRET=
|
||||
HOSTNAME=0.0.0.0
|
||||
PORT=3000
|
||||
API_PORT=4000
|
||||
KAN_API_URL=http://127.0.0.1:4000
|
||||
NODE_ENV=production
|
||||
EOF
|
||||
msg_ok "Configured Application"
|
||||
@@ -49,6 +51,8 @@ $STD pnpm install --ignore-scripts --prod=false
|
||||
export CI=true
|
||||
find /opt/kan/packages /opt/kan/apps -name 'tsconfig.json' -exec sed -i 's|"@kan/tsconfig/|"../../tooling/typescript/|g' {} +
|
||||
$STD pnpm build --filter=@kan/web
|
||||
cd /opt/kan/apps/api
|
||||
$STD node build.mjs
|
||||
unset NEXT_PUBLIC_USE_STANDALONE_OUTPUT CI
|
||||
msg_ok "Built Application"
|
||||
|
||||
@@ -63,12 +67,31 @@ cd /opt/kan/packages/db
|
||||
POSTGRES_URL="postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}" $STD pnpm exec drizzle-kit migrate
|
||||
msg_ok "Ran Database Migrations"
|
||||
|
||||
msg_info "Creating Service"
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/kan-api.service
|
||||
[Unit]
|
||||
Description=Kan API
|
||||
After=network.target postgresql.service
|
||||
Requires=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/kan/apps/api/dist
|
||||
EnvironmentFile=/opt/kan/.env
|
||||
ExecStart=/usr/bin/node main.mjs
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/kan.service
|
||||
[Unit]
|
||||
Description=Kan Board
|
||||
After=network.target postgresql.service
|
||||
After=network.target postgresql.service kan-api.service
|
||||
Requires=postgresql.service
|
||||
Wants=kan-api.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
@@ -82,8 +105,8 @@ RestartSec=5
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now kan
|
||||
msg_ok "Created Service"
|
||||
systemctl enable -q --now kan-api kan
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
@@ -15,7 +15,7 @@ update_os
|
||||
|
||||
NODE_VERSION="26" NODE_MODULE="yarn" setup_nodejs
|
||||
PG_VERSION="16" setup_postgresql
|
||||
PHP_VERSION="8.5" PHP_APACHE="YES" setup_php
|
||||
PHP_VERSION="8.6" PHP_APACHE="YES" setup_php
|
||||
setup_composer
|
||||
PG_DB_NAME="koillection" PG_DB_USER="koillection" setup_postgresql_db
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/kopia/kopia
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "kopia" "kopia/kopia" "binary" "latest" "" "kopia_*_linux_$(arch_resolve "amd64" "arm64").deb"
|
||||
create_self_signed_cert "kopia"
|
||||
|
||||
msg_info "Creating Kopia Repository"
|
||||
mkdir -p /opt/kopia_data/{config,repository,cache,logs}
|
||||
cat <<EOT >/opt/kopia_data/.env
|
||||
KOPIA_CONFIG_PATH=/opt/kopia_data/config/repository.config
|
||||
KOPIA_CACHE_DIRECTORY=/opt/kopia_data/cache
|
||||
KOPIA_LOG_DIR=/opt/kopia_data/logs
|
||||
KOPIA_PASSWORD=${var_kopia_repo_password:-$(random_password)}
|
||||
KOPIA_SERVER_USERNAME=admin
|
||||
KOPIA_SERVER_PASSWORD=${var_kopia_password:-$(random_password)}
|
||||
KOPIA_SERVER_CONTROL_PASSWORD=$(random_password)
|
||||
EOT
|
||||
chmod 600 /opt/kopia_data/.env
|
||||
set -a
|
||||
source /opt/kopia_data/.env
|
||||
set +a
|
||||
$STD kopia repository create filesystem --path /opt/kopia_data/repository
|
||||
msg_ok "Created Kopia Repository"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOT >/etc/systemd/system/kopia.service
|
||||
[Unit]
|
||||
Description=Kopia Server
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/opt/kopia_data/.env
|
||||
ExecStart=/usr/bin/kopia server start --address=0.0.0.0:51515 --tls-cert-file=/etc/ssl/kopia/kopia.crt --tls-key-file=/etc/ssl/kopia/kopia.key
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOT
|
||||
systemctl enable -q --now kopia
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,254 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Stephen Chin (steveonjava)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/langfuse/langfuse
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
if [[ -z "${var_admin_email:-}" ]]; then
|
||||
var_admin_email=$(prompt_input "Langfuse admin email:" "admin@example.com" 60)
|
||||
fi
|
||||
var_admin_email="${var_admin_email:-admin@example.com}"
|
||||
if [[ ! "$var_admin_email" =~ ^[A-Za-z0-9_+-]+(\.[A-Za-z0-9_+-]+)*@([A-Za-z0-9][A-Za-z0-9-]*\.)+[A-Za-z]{2,}$ ]]; then
|
||||
msg_warn "Invalid email '${var_admin_email}', falling back to admin@example.com"
|
||||
var_admin_email="admin@example.com"
|
||||
fi
|
||||
var_admin_pass="${var_admin_pass:-}"
|
||||
if [[ -n "$var_admin_pass" ]] && [[ ${#var_admin_pass} -lt 8 || "$var_admin_pass" == *[[:space:][:cntrl:]\"\'\\]* ]]; then
|
||||
msg_warn "Admin password needs at least 8 characters and no spaces, quotes or backslashes, generating one"
|
||||
var_admin_pass=""
|
||||
fi
|
||||
if [[ -z "$var_admin_pass" ]]; then
|
||||
var_admin_pass=$(random_password 24)
|
||||
fi
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y build-essential redis-server
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="langfuse" PG_DB_USER="langfuse" setup_postgresql_db
|
||||
setup_clickhouse
|
||||
fetch_and_deploy_gh_release "langfuse" "langfuse/langfuse" "tarball"
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@$(jq -r '.engines.pnpm' /opt/langfuse/package.json)" setup_nodejs
|
||||
RUST_TOOLCHAIN="$(sed -n 's/^channel = "\(.*\)"/\1/p' /opt/langfuse/packages/native/rust-toolchain.toml)" RUST_PROFILE="minimal" setup_rust
|
||||
fetch_and_deploy_gh_release "migrate" "golang-migrate/migrate" "binary"
|
||||
fetch_and_deploy_gh_release "seaweedfs" "seaweedfs/seaweedfs" "prebuild" "latest" "/opt/seaweedfs" "linux_$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Building Langfuse"
|
||||
cd /opt/langfuse
|
||||
HUSKY=0 $STD pnpm install --frozen-lockfile
|
||||
DOCKER_BUILD=1 NEXT_TELEMETRY_DISABLED=1 CI=true pnpm_config_verify_deps_before_run=false $STD pnpm turbo run build --filter=web... --filter=worker... --concurrency=1
|
||||
cp -r web/.next/static web/.next/standalone/web/.next/
|
||||
cp -r web/public web/.next/standalone/web/
|
||||
msg_ok "Built Langfuse"
|
||||
|
||||
msg_info "Configuring Langfuse"
|
||||
mkdir -p /opt/langfuse_data/storage
|
||||
chmod 700 /opt/langfuse_data
|
||||
REDIS_PASS=$(random_password 32)
|
||||
CLICKHOUSE_PASS=$(random_password 32)
|
||||
S3_SECRET=$(random_password 48)
|
||||
PUBLIC_KEY="pk-lf-$(random_password 32)"
|
||||
SECRET_KEY="sk-lf-$(random_password 32)"
|
||||
cat <<EOF >/opt/langfuse_data/.env
|
||||
NODE_ENV=production
|
||||
NEXTAUTH_URL=http://${LOCAL_IP}:3000
|
||||
NEXTAUTH_SECRET=$(random_password 48)
|
||||
SALT=$(random_password 48)
|
||||
ENCRYPTION_KEY=$(openssl rand -hex 32)
|
||||
DATABASE_URL=postgresql://langfuse:${PG_DB_PASS}@127.0.0.1:5432/langfuse
|
||||
DIRECT_URL=postgresql://langfuse:${PG_DB_PASS}@127.0.0.1:5432/langfuse
|
||||
CLICKHOUSE_URL=http://127.0.0.1:8123
|
||||
CLICKHOUSE_MIGRATION_URL=clickhouse://127.0.0.1:9000
|
||||
CLICKHOUSE_USER=langfuse
|
||||
CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASS}
|
||||
CLICKHOUSE_DB=default
|
||||
CLICKHOUSE_CLUSTER_ENABLED=false
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PORT=6379
|
||||
REDIS_AUTH=${REDIS_PASS}
|
||||
LANGFUSE_S3_EVENT_UPLOAD_BUCKET=langfuse
|
||||
LANGFUSE_S3_EVENT_UPLOAD_PREFIX=events/
|
||||
LANGFUSE_S3_EVENT_UPLOAD_REGION=us-east-1
|
||||
LANGFUSE_S3_EVENT_UPLOAD_ENDPOINT=http://127.0.0.1:8333
|
||||
LANGFUSE_S3_EVENT_UPLOAD_ACCESS_KEY_ID=langfuse
|
||||
LANGFUSE_S3_EVENT_UPLOAD_SECRET_ACCESS_KEY=${S3_SECRET}
|
||||
LANGFUSE_S3_EVENT_UPLOAD_FORCE_PATH_STYLE=true
|
||||
AUTH_DISABLE_SIGNUP=true
|
||||
TELEMETRY_ENABLED=false
|
||||
NEXT_TELEMETRY_DISABLED=1
|
||||
LANGFUSE_INIT_ORG_ID=default-org
|
||||
LANGFUSE_INIT_ORG_NAME=Default
|
||||
LANGFUSE_INIT_PROJECT_ID=default-project
|
||||
LANGFUSE_INIT_PROJECT_NAME=Default
|
||||
LANGFUSE_INIT_PROJECT_PUBLIC_KEY=${PUBLIC_KEY}
|
||||
LANGFUSE_INIT_PROJECT_SECRET_KEY=${SECRET_KEY}
|
||||
LANGFUSE_INIT_USER_EMAIL=${var_admin_email}
|
||||
LANGFUSE_INIT_USER_NAME=Admin
|
||||
LANGFUSE_INIT_USER_PASSWORD=${var_admin_pass}
|
||||
EOF
|
||||
chmod 600 /opt/langfuse_data/.env
|
||||
cat <<EOF >/etc/redis/langfuse.conf
|
||||
bind 127.0.0.1 ::1
|
||||
protected-mode yes
|
||||
requirepass ${REDIS_PASS}
|
||||
maxmemory-policy noeviction
|
||||
appendonly yes
|
||||
EOF
|
||||
chown root:redis /etc/redis/langfuse.conf
|
||||
chmod 640 /etc/redis/langfuse.conf
|
||||
cat <<EOF >>/etc/redis/redis.conf
|
||||
include /etc/redis/langfuse.conf
|
||||
EOF
|
||||
cat <<EOF >/etc/clickhouse-server/users.d/langfuse.xml
|
||||
<clickhouse>
|
||||
<users>
|
||||
<default remove="remove"/>
|
||||
<langfuse>
|
||||
<password_sha256_hex>$(printf '%s' "${CLICKHOUSE_PASS}" | sha256sum | cut -d ' ' -f1)</password_sha256_hex>
|
||||
<networks><ip>127.0.0.1</ip><ip>::1</ip></networks>
|
||||
<profile>default</profile>
|
||||
<quota>default</quota>
|
||||
<access_management>1</access_management>
|
||||
</langfuse>
|
||||
</users>
|
||||
</clickhouse>
|
||||
EOF
|
||||
chown clickhouse:clickhouse /etc/clickhouse-server/users.d/langfuse.xml
|
||||
chmod 600 /etc/clickhouse-server/users.d/langfuse.xml
|
||||
cat <<EOF >/etc/clickhouse-server/config.d/langfuse.xml
|
||||
<clickhouse>
|
||||
<listen_host replace="replace">127.0.0.1</listen_host>
|
||||
<timezone>UTC</timezone>
|
||||
</clickhouse>
|
||||
EOF
|
||||
cat <<EOF >/opt/langfuse_data/s3.json
|
||||
{
|
||||
"identities": [
|
||||
{
|
||||
"name": "langfuse",
|
||||
"credentials": [{"accessKey": "langfuse", "secretKey": "${S3_SECRET}"}],
|
||||
"actions": ["Admin", "Read", "Write", "List", "Tagging"]
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
chmod 600 /opt/langfuse_data/s3.json
|
||||
msg_ok "Configured Langfuse"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/langfuse-storage.service
|
||||
[Unit]
|
||||
Description=Langfuse S3 Storage (SeaweedFS)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/langfuse_data/storage
|
||||
ExecStart=/opt/seaweedfs/weed server -dir=/opt/langfuse_data/storage -ip=127.0.0.1 -ip.bind=127.0.0.1 -s3 -s3.port=8333 -s3.port.iceberg=0 -s3.port.lance=0 -s3.config=/opt/langfuse_data/s3.json -master.telemetry=false
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/langfuse-migrate.service
|
||||
[Unit]
|
||||
Description=Langfuse Database Migrations
|
||||
After=network.target postgresql.service clickhouse-server.service redis-server.service langfuse-storage.service
|
||||
Wants=postgresql.service clickhouse-server.service redis-server.service langfuse-storage.service
|
||||
Before=langfuse-web.service langfuse-worker.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
WorkingDirectory=/opt/langfuse
|
||||
EnvironmentFile=/opt/langfuse_data/.env
|
||||
ExecStart=/usr/bin/pnpm --filter @langfuse/shared exec prisma db execute --schema=./prisma/schema.prisma --file=./scripts/cleanup.sql
|
||||
ExecStart=/usr/bin/pnpm --filter @langfuse/shared exec prisma migrate deploy --schema=./prisma/schema.prisma
|
||||
ExecStart=/bin/sh /opt/langfuse/packages/shared/clickhouse/scripts/up.sh
|
||||
RemainAfterExit=yes
|
||||
TimeoutStartSec=1800
|
||||
UMask=0077
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/langfuse-web.service
|
||||
[Unit]
|
||||
Description=Langfuse Web
|
||||
After=network.target langfuse-migrate.service
|
||||
Requires=langfuse-migrate.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/langfuse
|
||||
EnvironmentFile=/opt/langfuse_data/.env
|
||||
Environment=HOSTNAME=0.0.0.0
|
||||
Environment=PORT=3000
|
||||
ExecStart=/usr/bin/node /opt/langfuse/web/.next/standalone/web/server.js
|
||||
SuccessExitStatus=143
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/langfuse-worker.service
|
||||
[Unit]
|
||||
Description=Langfuse Worker
|
||||
After=network.target langfuse-migrate.service
|
||||
Requires=langfuse-migrate.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/langfuse
|
||||
EnvironmentFile=/opt/langfuse_data/.env
|
||||
Environment=HOSTNAME=127.0.0.1
|
||||
Environment=PORT=3030
|
||||
ExecStart=/usr/bin/node /opt/langfuse/worker/dist/index.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
UMask=0077
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl restart redis-server clickhouse-server
|
||||
systemctl enable -q --now langfuse-storage
|
||||
$STD curl --retry 30 --retry-delay 2 --retry-connrefused -fsS http://127.0.0.1:9333/cluster/status
|
||||
$STD /opt/seaweedfs/weed shell -master=127.0.0.1:9333 <<<"s3.bucket.create -name langfuse"
|
||||
$STD curl --config - --retry 30 --retry-delay 2 --retry-connrefused -fsS http://127.0.0.1:8333/langfuse <<EOF
|
||||
aws-sigv4 = "aws:amz:us-east-1:s3"
|
||||
user = "langfuse:${S3_SECRET}"
|
||||
EOF
|
||||
systemctl enable -q --now langfuse-web langfuse-worker
|
||||
$STD curl --retry 60 --retry-delay 2 --retry-connrefused -fsS http://127.0.0.1:3000/api/public/ready
|
||||
$STD curl --retry 30 --retry-delay 2 --retry-connrefused -fsS http://127.0.0.1:3030/api/health
|
||||
msg_ok "Created Services"
|
||||
|
||||
msg_info "Saving Credentials"
|
||||
sed -i '/^LANGFUSE_INIT_/d' /opt/langfuse_data/.env
|
||||
cat <<EOF >>~/langfuse.creds
|
||||
|
||||
Langfuse Admin
|
||||
Email: ${var_admin_email}
|
||||
Password: ${var_admin_pass}
|
||||
|
||||
Langfuse API Keys (project Default)
|
||||
Public Key: ${PUBLIC_KEY}
|
||||
Secret Key: ${SECRET_KEY}
|
||||
EOF
|
||||
chmod 600 ~/langfuse.creds
|
||||
msg_ok "Saved Credentials"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -54,6 +54,7 @@ SITE_SETTINGS=$(find /opt/mealie/frontend -name "site-settings.vue" -path "*/adm
|
||||
$STD sed -i "s|https://github.com/mealie-recipes/mealie/commit/|https://github.com/mealie-recipes/mealie/releases/tag/|g" "$SITE_SETTINGS"
|
||||
$STD sed -i "s|value: data.buildId,|value: \"v${MEALIE_VERSION}\",|g" "$SITE_SETTINGS"
|
||||
$STD sed -i "s|value: data.production ? i18n.t(\"about.production\") : i18n.t(\"about.development\"),|value: \"bare-metal\",|g" "$SITE_SETTINGS"
|
||||
$STD sed -i "s|^__version__ = .*|__version__ = \"${MEALIE_VERSION}\"|" /opt/mealie/mealie/__init__.py
|
||||
if [[ "${FRONTEND_PKG}" == "pnpm" ]]; then
|
||||
$STD pnpm install --prefer-offline --frozen-lockfile
|
||||
$STD pnpm generate
|
||||
|
||||
@@ -13,7 +13,7 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
|
||||
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="nocobase" PG_DB_USER="nocobase" PG_DB_CREDS_FILE="/dev/null" setup_postgresql_db
|
||||
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: a55uka (a55uka)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/TheSpaghettiDetective/obico-server
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
libmagic1 \
|
||||
redis-server
|
||||
systemctl enable -q --now redis-server
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_ffmpeg
|
||||
|
||||
fetch_and_deploy_gh_branch "obico" "TheSpaghettiDetective/obico-server" "release" "/opt/obico"
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
msg_info "Setting up Python Environments"
|
||||
IMPORTLIB_METADATA_PIN=$(grep -oP 'importlib_metadata==\K[0-9.]+' /opt/obico/backend/Dockerfile.base) # tracked from upstream's Dockerfile.base
|
||||
cd /opt/obico/backend
|
||||
$STD uv venv --python 3.12 .venv
|
||||
$STD uv pip install -p .venv/bin/python -r requirements.txt
|
||||
$STD uv pip install -p .venv/bin/python "importlib_metadata==${IMPORTLIB_METADATA_PIN}"
|
||||
cd /opt/obico/ml_api
|
||||
$STD uv venv --python 3.12 .venv
|
||||
$STD uv pip install -p .venv/bin/python -r requirements.txt onnxruntime opencv-python-headless
|
||||
msg_ok "Set up Python Environments"
|
||||
|
||||
msg_info "Installing Moonraker Metadata Library"
|
||||
MOONRAKER_SHA=$(grep -oP 'checkout \K[a-f0-9]{40}' /opt/obico/backend/Dockerfile.base) # pinned clone as in backend/Dockerfile.base, imported via PYTHONPATH
|
||||
$STD git clone https://github.com/Arksine/moonraker.git /opt/moonraker
|
||||
$STD git -C /opt/moonraker checkout "$MOONRAKER_SHA"
|
||||
msg_ok "Installed Moonraker Metadata Library"
|
||||
|
||||
msg_info "Downloading Failure Detection Model"
|
||||
mkdir -p /model_cache/ml_api/onnx
|
||||
bash /opt/obico/ml_api/scripts/fetch_verified.sh "$(tr -d '\r' </opt/obico/ml_api/model/model-weights.onnx.url)" /model_cache/ml_api/onnx/model-weights.onnx 50000000 "$(tr -d '\r' </opt/obico/ml_api/model/model-weights.onnx.sha256)" # upstream's checksum-verifying downloader, URL and sha256 from sidecar files
|
||||
msg_ok "Downloaded Failure Detection Model"
|
||||
|
||||
msg_info "Configuring Obico"
|
||||
DJANGO_SECRET_KEY=$(cd /opt/obico/backend && .venv/bin/python -c 'import secrets; print(secrets.token_urlsafe())' 2>/dev/null)
|
||||
ML_API_TOKEN=$(random_password 32)
|
||||
cat <<EOF >/opt/obico/.env
|
||||
DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
|
||||
REDIS_URL=redis://127.0.0.1:6379
|
||||
DATABASE_URL=sqlite:////opt/obico/backend/db.sqlite3
|
||||
INTERNAL_MEDIA_HOST=http://127.0.0.1:3334
|
||||
ML_API_HOST=http://127.0.0.1:3333
|
||||
ML_API_TOKEN=${ML_API_TOKEN}
|
||||
OCTOPRINT_TUNNEL_PORT_RANGE=0-0
|
||||
VERSION=$(cat ~/.obico)
|
||||
PYTHONPATH=/opt/moonraker
|
||||
EOF
|
||||
chmod 600 /opt/obico/.env
|
||||
msg_ok "Configured Obico"
|
||||
|
||||
msg_info "Initializing Database"
|
||||
set -a
|
||||
source /opt/obico/.env
|
||||
set +a
|
||||
cd /opt/obico/backend
|
||||
$STD .venv/bin/python manage.py migrate --noinput
|
||||
$STD .venv/bin/python manage.py collectstatic --noinput
|
||||
$STD .venv/bin/python manage.py site --add "${LOCAL_IP}:3334"
|
||||
msg_ok "Initialized Database"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/obico-ml-api.service
|
||||
[Unit]
|
||||
Description=Obico ML API
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/obico/ml_api
|
||||
EnvironmentFile=/opt/obico/.env
|
||||
ExecStart=/opt/obico/ml_api/.venv/bin/gunicorn --bind 0.0.0.0:3333 --workers 1 --timeout 120 wsgi # 0.0.0.0 for external clients (e.g. Bambuddy); ML_API_TOKEN gates everything but the health check
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/obico-web.service
|
||||
[Unit]
|
||||
Description=Obico Web Server
|
||||
Wants=network-online.target obico-ml-api.service
|
||||
After=network-online.target redis-server.service obico-ml-api.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/obico/backend
|
||||
EnvironmentFile=/opt/obico/.env
|
||||
ExecStart=/opt/obico/backend/.venv/bin/daphne -b 0.0.0.0 -p 3334 config.routing:application
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/obico-tasks.service
|
||||
[Unit]
|
||||
Description=Obico Celery Worker
|
||||
Wants=network-online.target
|
||||
After=network-online.target redis-server.service obico-web.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/obico/backend
|
||||
EnvironmentFile=/opt/obico/.env
|
||||
ExecStart=/opt/obico/backend/.venv/bin/celery -A config worker --beat -l info -c 2 -Q realtime,celery
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now obico-ml-api obico-web obico-tasks
|
||||
msg_ok "Created Services"
|
||||
|
||||
msg_info "Waiting for Obico to start"
|
||||
for ((i = 1; i <= 45; i++)); do
|
||||
curl -fsS http://127.0.0.1:3334/hc/ >/dev/null 2>&1 && break
|
||||
sleep 2
|
||||
done
|
||||
if ! curl -fsS http://127.0.0.1:3334/hc/ >/dev/null 2>&1; then
|
||||
msg_error "Obico did not respond within 90s. Check 'journalctl -u obico-web -u obico-ml-api -u obico-tasks'"
|
||||
exit 150
|
||||
fi
|
||||
msg_ok "Obico is running"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/rmyndharis/OpenWA
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
build-essential \
|
||||
python3 \
|
||||
chromium \
|
||||
fonts-liberation
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_ffmpeg
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
fetch_and_deploy_gh_release "openwa" "rmyndharis/OpenWA" "tarball"
|
||||
|
||||
msg_info "Building OpenWA"
|
||||
cd /opt/openwa
|
||||
export PUPPETEER_SKIP_DOWNLOAD=true
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
$STD npm run dashboard:build
|
||||
$STD npm prune --omit=dev
|
||||
rm -rf dashboard/node_modules ~/.npm
|
||||
msg_ok "Built OpenWA"
|
||||
|
||||
msg_info "Configuring OpenWA"
|
||||
mkdir -p /opt/openwa_data/data
|
||||
cat <<EOF >/opt/openwa_data/.env
|
||||
NODE_ENV=production
|
||||
PORT=2785
|
||||
API_MASTER_KEY=${var_api_key:-$(random_password 40)}
|
||||
CSP_UPGRADE_INSECURE_REQUESTS=false
|
||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
||||
EOF
|
||||
chmod 600 /opt/openwa_data/.env
|
||||
msg_ok "Configured OpenWA"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/openwa.service
|
||||
[Unit]
|
||||
Description=OpenWA WhatsApp API Gateway
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/openwa_data
|
||||
ExecStart=/usr/bin/node /opt/openwa/dist/main
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now openwa
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/roundcube/roundcubemail
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y nginx rsync
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="ldap" setup_php
|
||||
fetch_and_deploy_gh_release "roundcube" "roundcube/roundcubemail" "prebuild" "latest" "/opt/roundcube" "roundcubemail-*-complete.tar.gz"
|
||||
|
||||
msg_info "Configuring Roundcube"
|
||||
mkdir -p /opt/roundcube_data
|
||||
cat <<EOF >/opt/roundcube/config/config.inc.php
|
||||
<?php
|
||||
\$config = [];
|
||||
\$config['db_dsnw'] = 'sqlite:////opt/roundcube_data/roundcube.db?mode=0640';
|
||||
\$config['imap_host'] = '${var_imap_host:-}';
|
||||
\$config['smtp_host'] = '${var_smtp_host:-%h:587}';
|
||||
\$config['smtp_user'] = '%u';
|
||||
\$config['smtp_pass'] = '%p';
|
||||
\$config['product_name'] = 'Roundcube Webmail';
|
||||
\$config['des_key'] = '$(random_password 24)';
|
||||
\$config['plugins'] = ['archive', 'zipdownload'];
|
||||
\$config['skin'] = 'elastic';
|
||||
EOF
|
||||
rm -rf /opt/roundcube/installer
|
||||
chown -R www-data:www-data /opt/roundcube /opt/roundcube_data
|
||||
chmod 640 /opt/roundcube/config/config.inc.php
|
||||
cd /opt/roundcube
|
||||
$STD runuser -u www-data -- php bin/initdb.sh --dir=SQL --update
|
||||
msg_ok "Configured Roundcube"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
PHP_SOCK=$(get_php_fpm_socket)
|
||||
cat <<EOF >/etc/nginx/sites-available/roundcube
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name _;
|
||||
|
||||
root /opt/roundcube/public_html;
|
||||
index index.php;
|
||||
|
||||
client_max_body_size 128M;
|
||||
|
||||
location = /favicon.ico {
|
||||
rewrite ^ /static.php/skins/elastic/images/favicon.ico last;
|
||||
}
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.php\$is_args\$args;
|
||||
}
|
||||
location ~ \.php(/|\$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)\$;
|
||||
set \$path_info \$fastcgi_path_info;
|
||||
try_files \$fastcgi_script_name =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO \$path_info;
|
||||
fastcgi_pass unix:${PHP_SOCK};
|
||||
}
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
nginx_enable_site "roundcube"
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -15,6 +15,7 @@ update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
cron \
|
||||
nginx \
|
||||
sqlite3
|
||||
setcap cap_net_raw+ep /bin/ping
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/warp-tech/warpgate
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "warpgate" "warp-tech/warpgate" "singlefile" "latest" "/opt/warpgate" "warpgate-v*-$(arch_resolve "x86_64" "arm64")-linux"
|
||||
|
||||
msg_info "Configuring Warpgate"
|
||||
ADMIN_PASS="${var_admin_pass:-$(random_password)}"
|
||||
mkdir -p /opt/warpgate_data
|
||||
cat <<EOF >/opt/warpgate_data/.env
|
||||
WARPGATE_ADMIN_USER=admin
|
||||
WARPGATE_ADMIN_PASSWORD=${ADMIN_PASS}
|
||||
EOF
|
||||
chmod 600 /opt/warpgate_data/.env
|
||||
WARPGATE_ADMIN_PASSWORD="$ADMIN_PASS" $STD /opt/warpgate/warpgate --config /opt/warpgate_data/warpgate.yaml unattended-setup \
|
||||
--data-path /opt/warpgate_data \
|
||||
--http-port 8888 \
|
||||
--ssh-port 2222 \
|
||||
--mysql-port 33306 \
|
||||
--postgres-port 55432 \
|
||||
--kubernetes-port 8443 \
|
||||
--record-sessions
|
||||
# A host kernel booted without IPv6 cannot bind [::]
|
||||
[[ -d /proc/sys/net/ipv6 ]] || sed -i "s/'\[::\]:/'0.0.0.0:/" /opt/warpgate_data/warpgate.yaml
|
||||
msg_ok "Configured Warpgate"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/warpgate.service
|
||||
[Unit]
|
||||
Description=Warpgate
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStart=/opt/warpgate/warpgate --config /opt/warpgate_data/warpgate.yaml run
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now warpgate
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: freakms
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://www.xwiki.org
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
setup_postgresql
|
||||
|
||||
setup_deb822_repo \
|
||||
"xwiki" \
|
||||
"https://maven.xwiki.org/xwiki-keyring.gpg" \
|
||||
"https://maven.xwiki.org" \
|
||||
"stable/"
|
||||
|
||||
msg_info "Installing XWiki"
|
||||
debconf-set-selections <<EOF
|
||||
dbconfig-common dbconfig-common/dbconfig-install boolean true
|
||||
dbconfig-common dbconfig-common/remember-admin-pass boolean false
|
||||
EOF
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
$STD apt install -y xwiki-tomcat10-pgsql
|
||||
msg_ok "Installed XWiki"
|
||||
|
||||
msg_info "Configuring XWiki"
|
||||
XWIKI_XMX=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) * 60 / 100 / 1024))
|
||||
sed -i 's/^\(JAVA_OPTS=.*\)$/#\1/' /etc/default/tomcat10
|
||||
cat <<EOF >>/etc/default/tomcat10
|
||||
JAVA_OPTS="-Djava.awt.headless=true -Xmx${XWIKI_XMX}m -XX:+UseG1GC"
|
||||
EOF
|
||||
systemctl restart tomcat10
|
||||
msg_ok "Configured XWiki"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -181,7 +181,7 @@ fi
|
||||
msg_info "Creating a AllStarLink VM"
|
||||
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
|
||||
-name $HN -tags community-script,debian${var_version},radio -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
||||
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
|
||||
vm_alloc_efi_disk "$DISK0"
|
||||
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
|
||||
qm set $VMID \
|
||||
-efidisk0 ${DISK0_REF}${FORMAT} \
|
||||
|
||||
+1
-1
@@ -142,7 +142,7 @@ fi
|
||||
msg_info "Creating an Alpine VM"
|
||||
qm create "$VMID" -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores "$CORE_COUNT" -memory "$RAM_SIZE" \
|
||||
-name "$HN" -tags community-script -net0 virtio,bridge="$BRG",macaddr="$MAC""$VLAN""$MTU" -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
||||
pvesm alloc "$STORAGE" "$VMID" "$DISK0" 4M 1>&/dev/null
|
||||
vm_alloc_efi_disk "$DISK0"
|
||||
pvesm alloc "$STORAGE" "$VMID" "$DISK2" 4M 1>&/dev/null
|
||||
qm importdisk "$VMID" "$WORK_FILE" "$STORAGE" -format "$DISK_IMPORT_FORMAT" 1>&/dev/null
|
||||
qm set "$VMID" \
|
||||
|
||||
@@ -0,0 +1,442 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://netbird.io
|
||||
|
||||
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}"
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/pve/vm-core.func")
|
||||
load_functions
|
||||
|
||||
APP="NetBird Server"
|
||||
APP_TYPE="vm"
|
||||
NSAPP="netbird-server"
|
||||
var_os="debian"
|
||||
var_version="13"
|
||||
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
|
||||
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)"
|
||||
METHOD=""
|
||||
USE_CLOUD_INIT="no"
|
||||
OS_TYPE="debian"
|
||||
OS_VERSION="13"
|
||||
OS_CODENAME="trixie"
|
||||
OS_DISPLAY="Debian 13 (Trixie)"
|
||||
THIN="discard=on,ssd=1,"
|
||||
NETBIRD_DOMAIN_INPUT=""
|
||||
NETBIRD_PROXY_TYPE_INPUT="0"
|
||||
NETBIRD_EMAIL_INPUT=""
|
||||
DOCKER_PREINSTALLED="no"
|
||||
DOCKER_INSTALL_MARKER=""
|
||||
NETBIRD_SETUP_MARKER=""
|
||||
|
||||
header_info
|
||||
echo -e "\n Loading..."
|
||||
|
||||
set -Eeo pipefail
|
||||
shopt -s inherit_errexit
|
||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||
trap cleanup EXIT
|
||||
trap 'post_update_to_api "failed" "130"' SIGINT
|
||||
trap 'post_update_to_api "failed" "143"' SIGTERM
|
||||
trap 'post_update_to_api "failed" "129"; exit 129' SIGHUP
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
pushd "$TEMP_DIR" >/dev/null
|
||||
|
||||
vm_preflight
|
||||
vm_require_tools virt-customize jq
|
||||
|
||||
function configure_netbird_setup() {
|
||||
if [[ "${VM_UNATTENDED:-0}" == "1" ]]; then
|
||||
if [[ -z "${VM_NETBIRD_DOMAIN:-}" ]]; then
|
||||
msg_error "An unattended NetBird Server install needs VM_NETBIRD_DOMAIN"
|
||||
msg_error "Set it to the public domain whose DNS A record points at this VM, e.g. VM_NETBIRD_DOMAIN=netbird.my-domain.com"
|
||||
exit 1
|
||||
fi
|
||||
NETBIRD_DOMAIN_INPUT="$VM_NETBIRD_DOMAIN"
|
||||
NETBIRD_PROXY_TYPE_INPUT="${VM_NETBIRD_PROXY_TYPE:-0}"
|
||||
NETBIRD_EMAIL_INPUT="${VM_NETBIRD_EMAIL:-admin@${NETBIRD_DOMAIN_INPUT}}"
|
||||
echo -e "${INFO}${BOLD}${DGN}NetBird Domain: ${BGN}${NETBIRD_DOMAIN_INPUT}${CL}"
|
||||
echo -e "${INFO}${BOLD}${DGN}Reverse Proxy: ${BGN}${NETBIRD_PROXY_TYPE_INPUT}${CL}"
|
||||
echo -e "${INFO}${BOLD}${DGN}Let's Encrypt Email: ${BGN}${NETBIRD_EMAIL_INPUT}${CL}"
|
||||
return
|
||||
fi
|
||||
|
||||
while true; do
|
||||
if vm_dialog inputbox "NETBIRD DOMAIN" \
|
||||
"Enter the public domain for your NetBird server.\n(DNS A record must point to this VM's public IP)\n\ne.g. netbird.my-domain.com" \
|
||||
11 65 "" --cancel-button Exit-Script; then
|
||||
NETBIRD_DOMAIN_INPUT="$VM_DIALOG_RESULT"
|
||||
if [[ -z "$NETBIRD_DOMAIN_INPUT" ]] || [[ "$NETBIRD_DOMAIN_INPUT" == "netbird.example.com" ]]; then
|
||||
vm_dialog msgbox "INVALID DOMAIN" "Please enter a valid domain name." 8 50
|
||||
continue
|
||||
fi
|
||||
echo -e "${INFO}${BOLD}${DGN}NetBird Domain: ${BGN}${NETBIRD_DOMAIN_INPUT}${CL}"
|
||||
break
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
done
|
||||
|
||||
if vm_dialog radiolist "REVERSE PROXY" \
|
||||
"Select the reverse proxy for NetBird" 14 70 4 \
|
||||
"0" "Traefik (recommended, built-in with auto TLS)" ON \
|
||||
"2" "Nginx (generates config template)" OFF \
|
||||
"3" "Nginx Proxy Manager" OFF \
|
||||
"5" "Other/Manual" OFF; then
|
||||
NETBIRD_PROXY_TYPE_INPUT="$VM_DIALOG_RESULT"
|
||||
echo -e "${INFO}${BOLD}${DGN}Reverse Proxy: ${BGN}${NETBIRD_PROXY_TYPE_INPUT}${CL}"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
|
||||
if [[ "$NETBIRD_PROXY_TYPE_INPUT" == "0" ]]; then
|
||||
while true; do
|
||||
if vm_dialog inputbox "LETSENCRYPT EMAIL" \
|
||||
"Enter your email for Let's Encrypt certificates:" 8 65 "" --cancel-button Exit-Script; then
|
||||
NETBIRD_EMAIL_INPUT="$VM_DIALOG_RESULT"
|
||||
if [[ -z "$NETBIRD_EMAIL_INPUT" ]]; then
|
||||
vm_dialog msgbox "INVALID EMAIL" "Email is required for Let's Encrypt." 8 50
|
||||
continue
|
||||
fi
|
||||
echo -e "${INFO}${BOLD}${DGN}Let's Encrypt Email: ${BGN}${NETBIRD_EMAIL_INPUT}${CL}"
|
||||
break
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function select_os() {
|
||||
if [[ -n "${1:-}" ]]; then
|
||||
OS_CHOICE="$1"
|
||||
elif [[ "${VM_UNATTENDED:-0}" == "1" ]]; then
|
||||
OS_CHOICE="${VM_OS_VERSION:-debian13}"
|
||||
elif vm_dialog radiolist "SELECT OS" \
|
||||
"Choose Operating System for NetBird Server VM" 15 68 4 \
|
||||
"debian13" "Debian 13 (Trixie) - Latest" ON \
|
||||
"debian12" "Debian 12 (Bookworm) - Stable" OFF \
|
||||
"ubuntu2604" "Ubuntu 26.04 LTS (Resolute)" OFF \
|
||||
"ubuntu2404" "Ubuntu 24.04 LTS (Noble)" OFF; then
|
||||
OS_CHOICE="$VM_DIALOG_RESULT"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
|
||||
case $OS_CHOICE in
|
||||
debian13)
|
||||
OS_TYPE="debian"
|
||||
OS_VERSION="13"
|
||||
OS_CODENAME="trixie"
|
||||
OS_DISPLAY="Debian 13 (Trixie)"
|
||||
;;
|
||||
debian12)
|
||||
OS_TYPE="debian"
|
||||
OS_VERSION="12"
|
||||
OS_CODENAME="bookworm"
|
||||
OS_DISPLAY="Debian 12 (Bookworm)"
|
||||
;;
|
||||
ubuntu2604)
|
||||
OS_TYPE="ubuntu"
|
||||
OS_VERSION="26.04"
|
||||
OS_CODENAME="resolute"
|
||||
OS_DISPLAY="Ubuntu 26.04 LTS"
|
||||
;;
|
||||
ubuntu2404)
|
||||
OS_TYPE="ubuntu"
|
||||
OS_VERSION="24.04"
|
||||
OS_CODENAME="noble"
|
||||
OS_DISPLAY="Ubuntu 24.04 LTS"
|
||||
;;
|
||||
*)
|
||||
msg_error "Unsupported OS '${OS_CHOICE}' (expected debian13, debian12, ubuntu2604 or ubuntu2404)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
var_os="$OS_TYPE"
|
||||
var_version="$OS_VERSION"
|
||||
echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}${OS_DISPLAY}${CL}"
|
||||
}
|
||||
|
||||
function select_cloud_init() {
|
||||
VM_CLOUD_INIT="${VM_CLOUD_INIT:-yes}"
|
||||
CLOUDINIT_REQUIRED=0
|
||||
if [[ "$OS_TYPE" == "ubuntu" ]]; then
|
||||
CLOUDINIT_REQUIRED=1
|
||||
fi
|
||||
vm_prompt_cloud_init "$OS_TYPE"
|
||||
}
|
||||
|
||||
function get_image_url() {
|
||||
local arch
|
||||
arch=$(vm_arch_resolve amd64 arm64)
|
||||
case $OS_TYPE in
|
||||
debian)
|
||||
if [[ "$USE_CLOUD_INIT" == "yes" ]]; then
|
||||
echo "https://cloud.debian.org/images/cloud/${OS_CODENAME}/latest/debian-${OS_VERSION}-generic-${arch}.qcow2"
|
||||
else
|
||||
echo "https://cloud.debian.org/images/cloud/${OS_CODENAME}/latest/debian-${OS_VERSION}-nocloud-${arch}.qcow2"
|
||||
fi
|
||||
;;
|
||||
ubuntu)
|
||||
echo "https://cloud-images.ubuntu.com/${OS_CODENAME}/current/${OS_CODENAME}-server-cloudimg-${arch}.img"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function default_settings() {
|
||||
select_os "${VM_OS_VERSION:-}"
|
||||
vm_apply_machine_type "q35"
|
||||
VMID=$(get_valid_nextid)
|
||||
DISK_SIZE="10G"
|
||||
DISK_CACHE=""
|
||||
HN="netbird"
|
||||
CPU_TYPE=" -cpu host"
|
||||
CORE_COUNT="2"
|
||||
RAM_SIZE="2048"
|
||||
BRG="vmbr0"
|
||||
MAC="$GEN_MAC"
|
||||
VLAN=""
|
||||
MTU=""
|
||||
START_VM="yes"
|
||||
METHOD="default"
|
||||
vm_echo_default_settings
|
||||
}
|
||||
|
||||
function advanced_settings() {
|
||||
METHOD="advanced"
|
||||
select_os
|
||||
vm_prompt_vmid "${VMID:-$(get_valid_nextid)}"
|
||||
vm_prompt_machine_type "q35"
|
||||
vm_prompt_disk_size "10G"
|
||||
vm_prompt_disk_cache "none"
|
||||
vm_prompt_hostname "netbird"
|
||||
vm_prompt_cpu_model "host"
|
||||
vm_prompt_cpu_cores "2"
|
||||
vm_prompt_ram "2048"
|
||||
vm_prompt_bridge "vmbr0"
|
||||
vm_prompt_mac "$GEN_MAC"
|
||||
vm_prompt_vlan
|
||||
vm_prompt_mtu
|
||||
vm_prompt_keyboard
|
||||
vm_prompt_verbose "no"
|
||||
vm_prompt_start_vm "yes"
|
||||
|
||||
if vm_confirm_advanced_settings "Ready to create a NetBird Server VM?"; then
|
||||
echo -e "${CREATING}${BOLD}${DGN}Creating a NetBird Server VM using the above advanced settings${CL}"
|
||||
else
|
||||
header_info
|
||||
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
|
||||
advanced_settings
|
||||
fi
|
||||
}
|
||||
|
||||
vm_start_script "Use Default Settings?\n\nDefaults:\n• 2 CPU Cores\n• 2 GB RAM\n• 10 GB Disk\n• Cloud-Init enabled" 14 58
|
||||
select_cloud_init
|
||||
configure_netbird_setup
|
||||
post_to_api_vm
|
||||
|
||||
vm_select_storage "$HN"
|
||||
vm_define_disk_references 2
|
||||
|
||||
msg_info "Retrieving the URL for the ${OS_DISPLAY} Disk Image"
|
||||
URL=$(get_image_url)
|
||||
CACHE_FILE="$(vm_image_cache_path "$URL")"
|
||||
msg_ok "${CL}${BL}${URL}${CL}"
|
||||
|
||||
MIN_IMAGE_BYTES=$((100 * 1024 * 1024))
|
||||
vm_fetch_image "$URL" "$CACHE_FILE" --cache --min-bytes "$MIN_IMAGE_BYTES" || exit 115
|
||||
|
||||
WORK_FILE="$TEMP_DIR/netbird.qcow2"
|
||||
cp "$CACHE_FILE" "$WORK_FILE"
|
||||
|
||||
if [[ "${USE_CLOUD_INIT:-no}" != "yes" ]]; then
|
||||
msg_info "Expanding the root filesystem to ${DISK_SIZE}"
|
||||
vm_expand_image "$WORK_FILE" "$DISK_SIZE" || true
|
||||
fi
|
||||
|
||||
export LIBGUESTFS_BACKEND_SETTINGS=dns=8.8.8.8,1.1.1.1
|
||||
|
||||
msg_info "Installing base packages"
|
||||
if vm_customize "NetBird base packages" "$WORK_FILE" --install qemu-guest-agent,curl,ca-certificates,jq; then
|
||||
msg_ok "Installed base packages"
|
||||
|
||||
msg_info "Installing Docker"
|
||||
if vm_customize "Docker" "$WORK_FILE" \
|
||||
--run-command 'bash -o pipefail -c "curl -fsSL https://get.docker.com | sh"' \
|
||||
--run-command 'systemctl enable docker'; then
|
||||
DOCKER_PREINSTALLED="yes"
|
||||
msg_ok "Installed Docker"
|
||||
|
||||
DOCKER_DAEMON_TMP="$TEMP_DIR/docker-daemon.json"
|
||||
cat >"$DOCKER_DAEMON_TMP" <<'JSON'
|
||||
{
|
||||
"storage-driver": "overlay2",
|
||||
"log-driver": "json-file",
|
||||
"log-opts": {
|
||||
"max-size": "10m",
|
||||
"max-file": "3"
|
||||
}
|
||||
}
|
||||
JSON
|
||||
vm_customize "Docker daemon" "$WORK_FILE" \
|
||||
--mkdir /etc/docker \
|
||||
--upload "${DOCKER_DAEMON_TMP}:/etc/docker/daemon.json" || msg_warn "Docker daemon tuning failed; continuing with Docker defaults"
|
||||
else
|
||||
msg_warn "Docker pre-install failed; installation is pending on first boot."
|
||||
fi
|
||||
else
|
||||
msg_warn "Package pre-install failed; Docker installation is pending on first boot."
|
||||
fi
|
||||
|
||||
NETBIRD_ENV_TMP="$TEMP_DIR/netbird.env"
|
||||
cat >"$NETBIRD_ENV_TMP" <<ENVEOF
|
||||
NETBIRD_NON_INTERACTIVE="true"
|
||||
NETBIRD_DOMAIN="${NETBIRD_DOMAIN_INPUT}"
|
||||
NETBIRD_REVERSE_PROXY_TYPE="${NETBIRD_PROXY_TYPE_INPUT}"
|
||||
NETBIRD_LETSENCRYPT_EMAIL="${NETBIRD_EMAIL_INPUT}"
|
||||
NETBIRD_ENABLE_PROXY="false"
|
||||
NETBIRD_ENABLE_CROWDSEC="false"
|
||||
NETBIRD_BIND_LOCALHOST_ONLY="false"
|
||||
ENVEOF
|
||||
vm_customize "NetBird configuration" "$WORK_FILE" \
|
||||
--upload "${NETBIRD_ENV_TMP}:/root/netbird.env" || exit 1
|
||||
|
||||
NETBIRD_SETUP_TMP="$TEMP_DIR/netbird-setup.sh"
|
||||
cat >"$NETBIRD_SETUP_TMP" <<'SETUPEOF'
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
exec > /var/log/netbird-setup.log 2>&1
|
||||
|
||||
echo "[$(date)] Starting NetBird automated setup"
|
||||
|
||||
for _ in {1..60}; do
|
||||
docker info >/dev/null 2>&1 && break
|
||||
sleep 5
|
||||
done
|
||||
docker info >/dev/null 2>&1 || {
|
||||
echo "[$(date)] ERROR: Docker not ready after 5 min"
|
||||
exit 1
|
||||
}
|
||||
|
||||
set -a
|
||||
source /root/netbird.env
|
||||
set +a
|
||||
|
||||
curl -fsSL https://github.com/netbirdio/netbird/releases/latest/download/getting-started.sh \
|
||||
-o /root/getting-started.sh
|
||||
|
||||
echo "[$(date)] Running NetBird getting-started.sh"
|
||||
bash /root/getting-started.sh
|
||||
echo "[$(date)] NetBird setup completed"
|
||||
SETUPEOF
|
||||
|
||||
vm_prepare_cloud_image "$WORK_FILE" "$HN" || true
|
||||
|
||||
if [[ "$DOCKER_PREINSTALLED" == "no" ]]; then
|
||||
DOCKER_INSTALL_TMP="$TEMP_DIR/install-docker.sh"
|
||||
cat >"$DOCKER_INSTALL_TMP" <<'DOCKEREOF'
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
export DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a
|
||||
exec > /var/log/install-docker.log 2>&1
|
||||
|
||||
echo "[$(date)] Starting Docker installation"
|
||||
for _ in {1..30}; do
|
||||
ping -c 1 8.8.8.8 >/dev/null 2>&1 && break
|
||||
sleep 2
|
||||
done
|
||||
|
||||
apt-get update
|
||||
apt-get install -y qemu-guest-agent curl ca-certificates jq
|
||||
bash -o pipefail -c "curl -fsSL https://get.docker.com | sh"
|
||||
systemctl enable docker
|
||||
install -d /etc/docker
|
||||
cat > /etc/docker/daemon.json <<'JSON'
|
||||
{
|
||||
"storage-driver": "overlay2",
|
||||
"log-driver": "json-file",
|
||||
"log-opts": {
|
||||
"max-size": "10m",
|
||||
"max-file": "3"
|
||||
}
|
||||
}
|
||||
JSON
|
||||
systemctl start docker
|
||||
echo "[$(date)] Docker installation completed"
|
||||
DOCKEREOF
|
||||
|
||||
vm_firstboot_unit "$WORK_FILE" install-docker "$DOCKER_INSTALL_TMP" \
|
||||
--description "Install Docker on first boot" \
|
||||
--cloud-init "$USE_CLOUD_INIT" || exit 1
|
||||
DOCKER_INSTALL_MARKER="$VM_FIRSTBOOT_MARKER"
|
||||
fi
|
||||
|
||||
NETBIRD_AFTER=(--after docker.service)
|
||||
if [[ "$DOCKER_PREINSTALLED" == "no" ]]; then
|
||||
NETBIRD_AFTER+=(--after install-docker.service)
|
||||
fi
|
||||
vm_firstboot_unit "$WORK_FILE" netbird-setup "$NETBIRD_SETUP_TMP" \
|
||||
--description "NetBird initial setup" \
|
||||
"${NETBIRD_AFTER[@]}" \
|
||||
--cloud-init "$USE_CLOUD_INIT" || exit 1
|
||||
NETBIRD_SETUP_MARKER="$VM_FIRSTBOOT_MARKER"
|
||||
|
||||
vm_claim_vmid
|
||||
msg_info "Creating NetBird Server VM shell"
|
||||
qm create "$VMID" -agent 1${MACHINE} -tablet 0 -bios ovmf${CPU_TYPE} -cores "$CORE_COUNT" -memory "$RAM_SIZE" \
|
||||
-name "$HN" -tags community-script -net0 "virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU" -onboot 1 -ostype l26 -scsihw virtio-scsi-pci >/dev/null
|
||||
vm_mark_created
|
||||
msg_ok "Created VM shell"
|
||||
|
||||
vm_alloc_efi_disk "$DISK0"
|
||||
vm_import_disk "$VMID" "$WORK_FILE" "$STORAGE"
|
||||
|
||||
DISK_OPTIONS="${DISK_CACHE}${THIN}"
|
||||
DISK_OPTIONS="${DISK_OPTIONS%,}"
|
||||
ROOT_DISK="$VM_IMPORTED_DISK"
|
||||
[[ -n "$DISK_OPTIONS" ]] && ROOT_DISK="${ROOT_DISK},${DISK_OPTIONS}"
|
||||
|
||||
msg_info "Attaching EFI and root disk"
|
||||
qm set "$VMID" \
|
||||
--efidisk0 "${DISK0_REF}${FORMAT}" \
|
||||
--scsi0 "$ROOT_DISK" \
|
||||
--boot order=scsi0 \
|
||||
--serial0 socket >/dev/null
|
||||
msg_ok "Attached EFI and root disk"
|
||||
|
||||
vm_resize_disk "scsi0" "$DISK_SIZE"
|
||||
set_description
|
||||
|
||||
vm_provision "$VMID"
|
||||
if [[ "$USE_CLOUD_INIT" == "yes" && -n "${CLOUDINIT_SSH_KEYS:-}" ]]; then
|
||||
$STD qm set "$VMID" --sshkeys "$CLOUDINIT_SSH_KEYS"
|
||||
fi
|
||||
|
||||
vm_start_vm "NetBird Server VM"
|
||||
vm_wait_for_ip 180 || true
|
||||
|
||||
if [[ "$USE_CLOUD_INIT" == "yes" ]]; then
|
||||
display_cloud_init_info "$VMID" "$HN"
|
||||
else
|
||||
msg_warn "Debian nocloud console login: root, no password. Set one before exposing the VM."
|
||||
fi
|
||||
|
||||
DOCKER_STATUS="Pre-installed"
|
||||
if [[ "$DOCKER_PREINSTALLED" == "no" ]]; then
|
||||
DOCKER_STATUS="First-boot unit install-docker.service${DOCKER_INSTALL_MARKER:+ (${DOCKER_INSTALL_MARKER})}"
|
||||
fi
|
||||
|
||||
vm_print_summary \
|
||||
"OS=${OS_DISPLAY}" \
|
||||
"Domain=https://${NETBIRD_DOMAIN_INPUT}" \
|
||||
"Docker=${DOCKER_STATUS}" \
|
||||
"NetBird unit=netbird-setup.service" \
|
||||
"Setup marker=${NETBIRD_SETUP_MARKER}"
|
||||
vm_next_steps \
|
||||
"NetBird installation continues in the VM on first boot." \
|
||||
"Monitor setup with: tail -f /var/log/netbird-setup.log (Docker install: /var/log/install-docker.log)" \
|
||||
"Keep ports open: 80/tcp, 443/tcp, 3478/udp."
|
||||
vm_finish "VM created. NetBird installation continues in the VM on first boot."
|
||||
+6
-3
@@ -395,14 +395,16 @@ qm create $VMID -agent 1${MACHINE} -tablet 0 -bios ovmf${CPU_TYPE} -cores $CORE_
|
||||
-name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC,firewall=0,queues=$CORE_COUNT$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
||||
vm_mark_created
|
||||
|
||||
# Retry pvesm alloc on transient zfs_request "got timeout" errors (#14127)
|
||||
# Retry on transient zfs_request "got timeout" errors (#14127)
|
||||
alloc_attempt=1
|
||||
alloc_max=4
|
||||
alloc_delay=5
|
||||
while :; do
|
||||
alloc_err=$(pvesm alloc $STORAGE $VMID $DISK0 4M 2>&1 >/dev/null) && break
|
||||
# Not in $( ): vm_alloc_efi_disk sets DISK0_REF to the volume Proxmox made.
|
||||
vm_alloc_efi_disk "$DISK0" 2>"/tmp/opnsense-efi-$$.err" && break
|
||||
alloc_err="$(<"/tmp/opnsense-efi-$$.err")"
|
||||
if [[ "$alloc_err" == *"got timeout"* && $alloc_attempt -lt $alloc_max ]]; then
|
||||
echo -e "${YW}[WARN]${CL} pvesm alloc hit zfs timeout (attempt $alloc_attempt/$alloc_max), retrying in ${alloc_delay}s..."
|
||||
echo -e "${YW}[WARN]${CL} EFI disk allocation hit zfs timeout (attempt $alloc_attempt/$alloc_max), retrying in ${alloc_delay}s..."
|
||||
pvesm free "${DISK0_REF}" &>/dev/null || true
|
||||
sleep "$alloc_delay"
|
||||
alloc_attempt=$((alloc_attempt + 1))
|
||||
@@ -412,6 +414,7 @@ while :; do
|
||||
msg_error "Could not allocate the EFI disk on ${STORAGE}: ${alloc_err}"
|
||||
exit 220
|
||||
done
|
||||
rm -f "/tmp/opnsense-efi-$$.err"
|
||||
vm_import_disk "$VMID" "$FILE" "$STORAGE"
|
||||
qm set $VMID \
|
||||
-efidisk0 ${DISK0_REF}${FORMAT} \
|
||||
|
||||
Reference in new issue
Block a user