From a85e0062c91d77d9004d74e2e43d8e57e7fc680d Mon Sep 17 00:00:00 2001 From: Nathan Fretz Date: Wed, 16 Sep 2026 13:27:51 +1000 Subject: [PATCH] Add umbrelOS 2.0 app settings support for Nextcloud --- nextcloud/hooks/post-start | 7 ++++--- nextcloud/hooks/post-update | 7 ++++--- nextcloud/hooks/pre-start | 11 ++++++----- nextcloud/umbrel-app.yml | 10 +++++++++- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/nextcloud/hooks/post-start b/nextcloud/hooks/post-start index a96c4e0bb..e0f55cd8b 100755 --- a/nextcloud/hooks/post-start +++ b/nextcloud/hooks/post-start @@ -5,8 +5,9 @@ set -euo pipefail # Apache instance must be configured with 'LimitRequestBody 0' # inside the .htaccess file -APP_DATA_DIR="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)" -DOT_HTACCESS_FILE="${APP_DATA_DIR}/data/nextcloud/.htaccess" +APP_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..")" +DATA_ROOT="${APP_DATA_ROOT:-${APP_DIR}/data}" +DOT_HTACCESS_FILE="${DATA_ROOT}/nextcloud/.htaccess" echo "Waiting for file (${DOT_HTACCESS_FILE}) to exist..." @@ -31,4 +32,4 @@ then echo >> "${DOT_HTACCESS_FILE}" echo "LimitRequestBody 0" >> "${DOT_HTACCESS_FILE}" -fi \ No newline at end of file +fi diff --git a/nextcloud/hooks/post-update b/nextcloud/hooks/post-update index f9ce6b0ac..b0c32923b 100755 --- a/nextcloud/hooks/post-update +++ b/nextcloud/hooks/post-update @@ -4,8 +4,9 @@ set -euo pipefail # This script checks the Nextcloud config.php file for the presence of 'nextcloud_web_1' in the trusted_domains array and adds it if it doesn't exist. Pre-29.0.4 installs on umbrelOS will not have the domain added via `NEXTCLOUD_TRUSTED_DOMAIN`. # This is handled in a post-update hook to make sure we don't interfere with the Nextcloud startup process and pre-start script where config.php is being written to. -APP_DATA_DIR="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)" -CONFIG_PHP_FILE="${APP_DATA_DIR}/data/nextcloud/config/config.php" +APP_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..")" +DATA_ROOT="${APP_DATA_ROOT:-${APP_DIR}/data}" +CONFIG_PHP_FILE="${DATA_ROOT}/nextcloud/config/config.php" DOMAIN_TO_ADD="nextcloud_web_1" @@ -41,4 +42,4 @@ else sed -i "/trusted_domains/,/),/ s/),/ $new_index => '$DOMAIN_TO_ADD',\n&/" "$CONFIG_PHP_FILE" echo "Domain '$DOMAIN_TO_ADD' added successfully." -fi \ No newline at end of file +fi diff --git a/nextcloud/hooks/pre-start b/nextcloud/hooks/pre-start index 9340c218b..a9c2cc790 100755 --- a/nextcloud/hooks/pre-start +++ b/nextcloud/hooks/pre-start @@ -1,13 +1,14 @@ #!/usr/bin/env bash set -euo pipefail -APP_DATA_DIR="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)" -UMBREL_ROOT="${APP_DATA_DIR}/../.." +APP_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..")" +DATA_ROOT="${APP_DATA_ROOT:-${APP_DIR}/data}" +UMBREL_ROOT="${UMBREL_ROOT:-${APP_DIR}/../..}" -CONFIG_PHP_FILE="${APP_DATA_DIR}/data/nextcloud/config/config.php" +CONFIG_PHP_FILE="${DATA_ROOT}/nextcloud/config/config.php" -APP_COMPOSE_FILE="${APP_DATA_DIR}/docker-compose.yml" -APP_COMPOSE_BACKUP_FILE="${APP_DATA_DIR}/docker-compose.yml.bak" +APP_COMPOSE_FILE="${APP_DIR}/docker-compose.yml" +APP_COMPOSE_BACKUP_FILE="${APP_DIR}/docker-compose.yml.bak" # Supported list of Nextcloud major version migrations VERSIONS=() diff --git a/nextcloud/umbrel-app.yml b/nextcloud/umbrel-app.yml index 3df12b121..b7d3da4fc 100644 --- a/nextcloud/umbrel-app.yml +++ b/nextcloud/umbrel-app.yml @@ -1,8 +1,10 @@ manifestVersion: 1.1 id: nextcloud +storage: + dataRoot: data category: files name: Nextcloud -version: "34.0.4" +version: "34.0.4-patch.1" tagline: Productivity platform that keeps you in control description: >- Nextcloud puts your data at your fingertips, under your control. @@ -25,6 +27,12 @@ description: >- Note: After logging in to Nextcloud please change the password to something secure before sharing the address with anyone. releaseNotes: >- + This update adds support for new storage management and configuration options being introduced with umbrelOS 2.0. + + + Previous Nextcloud 34.0.4 release notes: + + Nextcloud 34.0.4 is a maintenance update for Nextcloud 34. If you're updating from a pre-34 version, the upgrade may take a few minutes while Nextcloud runs its update steps; leave the app running until it comes back online.