Compare commits

..
Author SHA1 Message Date
CanbiZ (MickLesk) ba62bc3882 Hermes Agent: serve the Webapp from the gateway instead of hermes dashboard (#19322)
* Hermes Agent: serve the Webapp from the gateway instead of hermes dashboard

hermes dashboard is deprecated. New installs set up the gateway as a user
service with the Webapp on 127.0.0.1:9119; updates move an existing
dashboard there with hermes gateway migrate --backends, which keeps the
address and can be undone with --restore.

* Update hermesagent-install.sh
2026-12-06 12:00:09 +01:00
CanbiZ (MickLesk) c0d06f46e6 Immich: unpack the base image without restoring its owners (#19323)
A container whose idmap leaves out uid 1000 (a common bind-mount setup)
failed the unpack with "lchown /home/node: invalid argument" and was told
it needs Proxmox VE 9.1. Only /usr/local is used, which is root-owned
either way.
2026-12-06 11:34:39 +01:00
CanbiZ (MickLesk) a9845be53d MusicGrabber: install the FLAC Verifier from its release binary (#19320)
* MusicGrabber: install the FLAC Verifier from its release binary

MusicGrabber 4.7.1 replaced the Python engine with a static binary, so the
commit the scripts read from the Dockerfile is gone and every install and
update has ended in a 404 since. The version now comes from the release URL
in the Dockerfile, and a Dockerfile without one only leaves the check off.

An update also runs when the service is stopped: that is the state the
failed update left behind, with the stamp already at the new version.

* fix update check

Remove commented line about stopped service.

* MusicGrabber: read Python and the packages from upstream's Dockerfile

The pins in the scripts were a copy of the Dockerfile and went stale with
every release: upstream is on Python 3.15, apprise 2 and PyJWT by now. Both
scripts now read the Python version and the pip packages from the Dockerfile
of the release they deploy.

The update reads them before it stops the service and changes nothing when
the Dockerfile no longer names them. It rebuilds the venv, so dropped
packages and a new Python version arrive as well.
2026-12-06 11:30:17 +01:00
CanbiZ (MickLesk) e3d12fe346 Immich: retry the base image download (#19321)
skopeo gives up on the first failed request. In a week that ended eight
installs: ghcr.io answering 429 with a retry-after of under a millisecond,
DNS and connect timeouts, a dropped connection. --retry-times repeats the
copy for exactly these, after 1, 2 and 4 seconds, and keeps the layers it
already has.
2026-12-06 11:27:49 +01:00
6b202d4ed0 networkoptimizer: build all Go helpers (WAN Steering, AP Agent) (#19285)
Follow upstream docker/NATIVE-DEPLOYMENT.md "Build the Go Helpers": besides
uwnspeedtest, build wansteer (gateway, arm64) and apagent (arm/GOARM=7,
arm64, mipsle, mips softfloat) into publish/tools, and stamp every binary
with main.version so the app can report which build each one runs.

Without them WAN Steering reports "WAN Steering binary not found" and AP
Telemetry deploy fails with "The AP Agent binary for <arch> is not included
in this build."

Co-authored-by: Dave Packham <dpackham@p0larmacm4.thepackhams.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-06 10:32:00 +01:00
6 changed files with 75 additions and 43 deletions

No files matched your search

+22 -2
View File
@@ -76,7 +76,9 @@ EOF
sleep 1
chown -R hermes:hermes /home/hermes || msg_warn "Could not take ownership of everything under /home/hermes"
fi
$STD runuser -l hermes -c 'systemctl --user daemon-reload && systemctl --user enable hermes-dashboard'
if [[ -f /home/hermes/.config/systemd/user/hermes-dashboard.service && ! -f /home/hermes/.hermes/backend_migration.json ]]; then
$STD runuser -l hermes -c 'systemctl --user daemon-reload && systemctl --user enable hermes-dashboard'
fi
NODE_VERSION="22" setup_nodejs
@@ -88,8 +90,26 @@ EOF
msg_ok "Updated Hermes Agent"
msg_info "Starting Services"
$STD runuser -l hermes -c 'systemctl --user start hermes-dashboard'
$STD runuser -l hermes -c '
systemctl --user daemon-reload
if systemctl --user is-enabled -q hermes-dashboard 2>/dev/null; then systemctl --user start hermes-dashboard; fi
if systemctl --user is-enabled -q hermes-gateway 2>/dev/null; then systemctl --user restart hermes-gateway; fi
'
msg_ok "Started Services"
# hermes dashboard is deprecated; upstream moves it onto the gateway's Webapp on the same address.
if [[ -f /home/hermes/.config/systemd/user/hermes-dashboard.service && ! -f /home/hermes/.hermes/backend_migration.json ]]; then
msg_info "Moving the Dashboard to the Gateway's Webapp"
for _ in {1..30}; do
curl -so /dev/null http://127.0.0.1:9119/ && break
sleep 1
done
if $STD runuser -l hermes -c 'set -a; source /etc/default/hermes; set +a; hermes gateway migrate --backends --apply --yes'; then
msg_ok "Moved the Dashboard to the Gateway's Webapp"
else
msg_warn "Could not move the Dashboard to the Gateway's Webapp, it keeps running"
fi
fi
msg_ok "Updated successfully!"
exit
}
+3 -3
View File
@@ -459,14 +459,14 @@ function fetch_prebuilt_libs() {
local oci_dir
oci_dir="$(mktemp -d)"
PREBUILT_BUNDLE="$(mktemp -d)"
if ! $STD skopeo copy --override-os linux --override-arch "$(arch_resolve amd64 arm64)" "docker://${image}" "oci:${oci_dir}:img"; then
if ! $STD skopeo copy --retry-times 3 --override-os linux --override-arch "$(arch_resolve amd64 arm64)" "docker://${image}" "oci:${oci_dir}:img"; then
rm -rf "$oci_dir" "$PREBUILT_BUNDLE"
msg_error "Could not download Immich's base image (${image}). Immich was not updated."
exit 115
fi
if ! $STD umoci unpack --image "${oci_dir}:img" "$PREBUILT_BUNDLE"; then
if ! $STD umoci unpack --rootless --image "${oci_dir}:img" "$PREBUILT_BUNDLE"; then
rm -rf "$oci_dir" "$PREBUILT_BUNDLE"
msg_error "Could not unpack Immich's base image. Immich needs Proxmox VE 9.1 or newer; it was not updated."
msg_error "Could not unpack Immich's base image. Immich was not updated."
exit 105
fi
rm -rf "$oci_dir"
+17 -4
View File
@@ -50,12 +50,25 @@ function update_script() {
export DOTNET_SYSTEM_NET_DISABLEIPV6=1
$STD dotnet publish src/NetworkOptimizer.Web -c Release -r "$RID" --self-contained -o /opt/networkoptimizer/publish
chmod +x /opt/networkoptimizer/publish/NetworkOptimizer.Web
mkdir -p /opt/networkoptimizer/publish/tools
cd /opt/networkoptimizer/src/uwnspeedtest
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "-s -w" -o /opt/networkoptimizer/publish/tools/uwnspeedtest-linux-arm64 .
[[ "$(arch_resolve)" != "arm64" ]] && CGO_ENABLED=0 GOOS=linux GOARCH="$(arch_resolve)" $STD go build -trimpath -ldflags "-s -w" -o "/opt/networkoptimizer/publish/tools/uwnspeedtest-linux-$(arch_resolve)" .
msg_ok "Rebuilt NetworkOptimizer"
msg_info "Building Go Helpers"
TOOLS=/opt/networkoptimizer/publish/tools
VERSION="$(cat ~/.networkoptimizer)"
LDFLAGS="-s -w -X main.version=${VERSION#v}"
mkdir -p "$TOOLS"
cd /opt/networkoptimizer/src/uwnspeedtest
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/uwnspeedtest-linux-arm64" .
[[ "$(arch_resolve)" != "arm64" ]] && CGO_ENABLED=0 GOOS=linux GOARCH="$(arch_resolve)" $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/uwnspeedtest-linux-$(arch_resolve)" .
cd /opt/networkoptimizer/src/wansteer
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/wansteer-linux-arm64" .
cd /opt/networkoptimizer/src/apagent
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-arm" .
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-arm64" .
CGO_ENABLED=0 GOOS=linux GOARCH=mipsle GOMIPS=softfloat $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-mipsle" .
CGO_ENABLED=0 GOOS=linux GOARCH=mips GOMIPS=softfloat $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-mips" .
msg_ok "Built Go Helpers"
msg_info "Starting Service"
systemctl start networkoptimizer
msg_ok "Started Service"
+12 -25
View File
@@ -63,36 +63,23 @@ chown hermes:hermes /home/hermes/.hermes/.env
chmod 600 /home/hermes/.hermes/.env
msg_ok "Configured API Server"
msg_info "Creating Dashboard Service"
mkdir -p /home/hermes/.config/systemd/user
cat <<EOF >/home/hermes/.config/systemd/user/hermes-dashboard.service
[Unit]
Description=Hermes Agent Web Dashboard
After=network-online.target
[Service]
Type=simple
UMask=0077
WorkingDirectory=%h
EnvironmentFile=/etc/default/hermes
ExecStart=%h/.local/bin/hermes dashboard --host 127.0.0.1 --port 9119 --no-open
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
EOF
chown -R hermes:hermes /home/hermes/.config
$STD runuser -l hermes -c 'systemctl --user daemon-reload && systemctl --user enable --now hermes-dashboard'
msg_ok "Created Dashboard Service"
msg_info "Setting up Gateway and Webapp"
$STD runuser -l hermes -c '
set -a; source /etc/default/hermes; set +a
hermes webapp --build-only
hermes config set webapp.enabled true
hermes config set webapp.host 127.0.0.1
hermes config set webapp.port 9119
hermes gateway install
systemctl --user enable --now hermes-gateway
'
msg_ok "Set up Gateway and Webapp"
msg_info "Creating Setup Helper"
cat <<'SETUP' >/usr/bin/hermes-setup
#!/usr/bin/env bash
su - hermes -c 'set -a; source /etc/default/hermes; set +a; hermes setup'
if [[ -f /home/hermes/.config/systemd/user/hermes-gateway.service ]]; then
su - hermes -c 'systemctl --user enable --now hermes-gateway'
fi
su - hermes -c 'systemctl --user enable -q hermes-gateway && systemctl --user restart hermes-gateway'
echo "Hermes setup complete."
SETUP
chmod +x /usr/bin/hermes-setup
+6 -4
View File
@@ -204,7 +204,7 @@ export LD_RUN_PATH=/usr/local/lib
# Immich ships the custom photo-processing libraries (libjxl, jpegli, libheif,
# libraw, ImageMagick, libvips) prebuilt in its own OCI base image. Pull the one
# the release's Dockerfile pins (skopeo + umoci, no container runtime) and use its
# /usr/local. There is no compile fallback: this needs Proxmox VE 9.1 or newer.
# /usr/local. There is no compile fallback.
msg_info "Deploying prebuilt image-processing libraries"
BASE_REF="$(curl -fsSL "https://raw.githubusercontent.com/immich-app/immich/${RELEASE}/server/Dockerfile" | awk '/^FROM ghcr.io\/immich-app\/base-server-dev/ {print $2; exit}')" || true
if [[ -z "$BASE_REF" ]]; then
@@ -220,14 +220,16 @@ if ! $STD apt install -y --no-install-recommends skopeo umoci; then
fi
OCI_DIR="$(mktemp -d)"
OCI_BUNDLE="$(mktemp -d)"
if ! $STD skopeo copy --override-os linux --override-arch "$(arch_resolve amd64 arm64)" "docker://${BASE_IMAGE}" "oci:${OCI_DIR}:img"; then
if ! $STD skopeo copy --retry-times 3 --override-os linux --override-arch "$(arch_resolve amd64 arm64)" "docker://${BASE_IMAGE}" "oci:${OCI_DIR}:img"; then
rm -rf "$OCI_DIR" "$OCI_BUNDLE"
msg_error "Could not download Immich's base image (${BASE_IMAGE})."
exit 115
fi
if ! $STD umoci unpack --image "${OCI_DIR}:img" "$OCI_BUNDLE"; then
# --rootless skips restoring the image's owners: a container whose idmap leaves out
# one of them (uid 1000 for bind mounts) fails lchown with "invalid argument".
if ! $STD umoci unpack --rootless --image "${OCI_DIR}:img" "$OCI_BUNDLE"; then
rm -rf "$OCI_DIR" "$OCI_BUNDLE"
msg_error "Could not unpack Immich's base image. Immich needs Proxmox VE 9.1 or newer."
msg_error "Could not unpack Immich's base image."
exit 105
fi
# The libraries, headers and ImageMagick data, without the node runtime, global
+15 -5
View File
@@ -43,12 +43,22 @@ $STD dotnet publish src/NetworkOptimizer.Web -c Release -r "$RID" --self-contain
chmod +x /opt/networkoptimizer/publish/NetworkOptimizer.Web
msg_ok "Built NetworkOptimizer"
msg_info "Building Speed Test Binaries"
mkdir -p /opt/networkoptimizer/publish/tools
msg_info "Building Go Helpers"
TOOLS=/opt/networkoptimizer/publish/tools
VERSION="$(cat ~/.networkoptimizer)"
LDFLAGS="-s -w -X main.version=${VERSION#v}"
mkdir -p "$TOOLS"
cd /opt/networkoptimizer/src/uwnspeedtest
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "-s -w" -o /opt/networkoptimizer/publish/tools/uwnspeedtest-linux-arm64 .
[[ "$(arch_resolve)" != "arm64" ]] && CGO_ENABLED=0 GOOS=linux GOARCH="$(arch_resolve)" $STD go build -trimpath -ldflags "-s -w" -o "/opt/networkoptimizer/publish/tools/uwnspeedtest-linux-$(arch_resolve)" .
msg_ok "Built Speed Test Binaries"
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/uwnspeedtest-linux-arm64" .
[[ "$(arch_resolve)" != "arm64" ]] && CGO_ENABLED=0 GOOS=linux GOARCH="$(arch_resolve)" $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/uwnspeedtest-linux-$(arch_resolve)" .
cd /opt/networkoptimizer/src/wansteer
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/wansteer-linux-arm64" .
cd /opt/networkoptimizer/src/apagent
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-arm" .
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-arm64" .
CGO_ENABLED=0 GOOS=linux GOARCH=mipsle GOMIPS=softfloat $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-mipsle" .
CGO_ENABLED=0 GOOS=linux GOARCH=mips GOMIPS=softfloat $STD go build -trimpath -ldflags "$LDFLAGS" -o "$TOOLS/apagent-linux-mips" .
msg_ok "Built Go Helpers"
msg_info "Configuring NetworkOptimizer"
cat <<EOF >/opt/networkoptimizer/networkoptimizer.env