From c1d7f23a17e598ab71605b0ca0da97d137ac753e Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 11 Feb 2026 16:30:09 -0500 Subject: [PATCH] [Feature] OpenCloud: support PosixFS Collaborative Mode (#11806) * [Feature] OpenCloud: support PosixFS Collaborative Mode * Use ensure_dependencies in opencloud.sh --- ct/opencloud.sh | 16 ++++++++++++++-- install/opencloud-install.sh | 15 +++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/ct/opencloud.sh b/ct/opencloud.sh index 648dffa36..13e51c24f 100644 --- a/ct/opencloud.sh +++ b/ct/opencloud.sh @@ -30,7 +30,7 @@ function update_script() { fi RELEASE="v5.0.2" - if check_for_gh_release "opencloud" "opencloud-eu/opencloud" "${RELEASE}"; then + if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}"; then msg_info "Stopping services" systemctl stop opencloud opencloud-wopi msg_ok "Stopped services" @@ -38,9 +38,21 @@ function update_script() { msg_info "Updating packages" $STD apt-get update $STD apt-get dist-upgrade -y + ensure_dependencies "inotify-tools" msg_ok "Updated packages" - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "opencloud" "opencloud-eu/opencloud" "singlefile" "${RELEASE}" "/usr/bin" "opencloud-*-linux-amd64" + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "${RELEASE}" "/usr/bin" "opencloud-*-linux-amd64" + + if ! grep -q 'POSIX_WATCH' /etc/opencloud/opencloud.env; then + sed -i '/^## External/i ## Uncomment below to enable PosixFS Collaborative Mode\ +## Increase inotify watch/instance limits on your PVE host:\ +### sysctl -w fs.inotify.max_user_watches=1048576\ +### sysctl -w fs.inotify.max_user_instances=1024\ +# STORAGE_USERS_POSIX_ENABLE_COLLABORATION=true\ +# STORAGE_USERS_POSIX_WATCH_TYPE=inotifywait\ +# STORAGE_USERS_POSIX_WATCH_FS=true\ +# STORAGE_USERS_POSIX_WATCH_PATH=' /etc/opencloud/opencloud.env + fi msg_info "Starting services" systemctl start opencloud opencloud-wopi diff --git a/install/opencloud-install.sh b/install/opencloud-install.sh index 3333a1c05..875d73d6f 100644 --- a/install/opencloud-install.sh +++ b/install/opencloud-install.sh @@ -38,6 +38,10 @@ for server in "${servers[@]}"; do fi done +msg_info "Installing dependencies" +$STD apt install -y inotify-tools +msg_ok "Installed dependencies" + msg_info "Installing Collabora Online" curl -fsSL https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg -o /etc/apt/keyrings/collaboraonline-release-keyring.gpg cat </etc/apt/sources.list.d/colloboraonline.sources @@ -148,8 +152,15 @@ COLLABORATION_JWT_SECRET= # FRONTEND_FULL_TEXT_SEARCH_ENABLED=true # SEARCH_EXTRACTOR_TIKA_TIKA_URL= -## External storage test - Only NFS v4.2+ is supported -## User files +## Uncomment below to enable PosixFS Collaborative Mode +## Increase inotify watch/instance limits on your PVE host: +### sysctl -w fs.inotify.max_user_watches=1048576 +### sysctl -w fs.inotify.max_user_instances=1024 +# STORAGE_USERS_POSIX_ENABLE_COLLABORATION=true +# STORAGE_USERS_POSIX_WATCH_TYPE=inotifywait +# STORAGE_USERS_POSIX_WATCH_FS=true +# STORAGE_USERS_POSIX_WATCH_PATH= +## User files location - experimental - use at your own risk! - ZFS, NFS v4.2+ supported - CIFS/SMB not supported # STORAGE_USERS_POSIX_ROOT= EOF