From 7d9648dc90d9dc93b1cab4490cc73ad1f48af941 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 5 Oct 2026 12:48:29 +0200 Subject: [PATCH] wanderer: set the proxy secret and install plugins in their own directories (#17698) 0.21 requires POCKETBASE_PROXY_SECRET on both services, or every incoming federation request is rejected; both read the same .env. Each plugin archive holds one directory, which the deploy strips, so all three landed flat in plugins/ and overwrote each other. wanderer only loads direct child directories, so it found none. Existing installs are moved over on the next update. --- ct/wanderer.sh | 19 ++++++++++++++++++- install/wanderer-install.sh | 3 ++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ct/wanderer.sh b/ct/wanderer.sh index e27eba669..4d9a5d465 100644 --- a/ct/wanderer.sh +++ b/ct/wanderer.sh @@ -148,6 +148,23 @@ EOF msg_ok "Migrated wanderer services" fi + if ! grep -q '^POCKETBASE_PROXY_SECRET=' /opt/wanderer/.env; then + msg_info "Adding POCKETBASE_PROXY_SECRET" + echo "POCKETBASE_PROXY_SECRET=$(openssl rand -hex 32)" >>/opt/wanderer/.env + systemctl restart wanderer-web + msg_ok "Added POCKETBASE_PROXY_SECRET" + fi + + if [[ -f /opt/wanderer_data/plugins/plugin.json ]]; then + msg_info "Reinstalling wanderer plugins, one directory each" + find /opt/wanderer_data/plugins -maxdepth 1 -type f -delete + for plugin in hammerhead komoot strava; do + rm -f ~/.wanderer-plugin-${plugin} + fetch_and_deploy_gh_release "wanderer-plugin-${plugin}" "open-wanderer/wanderer" "prebuild" "latest" "/opt/wanderer_data/plugins/${plugin}" "wanderer-plugin-${plugin}.tar.gz" || msg_warn "Failed to install wanderer plugin: ${plugin}" + done + msg_ok "Reinstalled wanderer plugins" + fi + if check_for_gh_release "wanderer" "open-wanderer/wanderer"; then msg_info "Stopping service" systemctl stop wanderer-web @@ -170,7 +187,7 @@ EOF [[ -e /opt/wanderer/db/data/plugins ]] || ln -sfn /opt/wanderer_data/plugins /opt/wanderer/db/data/plugins msg_info "Installing wanderer plugins" for plugin in hammerhead komoot strava; do - fetch_and_deploy_gh_release "wanderer-plugin-${plugin}" "open-wanderer/wanderer" "prebuild" "${CHECK_UPDATE_RELEASE:-latest}" "/opt/wanderer_data/plugins" "wanderer-plugin-${plugin}.tar.gz" || msg_warn "Failed to install wanderer plugin: ${plugin}" + fetch_and_deploy_gh_release "wanderer-plugin-${plugin}" "open-wanderer/wanderer" "prebuild" "${CHECK_UPDATE_RELEASE:-latest}" "/opt/wanderer_data/plugins/${plugin}" "wanderer-plugin-${plugin}.tar.gz" || msg_warn "Failed to install wanderer plugin: ${plugin}" done msg_ok "Installed wanderer plugins" msg_ok "Updated wanderer" diff --git a/install/wanderer-install.sh b/install/wanderer-install.sh index 240206f12..41838f081 100644 --- a/install/wanderer-install.sh +++ b/install/wanderer-install.sh @@ -33,7 +33,7 @@ msg_ok "Installed wanderer" msg_info "Installing wanderer plugins" for plugin in hammerhead komoot strava; do - fetch_and_deploy_gh_release "wanderer-plugin-${plugin}" "open-wanderer/wanderer" "prebuild" "latest" "/opt/wanderer_data/plugins" "wanderer-plugin-${plugin}.tar.gz" || msg_warn "Failed to install wanderer plugin: ${plugin}" + fetch_and_deploy_gh_release "wanderer-plugin-${plugin}" "open-wanderer/wanderer" "prebuild" "latest" "/opt/wanderer_data/plugins/${plugin}" "wanderer-plugin-${plugin}.tar.gz" || msg_warn "Failed to install wanderer plugin: ${plugin}" done msg_ok "Installed wanderer plugins" @@ -49,6 +49,7 @@ PB_URL=${LOCAL_IP}:8090 PUBLIC_POCKETBASE_URL=http://${LOCAL_IP}:8090 PUBLIC_VALHALLA_URL=https://valhalla1.openstreetmap.de POCKETBASE_ENCRYPTION_KEY=${POCKETBASE_KEY} +POCKETBASE_PROXY_SECRET=$(openssl rand -hex 32) PB_DB_LOCATION=/opt/wanderer_data/pb_data MEILI_DB_PATH=/opt/wanderer_data/meili_data EOF