Compare commits

...

5 Commits

Author SHA1 Message Date
MickLesk f3f39ba3e5 fix(caddy): skip the xCaddy test build below 2 GB RAM
The container defaults to 512 MB (256 MB on Alpine), and Go's linker was
killed in xcaddy build: 14 runs on 6 hosts in a week. The build only
produced an unused binary, so below 2 GB xCaddy is installed without it
and a warning says why; install and update alike.
2026-11-05 13:04:10 +01:00
community-scripts-pr-app[bot] 215f9be228 Update CHANGELOG.md (#18468)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-11-05 10:57:03 +00:00
CanbiZ (MickLesk) 3e7fcf1350 Arcane: write both env names, stop shipping the unused .env (#18466)
The compose file from main now uses ARCANE_ENCRYPTION_KEY and
ARCANE_PROJECTS_DIRECTORY, which the latest image (2.17.3) does not read,
so it panicked on a missing ENCRYPTION_KEY. Arcane 3 in turn refuses to
start when only the old names are set. Install and update now keep both
names in compose.yaml, which also carries existing installs over to 3.

The .env was never referenced by the compose file, but compose parses it,
and the unanchored ENCRYPTION_KEY sed turned the renamed line into
ARCANE_#ENCRYPTION_KEY and broke every install. New installs no longer
download it; update repairs the broken line.
2026-11-05 11:56:39 +01:00
CanbiZ (MickLesk) 8ba3582919 OPNsense VM: wait for the FreeBSD login prompt instead of 180 seconds (#18467)
The FreeBSD image boots in under a minute when both NICs get DHCP, but
dhclient waits 60 seconds on each NIC without a DHCP server, which is the
normal case for a firewall's LAN before setup. On vx-pve an isolated LAN
took 110 seconds; the reporter of #18464 measured 210. The keys then went
into the boot output. The image prints its login prompt on the serial
console as well, so the script now reads serial0 and continues when it
appears, up to 15 minutes, or waits the old 3 minutes if the console
cannot be read.
2026-11-05 11:56:32 +01:00
CanbiZ (MickLesk) 37e4a33615 Tududi: run 2.0 on PostgreSQL, keep SQLite installs on 1.15.0 (#18465)
Tududi 2.0.0 dropped SQLite and refuses to start next to a populated 1.x
database. New installs set up PostgreSQL and let start.sh create the
schema; db:init would sync the tables without SequelizeMeta and make
db-prepare treat the database as an old 1.x one. Installs without
DATABASE_URL stay on 1.15.0, the final SQLite release, which also brings
back installs that already updated to 2.0.0.

Uploads lived in backend/uploads, which CLEAN_INSTALL wiped on every
update; they move to /opt/tududi-uploads.
2026-11-05 11:56:29 +01:00
7 changed files with 105 additions and 47 deletions
+23
View File
@@ -571,6 +571,29 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-11-05
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- OPNsense VM: wait for the FreeBSD login prompt instead of 180 seconds [@MickLesk](https://github.com/MickLesk) ([#18467](https://github.com/community-scripts/ProxmoxVE/pull/18467))
- #### 🔧 Refactor
- Tududi: run 2.0 on PostgreSQL, keep SQLite installs on 1.15.0 [@MickLesk](https://github.com/MickLesk) ([#18465](https://github.com/community-scripts/ProxmoxVE/pull/18465))
### 💾 Core
- fix: keep the existing install until the new archive has extracted [@rcourtman](https://github.com/rcourtman) ([core#201](https://github.com/community-scripts/core/pull/201))
- fix: keep the install when a clone or an Alpine extract fails [@rcourtman](https://github.com/rcourtman) ([core#210](https://github.com/community-scripts/core/pull/210))
### 🧰 Tools
- #### 🐞 Bug Fixes
- Arcane: write both env names, stop shipping the unused .env [@MickLesk](https://github.com/MickLesk) ([#18466](https://github.com/community-scripts/ProxmoxVE/pull/18466))
## 2026-11-04
### 🚀 Updated Scripts
+7 -3
View File
@@ -55,9 +55,13 @@ update_deb_based() {
setup_go
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
msg_info "Updating xCaddy"
$STD xcaddy build
msg_ok "Updated xCaddy"
if (($(awk '/^MemTotal:/ {print int($2 / 1024)}' /proc/meminfo) < 1900)); then
msg_warn "xCaddy updated; its test build was skipped because linking Caddy needs about 2 GB RAM"
else
msg_info "Updating xCaddy"
$STD xcaddy build
msg_ok "Updated xCaddy"
fi
fi
fi
msg_ok "Updated successfully!"
+14 -2
View File
@@ -32,7 +32,14 @@ function update_script() {
NODE_VERSION="22" setup_nodejs
if check_for_gh_release "tududi" "chrisvel/tududi"; then
RELEASE=""
if ! grep -qs '^DATABASE_URL=' /opt/tududi/backend/.env; then
RELEASE="v1.15.0"
msg_warn "Tududi 2.0 runs on PostgreSQL only, so this SQLite install stays on 1.15.0"
msg_warn "To move to 2.0, export in Settings > Backups and import into a new Tududi LXC"
fi
if check_for_gh_release "tududi" "chrisvel/tududi" "${RELEASE}" "2.0 needs PostgreSQL"; then
msg_info "Stopping Service"
systemctl stop tududi
msg_ok "Stopped Service"
@@ -43,9 +50,14 @@ function update_script() {
else
cp /opt/tududi/.env /opt/tududi.env
fi
if ! grep -q '^TUDUDI_UPLOAD_PATH=' /opt/tududi.env; then
mkdir -p /opt/tududi-uploads
[[ -d /opt/tududi/backend/uploads ]] && cp -a /opt/tududi/backend/uploads/. /opt/tududi-uploads/
echo "TUDUDI_UPLOAD_PATH=/opt/tududi-uploads" >>/opt/tududi.env
fi
msg_ok "Backed up env file"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tududi" "chrisvel/tududi" "tarball" "latest" "/opt/tududi"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tududi" "chrisvel/tududi" "tarball" "${CHECK_UPDATE_RELEASE}" "/opt/tududi"
msg_info "Updating Tududi"
cd /opt/tududi
+15 -7
View File
@@ -23,10 +23,14 @@ setup_deb_based() {
setup_go
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
msg_info "Setup xCaddy"
$STD apt install -y git
$STD xcaddy build
msg_ok "Setup xCaddy"
if (($(awk '/^MemTotal:/ {print int($2 / 1024)}' /proc/meminfo) < 1900)); then
msg_warn "xCaddy is installed; its test build was skipped because linking Caddy needs about 2 GB RAM"
else
msg_info "Setup xCaddy"
$STD xcaddy build
msg_ok "Setup xCaddy"
fi
fi
}
@@ -69,10 +73,14 @@ EOF
GO_VERSION="$(curl -fsSL https://go.dev/VERSION?m=text | head -1 | cut -c3-)" setup_go
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "prebuild" "latest" "/opt/xcaddy" "xcaddy_*_linux_$(arch_resolve).tar.gz"
ln -sf /opt/xcaddy/xcaddy /usr/local/bin/xcaddy
msg_info "Setup xCaddy"
cd /opt
$STD xcaddy build
msg_ok "Setup xCaddy"
if (($(awk '/^MemTotal:/ {print int($2 / 1024)}' /proc/meminfo) < 1900)); then
msg_warn "xCaddy is installed; its test build was skipped because linking Caddy needs about 2 GB RAM"
else
msg_info "Setup xCaddy"
cd /opt
$STD xcaddy build
msg_ok "Setup xCaddy"
fi
fi
msg_info "Enabling Caddy Service"
+9 -21
View File
@@ -13,13 +13,9 @@ setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
sqlite3 \
yq
msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs
PG_VERSION="17" setup_postgresql
PG_DB_NAME="tududi" PG_DB_USER="tududi" setup_postgresql_db
fetch_and_deploy_gh_release "tududi" "chrisvel/tududi" "tarball" "latest" "/opt/tududi"
msg_info "Configuring Tududi"
@@ -30,30 +26,22 @@ $STD npm run frontend:build
mv ./dist ./backend
msg_ok "Configured Tududi"
msg_info "Creating env and database"
DB_LOCATION="/opt/tududi-db"
UPLOAD_DIR="/opt/tududi-uploads"
mkdir -p {"$DB_LOCATION","$UPLOAD_DIR"}
msg_info "Creating env"
mkdir -p /opt/tududi-uploads
SECRET="$(openssl rand -hex 64)"
sed -e '/^NODE_ENV=/s/=.*$/=production/' \
-e 's/^TUDUDI_USER/# TUDUDI_USER/g' \
-e "/_SECRET=/s/=.*$/=${SECRET}/" \
-e '/^# DB_FILE=/s/^# //' \
-e "s|^DB_FILE=.*|DB_FILE=${DB_LOCATION}/production.sqlite3|" \
-e "/^# TUDUDI_ALLOWED/s/^# //; \
\|_ORIGINS=|s|=.*$|=<your tududi IP or FDQN>|" \
-e "/^# TUDUDI_UPLOAD/s/^# //; \
\|UPLOAD_PATH=|s|=.*$|=${UPLOAD_DIR}|" \
-e "s/^TUDUDI_SESSION_SECRET=.*/TUDUDI_SESSION_SECRET=${SECRET}/" \
-e "s|^DATABASE_URL=.*|DATABASE_URL=postgres://tududi:${PG_DB_PASS}@localhost:5432/tududi|" \
/opt/tududi/backend/.env.example >/opt/tududi/backend/.env
export DB_FILE="${DB_LOCATION}/production.sqlite3"
$STD npm run db:init
msg_ok "Created env and database"
echo "TUDUDI_UPLOAD_PATH=/opt/tududi-uploads" >>/opt/tududi/backend/.env
msg_ok "Created env"
msg_info "Creating service"
cat <<EOF >/etc/systemd/system/tududi.service
[Unit]
Description=Tududi Service
After=network.target
After=network.target postgresql.service
[Service]
Type=simple
+17 -13
View File
@@ -58,8 +58,21 @@ function uninstall() {
# ==============================================================================
# UPDATE
# ==============================================================================
# Arcane 3 needs the ARCANE_* names, the current latest image reads only the old ones.
function sync_env_names() {
local key
for key in ENCRYPTION_KEY PROJECTS_DIRECTORY; do
grep -q "^[[:space:]]*- ARCANE_${key}=" "$COMPOSE_FILE" || sed -i "/^[[:space:]]*- ${key}=/{p;s/- ${key}=/- ARCANE_${key}=/;}" "$COMPOSE_FILE"
grep -q "^[[:space:]]*- ${key}=" "$COMPOSE_FILE" || sed -i "/^[[:space:]]*- ARCANE_${key}=/{p;s/- ARCANE_${key}=/- ${key}=/;}" "$COMPOSE_FILE"
done
if [[ -f "$ENV_FILE" ]]; then
sed -i 's/^ARCANE_#/#ARCANE_/' "$ENV_FILE"
fi
}
function update() {
chown -R 65532:65532 /etc/arcane/projects /etc/arcane/builds 2>/dev/null || true
sync_env_names
msg_info "Pulling latest ${APP} image"
cd "$INSTALL_PATH"
@@ -85,9 +98,8 @@ function install() {
msg_ok "Created ${INSTALL_PATH}"
# Generate secrets and config values
local ENCRYPTION_KEY JWT_SECRET PROJ_DIR BUILDS_DIR
local ENCRYPTION_KEY PROJ_DIR BUILDS_DIR
ENCRYPTION_KEY=$(random_password 32)
JWT_SECRET=$(random_password 32)
PROJ_DIR="/etc/arcane/projects"
BUILDS_DIR="/etc/arcane/builds"
@@ -108,20 +120,12 @@ function install() {
curl -fsSL "https://raw.githubusercontent.com/getarcaneapp/arcane/refs/heads/main/docker/examples/compose.basic.yaml" -o "$COMPOSE_FILE"
msg_ok "Downloaded Docker Compose file"
msg_info "Downloading .env file"
curl -fsSL "https://raw.githubusercontent.com/getarcaneapp/arcane/refs/heads/main/.env.example" -o "$ENV_FILE"
chmod 600 "$ENV_FILE"
msg_ok "Downloaded .env file"
msg_info "Configuring compose and env files"
msg_info "Configuring compose file"
sed -i '/^[[:space:]]*#/!s|/host/path/to/projects|'"$PROJ_DIR"'|g' "$COMPOSE_FILE"
sed -i '/^[[:space:]]*#/!s|/host/path/to/builds|'"$BUILDS_DIR"'|g' "$COMPOSE_FILE"
sed -i '/^[[:space:]]*#/!s|ENCRYPTION_KEY=.*|ENCRYPTION_KEY='"$ENCRYPTION_KEY"'|g' "$COMPOSE_FILE"
sed -i '/^[[:space:]]*#/!s|JWT_SECRET=.*|JWT_SECRET='"$JWT_SECRET"'|g' "$COMPOSE_FILE"
sed -i '/^[[:space:]]*#/!s|APP_URL=.*|APP_URL=http://localhost:'"$DEFAULT_PORT"'|g' "$ENV_FILE"
sed -i '/^[[:space:]]*#/!s|ENCRYPTION_KEY=.*|#&|g' "$ENV_FILE"
sed -i '/^[[:space:]]*#/!s|JWT_SECRET=.*|#&|g' "$ENV_FILE"
msg_ok "Configured compose and env files"
sync_env_names
msg_ok "Configured compose file"
msg_info "Starting ${APP}"
cd "$INSTALL_PATH"
+20 -1
View File
@@ -442,7 +442,26 @@ msg_ok "Bridge interfaces have been successfully added."
msg_ok "Created a OPNsense VM ${CL}${BL}(${HN})"
msg_ok "Starting OPNsense VM (the bootstrap takes 10-30 minutes)"
$STD qm start $VMID
sleep 180
# The FreeBSD image prints its login prompt on the serial console too. Boot takes
# under a minute with DHCP, each NIC without a DHCP server adds a 60s timeout.
SERIAL_LOG="${TEMP_DIR}/serial-${VMID}.log"
timeout 900 socat -u "UNIX-CONNECT:/var/run/qemu-server/${VMID}.serial0" - >"$SERIAL_LOG" 2>/dev/null &
SERIAL_PID=$!
boot_wait=0
until grep -aq 'login:' "$SERIAL_LOG" 2>/dev/null || ! kill -0 "$SERIAL_PID" 2>/dev/null; do
sleep 5
boot_wait=$((boot_wait + 5))
done
kill "$SERIAL_PID" 2>/dev/null || true
if grep -aq 'login:' "$SERIAL_LOG" 2>/dev/null; then
msg_ok "FreeBSD booted after ${boot_wait}s"
elif [ $boot_wait -lt 180 ]; then
msg_warn "Could not read the serial console, waiting 3 minutes instead"
sleep $((180 - boot_wait))
else
msg_warn "No login prompt on the serial console after $((boot_wait / 60)) minutes; continuing"
fi
sleep 3
send_line_to_vm "root"
sleep 2
send_line_to_vm ""