Compare commits

..
Author SHA1 Message Date
MickLesk cd40038c86 LibreNMS: write a valid APP_KEY before migrating
The install wrote a random 52-character string as APP_KEY and only
replaced it with a real key (key:generate) after artisan migrate. A
migration of the current release encrypts, so every new install died
with "Unsupported cipher or incorrect key length" (#18773). Write a
32-byte base64 key up front; key:generate afterwards would rotate it
past what the migration encrypted.
2026-11-16 19:09:43 +01:00
12 changed files with 119 additions and 722 deletions

No files matched your search

-28
View File
@@ -584,40 +584,12 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-11-17
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- LibreNMS: write a valid APP_KEY before migrating [@MickLesk](https://github.com/MickLesk) ([#18776](https://github.com/community-scripts/ProxmoxVE/pull/18776))
- #### ✨ New Features
- Portabase: support file and folder backups (restic / rclone) [@MickLesk](https://github.com/MickLesk) ([#18766](https://github.com/community-scripts/ProxmoxVE/pull/18766))
- #### 🔧 Refactor
- Change Detection: replace Browserless with SockPuppetBrowser [@MickLesk](https://github.com/MickLesk) ([#18767](https://github.com/community-scripts/ProxmoxVE/pull/18767))
### 🧰 Tools
- #### 🐞 Bug Fixes
- Arcane: show the generated admin password [@MickLesk](https://github.com/MickLesk) ([#18785](https://github.com/community-scripts/ProxmoxVE/pull/18785))
## 2026-11-16
### 🆕 New Scripts
- Gitea Runner ([#18782](https://github.com/community-scripts/ProxmoxVE/pull/18782))
- NetAlertX ([#18781](https://github.com/community-scripts/ProxmoxVE/pull/18781))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Dawarich: let Rails serve undigested asset paths [@ryanvo](https://github.com/ryanvo) ([#18779](https://github.com/community-scripts/ProxmoxVE/pull/18779))
- ArchiveBox: install libatomic1 for the Playwright driver [@MickLesk](https://github.com/MickLesk) ([#18722](https://github.com/community-scripts/ProxmoxVE/pull/18722))
- Ollama/OpenWebUI: download update before stopping the service [@jobben-2025](https://github.com/jobben-2025) ([#18755](https://github.com/community-scripts/ProxmoxVE/pull/18755))
- opengym: bump Node.js from 22 to 26 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#18756](https://github.com/community-scripts/ProxmoxVE/pull/18756))
+38 -65
View File
@@ -31,7 +31,7 @@ function update_script() {
exit
fi
ensure_dependencies libjpeg-dev poppler-utils file locales xvfb xauth python3
ensure_dependencies libjpeg-dev poppler-utils file locales
msg_info "Generating Locales"
for l in cs_CZ de_DE en_GB en_US es_ES fr_FR id_ID it_IT ja_JP ko_KR \
@@ -44,83 +44,56 @@ function update_script() {
fi
msg_ok "Generated Locales"
NODE_VERSION="24" setup_nodejs
VENV_PATH="/opt/changedetection/.venv"
CHANGEDETECTION_BIN="${VENV_PATH}/bin/changedetection.io"
SERVICE_FILE="/etc/systemd/system/changedetection.service"
PYTHON_VERSION="3.13" setup_uv
msg_info "Updating ${APP}"
[[ -x "$CHANGEDETECTION_BIN" ]] || $STD uv venv --clear "$VENV_PATH"
$STD uv pip install --python "$VENV_PATH/bin/python" --upgrade changedetection.io playwright
if ! grep -q "$CHANGEDETECTION_BIN" "$SERVICE_FILE"; then
sed -i "s|^ExecStart=.*|ExecStart=$CHANGEDETECTION_BIN -d /opt/changedetection -p 5000|" "$SERVICE_FILE"
fi
msg_ok "Updated ${APP}"
if [[ ! -f /etc/apt/sources.list.d/google-chrome.sources ]]; then
msg_info "Installing Chrome"
setup_deb822_repo \
"google-chrome" \
"https://dl.google.com/linux/linux_signing_key.pub" \
"https://dl.google.com/linux/chrome/deb/" \
"stable"
$STD apt install -y google-chrome-stable
rm -f /etc/apt/sources.list.d/google-chrome.list
msg_ok "Installed Chrome"
if [[ ! -d "$VENV_PATH" || ! -x "$CHANGEDETECTION_BIN" ]]; then
msg_info "Migrating to uv/venv"
rm -rf "$VENV_PATH"
$STD uv venv --clear "$VENV_PATH"
$STD "$VENV_PATH/bin/python" -m ensurepip --upgrade
$STD "$VENV_PATH/bin/python" -m pip install --upgrade pip
$STD "$VENV_PATH/bin/python" -m pip install changedetection.io playwright
msg_ok "Migrated to uv/venv"
else
msg_info "Updating Chrome"
apt_update_safe
$STD apt install -y --only-upgrade google-chrome-stable
msg_ok "Updated Chrome"
msg_info "Updating ${APP}"
$STD "$VENV_PATH/bin/python" -m pip install --upgrade changedetection.io playwright
msg_ok "Updated ${APP}"
fi
if check_for_gh_release "sockpuppetbrowser" "dgtlmoon/sockpuppetbrowser"; then
[[ -f /etc/systemd/system/sockpuppetbrowser.service ]] && systemctl stop sockpuppetbrowser
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "sockpuppetbrowser" "dgtlmoon/sockpuppetbrowser" "tarball"
msg_info "Setting up SockPuppetBrowser"
id -u chrome &>/dev/null || useradd -r -m -s /usr/sbin/nologin chrome
$STD uv venv --clear --python /usr/bin/python3 /opt/sockpuppetbrowser/.venv
$STD uv pip install --python /opt/sockpuppetbrowser/.venv/bin/python -r /opt/sockpuppetbrowser/requirements.txt
msg_ok "Set up SockPuppetBrowser"
SERVICE_FILE="/etc/systemd/system/changedetection.service"
if ! grep -q "${VENV_PATH}/bin/changedetection.io" "$SERVICE_FILE"; then
msg_info "Updating systemd service"
sed -i "s|^ExecStart=.*|ExecStart=${VENV_PATH}/bin/changedetection.io -d /opt/changedetection -p 5000|" "$SERVICE_FILE"
$STD systemctl daemon-reload
msg_ok "Updated systemd service"
fi
if [[ -f /etc/systemd/system/browserless.service ]]; then
msg_info "Replacing Browserless with SockPuppetBrowser"
systemctl disable -q --now browserless
rm -f /etc/systemd/system/browserless.service
rm -rf /opt/browserless /root/.cache/ms-playwright
$STD apt purge -y microsoft-edge-stable
rm -f /etc/apt/sources.list.d/microsoft-edge-stable.list
cat <<EOF >/etc/systemd/system/sockpuppetbrowser.service
[Unit]
Description=SockPuppetBrowser
After=network.target
[Service]
User=chrome
Group=chrome
WorkingDirectory=/opt/sockpuppetbrowser/backend
Environment=CHROME_BIN=/usr/bin/google-chrome-stable
Environment=LOG_LEVEL=INFO
ExecStart=/opt/sockpuppetbrowser/.venv/bin/python server.py --host 127.0.0.1 --port 3000 --sport 8080
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
sed -i 's/browserless\.service/sockpuppetbrowser.service/g' "$SERVICE_FILE"
sed -i -e '/^WEBDRIVER_URL=/d' \
-e 's|^PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome.*|PLAYWRIGHT_DRIVER_URL=ws://127.0.0.1:3000/?headful=true\&--window-size=1920,1080|' \
/opt/changedetection/.env
systemctl daemon-reload
systemctl enable -q sockpuppetbrowser
msg_ok "Replaced Browserless with SockPuppetBrowser"
msg_info "Updating Browserless (Patience)"
$STD git -C /opt/browserless/ fetch --all
$STD git -C /opt/browserless/ reset --hard origin/main
$STD npm ci --include=optional --include=dev --prefix /opt/browserless
$STD npm install --save-exact playwright-core@1.62.1 --prefix /opt/browserless
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps
# Update Chrome separately, as it has to be done with the force option. Otherwise the installation of other browsers will not be done if Chrome is already installed.
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force msedge
$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit
$STD npm install --prefix /opt/browserless esbuild typescript ts-node @types/node --save-dev
$STD npm run build --prefix /opt/browserless
$STD npm run build:function --prefix /opt/browserless
$STD npm prune production --prefix /opt/browserless
systemctl restart browserless
msg_ok "Updated Browserless"
else
msg_error "No Browserless Installation Found!"
fi
systemctl daemon-reload
systemctl restart sockpuppetbrowser
systemctl restart changedetection
msg_ok "Updated successfully!"
exit
-7
View File
@@ -40,13 +40,6 @@ function update_script() {
msg_ok "Fixed MapLibre delivery in Nginx"
fi
if [[ -f /etc/nginx/sites-available/dawarich.conf ]] && grep -q 'try_files \$uri =404;' /etc/nginx/sites-available/dawarich.conf; then
msg_info "Fixing Dawarich asset fallback in Nginx"
sed -i 's|try_files \$uri =404;|try_files $uri @rails;|' /etc/nginx/sites-available/dawarich.conf
nginx_enable_site dawarich.conf
msg_ok "Fixed Dawarich asset fallback in Nginx"
fi
if check_for_gh_release "dawarich" "Freika/dawarich"; then
msg_info "Stopping Services"
systemctl stop dawarich-web dawarich-worker
-135
View File
@@ -1,135 +0,0 @@
#!/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: community-scripts
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://gitea.com/gitea/runner
APP="Gitea-Runner"
var_tags="${var_tags:-ci;git}"
var_cpu="${var_cpu:-2}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
# Needed for container-based workflow execution (Docker/Podman inside LXC)
var_nesting="${var_nesting:-1}"
var_keyctl="${var_keyctl:-1}"
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
var_os=$(msg_menu "Choose the container OS" \
"debian" "Debian 13" \
"alpine" "Alpine 3.24 (smaller)")
fi
var_os="${var_os:-debian}"
if [[ "${var_os:-}" == "alpine" ]]; then
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-4}"
var_version="${var_version:-3.24}"
else
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_version="${var_version:-13}"
fi
export var_gitea_url="${var_gitea_url:-}"
export var_gitea_token="${var_gitea_token:-}"
header_info "$APP"
variables
color
catch_errors
update_deb_based() {
if [[ ! -f /usr/local/bin/gitea-runner ]]; then
msg_error "No ${APP} Installation Found!"
exit 1
fi
ensure_dependencies git
RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//')
if [[ "${RELEASE}" == "$(cat ~/.gitea-runner 2>/dev/null)" ]]; then
msg_ok "No update required. ${APP} is already at v${RELEASE}"
exit
fi
msg_info "Stopping Service"
systemctl stop gitea-runner
msg_ok "Stopped Service"
msg_info "Updating ${APP} to v${RELEASE}"
$STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)"
chmod +x /usr/local/bin/gitea-runner
ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner
echo "${RELEASE}" >~/.gitea-runner
msg_ok "Updated ${APP} to v${RELEASE}"
msg_info "Starting Service"
systemctl start gitea-runner
msg_ok "Started Service"
msg_ok "Updated successfully!"
}
update_alpine() {
if [[ ! -f /usr/local/bin/gitea-runner ]]; then
msg_error "No ${APP} Installation Found!"
exit 1
fi
msg_info "Updating Alpine Packages"
$STD apk -U upgrade
$STD apk add --no-cache git
msg_ok "Updated Alpine Packages"
RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//')
if [[ "${RELEASE}" == "$(cat ~/.gitea-runner 2>/dev/null)" ]]; then
msg_ok "No update required. ${APP} is already at v${RELEASE}"
exit
fi
msg_info "Stopping Service"
$STD rc-service gitea-runner stop
msg_ok "Stopped Service"
msg_info "Updating ${APP} to v${RELEASE}"
$STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)"
chmod +x /usr/local/bin/gitea-runner
ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner
echo "${RELEASE}" >~/.gitea-runner
msg_ok "Updated ${APP} to v${RELEASE}"
msg_info "Starting Service"
$STD rc-service gitea-runner start
msg_ok "Started Service"
msg_ok "Updated successfully!"
}
function update_script() {
header_info
check_container_storage
check_container_resources
run_os_update
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}To register the runner, execute the following command in the container console:${CL}"
if [[ -n "${var_gitea_url:-}" ]]; then
echo -e "${TAB}${BGN}gitea-runner -c /etc/gitea-runner/config.yaml register --instance ${var_gitea_url} --token <REGISTRATION_TOKEN>${CL}"
else
echo -e "${TAB}${BGN}gitea-runner -c /etc/gitea-runner/config.yaml register --instance <GITEA_INSTANCE_URL> --token <REGISTRATION_TOKEN>${CL}"
fi
echo -e "${INFO}${YW}After registering, start the runner daemon:${CL}"
if [[ "${var_os:-}" == "alpine" ]]; then
echo -e "${TAB}${BGN}rc-service gitea-runner start${CL}"
else
echo -e "${TAB}${BGN}systemctl start gitea-runner${CL}"
fi
echo -e "${INFO}${YW}Official registration documentation:${CL}"
echo -e "${GATEWAY}${BGN}https://docs.gitea.com/runner/registration/${CL}"
-65
View File
@@ -1,65 +0,0 @@
#!/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/netalertx/NetAlertX
APP="NetAlertX"
var_tags="${var_tags:-network;monitoring}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
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}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/netalertx ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "netalertx" "netalertx/NetAlertX"; then
msg_info "Stopping NetAlertX"
systemctl stop netalertx
msg_ok "Stopped NetAlertX"
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP=".venv" fetch_and_deploy_gh_release "netalertx" "netalertx/NetAlertX" "tarball"
msg_info "Updating NetAlertX"
cd /opt/netalertx
$STD uv pip install --python .venv/bin/python -r requirements.txt
ln -sfn /opt/netalertx/install/production-filesystem/services /opt/netalertx/services
echo "v$(cat ~/.netalertx)" >/opt/netalertx/.VERSION
date +%s >/opt/netalertx/front/buildtimestamp.txt
msg_ok "Updated NetAlertX"
msg_info "Starting NetAlertX"
systemctl start netalertx
msg_ok "Started NetAlertX"
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}:20211${CL}"
echo -e "${INFO}${YW}The login password is in /opt/netalertx_data/.env${CL}"
-40
View File
@@ -31,46 +31,6 @@ function update_script() {
exit
fi
TOOLS_CHANGED=false
if check_for_gh_release "rclone" "rclone/rclone"; then
TOOLS_CHANGED=true
fetch_and_deploy_gh_release "rclone" "rclone/rclone" "binary" "latest" "" "rclone-v*-linux-$(arch_resolve).deb"
fi
if check_for_gh_release "restic" "restic/restic"; then
TOOLS_CHANGED=true
fetch_and_deploy_gh_release "restic" "restic/restic" "singlefile" "latest" "/usr/local/bin" "restic_*_linux_$(arch_resolve).bz2"
fi
if ! grep -q "/storage/restic/" /etc/nginx/sites-available/portabase; then
msg_info "Adding file backup routes to Nginx"
cat <<'EOF' >/tmp/portabase-storage.conf
location /storage/restic/ {
proxy_pass http://127.0.0.1:1081;
proxy_request_buffering off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /storage/sync/ {
proxy_pass http://127.0.0.1:1082;
proxy_request_buffering off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
EOF
sed -i '/ignore_invalid_headers off;/r /tmp/portabase-storage.conf' /etc/nginx/sites-available/portabase
rm -f /tmp/portabase-storage.conf
$STD nginx -t
systemctl reload nginx
msg_ok "Added file backup routes to Nginx"
fi
if [[ "$TOOLS_CHANGED" == "true" ]]; then
systemctl restart portabase
fi
if check_for_gh_release "portabase" "Portabase/portabase"; then
msg_info "Stopping Services"
systemctl stop portabase portabase-tusd
+79 -42
View File
@@ -13,13 +13,32 @@ setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
msg_info "Installing Dependencies (Patience)"
$STD apt install -y \
git \
build-essential \
dumb-init \
libjpeg-dev \
libatk-bridge2.0-0 \
libasound2 \
libatk1.0-0 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libgbm-dev \
libgbm1 \
libgdk-pixbuf-2.0-0 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
qpdf \
xdg-utils \
xvfb \
xauth \
python3 \
ca-certificates \
locales \
poppler-utils \
file
@@ -35,25 +54,35 @@ msg_ok "Generated Locales"
PYTHON_VERSION="3.13" setup_uv
NODE_VERSION="24" setup_nodejs
msg_info "Installing Change Detection"
mkdir -p /opt/changedetection
$STD uv venv --clear /opt/changedetection/.venv
$STD uv pip install --python /opt/changedetection/.venv/bin/python changedetection.io playwright
$STD /opt/changedetection/.venv/bin/python -m ensurepip --upgrade
$STD /opt/changedetection/.venv/bin/python -m pip install --upgrade pip
$STD /opt/changedetection/.venv/bin/python -m pip install changedetection.io
cat <<EOF >/opt/changedetection/.env
PLAYWRIGHT_DRIVER_URL=ws://127.0.0.1:3000/?headful=true&--window-size=1920,1080
WEBDRIVER_URL=http://127.0.0.1:4444/wd/hub
PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch=eyJkZWZhdWx0Vmlld3BvcnQiOnsiaGVpZ2h0Ijo3MjAsIndpZHRoIjoxMjgwfSwiaGVhZGxlc3MiOmZhbHNlLCJzdGVhbHRoIjp0cnVlfQ==&blockAds=true
LC_ALL=en_US.UTF-8
EOF
msg_ok "Installed Change Detection"
msg_info "Installing Chrome"
setup_deb822_repo \
"google-chrome" \
"https://dl.google.com/linux/linux_signing_key.pub" \
"https://dl.google.com/linux/chrome/deb/" \
"stable"
$STD apt install -y google-chrome-stable
rm -f /etc/apt/sources.list.d/google-chrome.list
msg_ok "Installed Chrome"
msg_info "Installing Browserless & Playwright"
mkdir /opt/browserless
$STD /opt/changedetection/.venv/bin/python -m pip install playwright
$STD git clone https://github.com/browserless/chrome /opt/browserless
$STD npm ci --include=optional --include=dev --prefix /opt/browserless
$STD npm install --save-exact playwright-core@1.62.1 --prefix /opt/browserless
$STD /opt/browserless/node_modules/playwright-core/cli.js install --with-deps &>/dev/null
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force chrome &>/dev/null
$STD /opt/browserless/node_modules/playwright-core/cli.js install chromium firefox webkit &>/dev/null
$STD /opt/browserless/node_modules/playwright-core/cli.js install --force msedge
$STD npm run build --prefix /opt/browserless
$STD npm run build:function --prefix /opt/browserless
$STD npm prune production --prefix /opt/browserless
msg_ok "Installed Browserless & Playwright"
msg_info "Installing Font Packages"
$STD apt install -y \
@@ -70,38 +99,30 @@ $STD apt install -y \
fonts-wqy-zenhei
msg_ok "Installed Font Packages"
fetch_and_deploy_gh_release "sockpuppetbrowser" "dgtlmoon/sockpuppetbrowser" "tarball"
msg_info "Setting up SockPuppetBrowser"
useradd -r -m -s /usr/sbin/nologin chrome
$STD uv venv --clear --python /usr/bin/python3 /opt/sockpuppetbrowser/.venv
$STD uv pip install --python /opt/sockpuppetbrowser/.venv/bin/python -r /opt/sockpuppetbrowser/requirements.txt
msg_ok "Set up SockPuppetBrowser"
msg_info "Installing X11 Packages"
$STD apt install -y \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6
msg_ok "Installed X11 Packages"
msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/sockpuppetbrowser.service
[Unit]
Description=SockPuppetBrowser
After=network.target
[Service]
User=chrome
Group=chrome
WorkingDirectory=/opt/sockpuppetbrowser/backend
Environment=CHROME_BIN=/usr/bin/google-chrome-stable
Environment=LOG_LEVEL=INFO
ExecStart=/opt/sockpuppetbrowser/.venv/bin/python server.py --host 127.0.0.1 --port 3000 --sport 8080
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/changedetection.service
[Unit]
Description=Change Detection
After=network-online.target sockpuppetbrowser.service
Wants=sockpuppetbrowser.service
After=network-online.target
After=network.target browserless.service
Wants=browserless.service
[Service]
Type=simple
@@ -112,7 +133,23 @@ ExecStart=/opt/changedetection/.venv/bin/changedetection.io -d /opt/changedetect
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now sockpuppetbrowser changedetection
cat <<EOF >/etc/systemd/system/browserless.service
[Unit]
Description=browserless service
After=network.target
[Service]
Environment=CONNECTION_TIMEOUT=60000
WorkingDirectory=/opt/browserless
ExecStart=/opt/browserless/scripts/start.sh
SyslogIdentifier=browserless
[Install]
WantedBy=default.target
EOF
systemctl enable -q --now browserless
systemctl enable -q --now changedetection
msg_ok "Created Services"
motd_ssh
+1 -1
View File
@@ -159,7 +159,7 @@ server {
location ~ ^/(assets|packs)/ {
expires max;
add_header Cache-Control "public, immutable";
try_files \$uri @rails;
try_files \$uri =404;
}
location / {
-129
View File
@@ -1,129 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: community-scripts
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://gitea.com/gitea/runner
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
setup_deb_based() {
msg_info "Installing Dependencies"
$STD apt install -y git
msg_ok "Installed Dependencies"
setup_docker
msg_info "Installing Gitea Runner"
RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//')
$STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)"
chmod +x /usr/local/bin/gitea-runner
ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner
echo "${RELEASE}" >~/.gitea-runner
msg_ok "Installed Gitea Runner v${RELEASE}"
msg_info "Configuring Gitea Runner"
mkdir -p /etc/gitea-runner /var/lib/gitea-runner
/usr/local/bin/gitea-runner config generate >/etc/gitea-runner/config.yaml
sed -i 's|.*file:.*\.runner.*| file: /var/lib/gitea-runner/.runner|' /etc/gitea-runner/config.yaml
msg_ok "Configured Gitea Runner"
if [[ -n "${var_gitea_url:-}" ]] && [[ -n "${var_gitea_token:-}" ]]; then
msg_info "Registering Gitea Runner"
$STD /usr/local/bin/gitea-runner register --no-interactive --config /etc/gitea-runner/config.yaml --instance "${var_gitea_url}" --token "${var_gitea_token}" --name "$(hostname)"
msg_ok "Registered Gitea Runner"
fi
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/gitea-runner.service
[Unit]
Description=Gitea Actions Runner
Documentation=https://docs.gitea.com/runner/
After=network-online.target docker.service
Wants=network-online.target docker.service
[Service]
Type=simple
ExecStart=/usr/local/bin/gitea-runner daemon --config /etc/gitea-runner/config.yaml
WorkingDirectory=/var/lib/gitea-runner
Environment=HOME=/var/lib/gitea-runner
Restart=on-failure
RestartSec=5s
TimeoutStopSec=3h
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q gitea-runner
if [[ -s /var/lib/gitea-runner/.runner ]]; then
systemctl start gitea-runner
fi
msg_ok "Created Service"
}
setup_alpine() {
msg_info "Installing Docker"
$STD apk add --no-cache docker docker-cli-compose git
$STD rc-update add docker default
$STD rc-service docker start
msg_ok "Installed Docker"
msg_info "Installing Gitea Runner"
RELEASE=$(curl -fsSL https://gitea.com/api/v1/repos/gitea/runner/releases/latest | jq -r .tag_name | sed 's/^v//')
$STD curl -fsSL -o /usr/local/bin/gitea-runner "https://gitea.com/gitea/runner/releases/download/v${RELEASE}/gitea-runner-${RELEASE}-linux-$(arch_resolve)"
chmod +x /usr/local/bin/gitea-runner
ln -sf /usr/local/bin/gitea-runner /usr/local/bin/act_runner
echo "${RELEASE}" >~/.gitea-runner
msg_ok "Installed Gitea Runner v${RELEASE}"
msg_info "Configuring Gitea Runner"
mkdir -p /etc/gitea-runner /var/lib/gitea-runner
/usr/local/bin/gitea-runner config generate >/etc/gitea-runner/config.yaml
sed -i 's|.*file:.*\.runner.*| file: /var/lib/gitea-runner/.runner|' /etc/gitea-runner/config.yaml
msg_ok "Configured Gitea Runner"
if [[ -n "${var_gitea_url:-}" ]] && [[ -n "${var_gitea_token:-}" ]]; then
msg_info "Registering Gitea Runner"
$STD /usr/local/bin/gitea-runner register --no-interactive --config /etc/gitea-runner/config.yaml --instance "${var_gitea_url}" --token "${var_gitea_token}" --name "$(hostname)"
msg_ok "Registered Gitea Runner"
fi
msg_info "Creating Service"
cat <<'EOF' >/etc/init.d/gitea-runner
#!/sbin/openrc-run
name="gitea-runner"
description="Gitea Actions Runner"
export HOME="/var/lib/gitea-runner"
command="/usr/local/bin/gitea-runner"
command_args="daemon --config /etc/gitea-runner/config.yaml"
directory="/var/lib/gitea-runner"
command_background="yes"
pidfile="/run/gitea-runner.pid"
output_log="/var/log/gitea-runner.log"
error_log="/var/log/gitea-runner.log"
depend() {
need net docker
after firewall
}
EOF
chmod +x /etc/init.d/gitea-runner
$STD rc-update add gitea-runner default
if [[ -s /var/lib/gitea-runner/.runner ]]; then
$STD rc-service gitea-runner start
fi
msg_ok "Created Service"
}
run_os_setup
motd_ssh
customize
cleanup_lxc
-183
View File
@@ -1,183 +0,0 @@
#!/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/netalertx/NetAlertX
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 \
sqlite3 \
arp-scan \
nmap \
fping \
nbtscan \
traceroute \
mtr-tiny \
iw \
snmp \
dnsutils \
net-tools \
avahi-utils \
libwww-perl \
usbutils \
psmisc \
wget \
zip \
cron
msg_ok "Installed Dependencies"
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="curl,sqlite3" setup_php
export UV_PYTHON_INSTALL_DIR="/opt/uv-python"
PYTHON_VERSION="3.13" setup_uv
fetch_and_deploy_gh_release "netalertx" "netalertx/NetAlertX" "tarball"
msg_info "Setting up NetAlertX"
cd /opt/netalertx
$STD uv venv --python 3.13 .venv
$STD uv pip install --python .venv/bin/python -r requirements.txt
ln -sfn /opt/netalertx/install/production-filesystem/services /opt/netalertx/services
ln -sfn /opt/netalertx /app
echo "v$(cat ~/.netalertx)" >/opt/netalertx/.VERSION
date +%s >/opt/netalertx/front/buildtimestamp.txt
mkdir -p /opt/netalertx_data/{config,db,log/plugins,api,tmp}
touch /opt/netalertx_data/log/{app.log,execution_queue.log,app_front.log,app.php_errors.log,stderr.log,db_is_locked.log}
install -m 600 /opt/netalertx/back/app.conf /opt/netalertx_data/config/app.conf
cp /opt/netalertx/back/app.db /opt/netalertx_data/db/app.db
NETALERTX_PASSWORD=$(random_password)
sed -i "s|^TIMEZONE=.*|TIMEZONE='$(timedatectl show -p Timezone --value 2>/dev/null || echo Etc/UTC)'|" /opt/netalertx_data/config/app.conf
cat <<EOF >>/opt/netalertx_data/config/app.conf
ARPSCAN_ARGS='arp-scan --ignoredups --retry=6'
NMAPDEV_ARGS='nmap --privileged -sn -PR -oX - '
SETPWD_enable_password=True
SETPWD_password='$(echo -n "$NETALERTX_PASSWORD" | sha256sum | awk '{print $1}')'
EOF
cat <<EOF >/opt/netalertx_data/.env
NETALERTX_PASSWORD=${NETALERTX_PASSWORD}
NETALERTX_APP=/opt/netalertx
NETALERTX_DATA=/opt/netalertx_data
NETALERTX_CONFIG=/opt/netalertx_data/config
NETALERTX_DB=/opt/netalertx_data/db
NETALERTX_API=/opt/netalertx_data/api
NETALERTX_LOG=/opt/netalertx_data/log
NETALERTX_TMP=/opt/netalertx_data/tmp
SYSTEM_SERVICES_RUN_TMP=/opt/netalertx_data/tmp
VENDORSPATH_NEWEST=/opt/netalertx_data/tmp/ieee-oui.txt
LOG_EXECUTION_QUEUE=/opt/netalertx_data/log/execution_queue.log
PYTHONPATH=/opt/netalertx:/opt/netalertx/server:/opt/netalertx/server/plugins
PATH=/opt/netalertx/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PYTHONUNBUFFERED=1
NMAP_PRIVILEGED=1
EOF
chmod 600 /opt/netalertx_data/.env
chown -R www-data:www-data /opt/netalertx_data
msg_ok "Set up NetAlertX"
msg_info "Configuring PHP-FPM and Nginx"
cat <<EOF >/etc/php/8.4/fpm/pool.d/netalertx.conf
[netalertx]
user = www-data
group = www-data
listen = /run/php/netalertx.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
env[NETALERTX_CONFIG] = /opt/netalertx_data/config
env[NETALERTX_DB] = /opt/netalertx_data/db
env[NETALERTX_API] = /opt/netalertx_data/api
env[NETALERTX_LOG] = /opt/netalertx_data/log
php_admin_value[memory_limit] = 256M
EOF
systemctl restart php8.4-fpm
cat <<'EOF' >/etc/nginx/sites-available/netalertx
map "$http_referer|$http_host" $sec_legacy {
"~^https?://(?<ref_host>[^/:]+)(?::\d+)?/.*\|\k<ref_host>(?::\d+)?$" "TRUSTED";
default "UNTRUSTED";
}
map $http_sec_fetch_site $is_trusted {
"same-origin" "TRUSTED";
"" $sec_legacy;
default "UNTRUSTED";
}
server {
listen 20211 default_server;
large_client_header_buffers 4 16k;
root /opt/netalertx/front;
index index.php;
add_header X-Forwarded-Prefix "/app" always;
location /server/ {
error_page 403 /403_internal.html;
if ($is_trusted != "TRUSTED") {
return 403;
}
rewrite ^/server/(.*)$ /$1 break;
proxy_pass http://127.0.0.1:20212;
proxy_buffering off;
proxy_cache off;
proxy_http_version 1.1;
proxy_set_header Connection "";
client_max_body_size 50m;
proxy_read_timeout 3600s;
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 ~* \.php$ {
add_header Cache-Control "no-store";
fastcgi_pass unix:/run/php/netalertx.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_read_timeout 600;
}
}
EOF
nginx_enable_site "netalertx"
msg_ok "Configured PHP-FPM and Nginx"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/netalertx.service
[Unit]
Description=NetAlertX Backend
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/opt/netalertx
EnvironmentFile=/opt/netalertx_data/.env
AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN CAP_NET_BIND_SERVICE
ExecStart=/opt/netalertx/.venv/bin/python3 -m server
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/cron.d/netalertx
* * * * * www-data LOG_EXECUTION_QUEUE=/opt/netalertx_data/log/execution_queue.log /opt/netalertx/services/scripts/cron_script.sh >/dev/null 2>&1
EOF
systemctl enable -q --now netalertx
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc
-20
View File
@@ -26,8 +26,6 @@ PG_DB_NAME="portabase" PG_DB_USER="portabase" setup_postgresql_db
fetch_and_deploy_gh_release "portabase" "Portabase/portabase" "tarball"
fetch_and_deploy_gh_release "tusd" "tus/tusd" "prebuild" "latest" "/opt/tusd" "tusd_linux_$(arch_resolve).tar.gz"
fetch_and_deploy_gh_release "rclone" "rclone/rclone" "binary" "latest" "" "rclone-v*-linux-$(arch_resolve).deb"
fetch_and_deploy_gh_release "restic" "restic/restic" "singlefile" "latest" "/usr/local/bin" "restic_*_linux_$(arch_resolve).bz2"
msg_info "Configuring Portabase"
mkdir -p /opt/portabase-data/uploads/tmp
@@ -143,24 +141,6 @@ server {
proxy_set_header Connection "upgrade";
}
location /storage/restic/ {
proxy_pass http://127.0.0.1:1081;
proxy_request_buffering off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /storage/sync/ {
proxy_pass http://127.0.0.1:1082;
proxy_request_buffering off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location = /api/tus/hooks {
deny all;
return 404;
+1 -7
View File
@@ -130,12 +130,6 @@ function install() {
msg_info "Starting ${APP}"
cd "$INSTALL_PATH"
$STD docker compose up -d
local ADMIN_PASS=""
for _ in {1..30}; do
ADMIN_PASS=$(docker cp arcane:/app/data/initial-admin-password - 2>/dev/null | tar -xO 2>/dev/null || true)
[[ -n "$ADMIN_PASS" ]] && break
sleep 1
done
msg_ok "Started ${APP}"
# Create update script
@@ -154,7 +148,7 @@ UPDATEEOF
echo -e "Arcane Credentials"
echo -e "=================="
echo -e "User: arcane"
echo -e "Password: ${ADMIN_PASS:-run 'docker cp arcane:/app/data/initial-admin-password - | tar -xO'}"
echo -e "Password: arcane-admin"
echo ""
msg_warn "On first access, you'll be prompted to change your password."
}