From 971225c52761225a1887f672908c54ab44d80816 Mon Sep 17 00:00:00 2001 From: petruknw Date: Wed, 20 May 2026 23:48:54 +1000 Subject: [PATCH] fix: set PUID=0/PGID=0 so entrypoint stays as root and can write /config/data --- aurral/rootfs/etc/services.d/aurral/run | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/aurral/rootfs/etc/services.d/aurral/run b/aurral/rootfs/etc/services.d/aurral/run index 86065866ee..a95facbfdf 100644 --- a/aurral/rootfs/etc/services.d/aurral/run +++ b/aurral/rootfs/etc/services.d/aurral/run @@ -5,18 +5,23 @@ DOWNLOAD_FOLDER=$(bashio::config 'download_folder') -# Ensure host-side download directory exists +# Ensure persistent directories exist mkdir -p "${DOWNLOAD_FOLDER}" +mkdir -p /config/data bashio::log.info "Starting Aurral" bashio::log.info " Data : /config/data (HA addon_config)" bashio::log.info " Downloads : ${DOWNLOAD_FOLDER}" -# AURRAL_DATA_DIR tells Aurral to write its DB/config to /config/data -# (HA's writable addon_config mount) instead of /app/backend/data. -# This avoids any symlink that docker-entrypoint.sh might try to chown. +# PUID=0/PGID=0 tells the upstream docker-entrypoint.sh to skip the +# su-exec drop to nodejs (1001) and stay as root. HA addons always run +# as root so this is safe and ensures /config/data is writable. +export PUID=0 +export PGID=0 + +# AURRAL_DATA_DIR redirects the DB/config to HA's addon_config mount. export AURRAL_DATA_DIR="/config/data" export DOWNLOAD_FOLDER="${DOWNLOAD_FOLDER}" export WEEKLY_FLOW_FOLDER="${DOWNLOAD_FOLDER}/weekly-flow" -exec node /app/server.js +exec docker-entrypoint.sh node server.js