From c44a4e59d89385d93a3a2c41c2522b88143549bd Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Mon, 22 Jun 2026 20:15:36 +0200 Subject: [PATCH] Replace OnlyOffice with EuroOffice; retire integrated script - Rename the OnlyOffice (Docker) app script to eurooffice_docker.sh and switch to the EuroOffice fork: image ghcr.io/euro-office/documentserver, Nextcloud app id/config namespace "eurooffice", container "eurooffice". - Move apps/onlyoffice_integrated.sh to old/ (retired) and drop the "OnlyOffice (Integrated)" entry from the Documentserver menu. - Keep backward-compatible cleanup: detection/removal in the EuroOffice and Collabora scripts and in remove_eurooffice_docker()/remove_all_office_apps() still match the legacy onlyoffice image, container, app and config so an existing OnlyOffice install is detected and removed before installing any other office solution. The auto-update path updates both the new eurooffice and the legacy onlyoffice containers. - Update remaining user-facing references (menus, install/restore text, lib.sh). Signed-off-by: Simon L. --- addons/deSEC/desec_subdomain.sh | 2 +- apps/collabora_docker.sh | 8 +-- apps/collabora_integrated.sh | 8 +-- ...yoffice_docker.sh => eurooffice_docker.sh} | 69 ++++++++++--------- apps/pico_cms.sh | 4 +- lib.sh | 32 ++++++--- menu/additional_apps.sh | 2 +- menu/documentserver.sh | 15 ++-- nextcloud_install_production.sh | 2 +- nextcloud_update.sh | 10 ++- not-supported/restore-backup.sh | 2 +- {apps => old}/onlyoffice_integrated.sh | 0 12 files changed, 87 insertions(+), 67 deletions(-) rename apps/{onlyoffice_docker.sh => eurooffice_docker.sh} (78%) rename {apps => old}/onlyoffice_integrated.sh (100%) diff --git a/addons/deSEC/desec_subdomain.sh b/addons/deSEC/desec_subdomain.sh index 2df3a16bed..43273457ad 100644 --- a/addons/deSEC/desec_subdomain.sh +++ b/addons/deSEC/desec_subdomain.sh @@ -151,7 +151,7 @@ if yesno_box_yes "Would you like to secure $FINAL_SUBDOMAIN with TLS?" then if generate_desec_cert "$FINAL_SUBDOMAIN" then - msg_box "Congrats! You should now be able to use $FINAL_SUBDOMAIN for setting up Talk, Collabora, OnlyOffice and other apps in Nextcloud. + msg_box "Congrats! You should now be able to use $FINAL_SUBDOMAIN for setting up Talk, Collabora, EuroOffice and other apps in Nextcloud. Please remember to add the port number to the domain, if you chose a custom one, like this: $FINAL_SUBDOMAIN:portnumber" fi diff --git a/apps/collabora_docker.sh b/apps/collabora_docker.sh index d8e54f1727..5502c7f7ac 100644 --- a/apps/collabora_docker.sh +++ b/apps/collabora_docker.sh @@ -35,12 +35,12 @@ else removal_popup "$SCRIPT_NAME" fi -# Check if OnlyOffice is previously installed +# Check if EuroOffice (or the legacy OnlyOffice) is previously installed # If yes, then stop and prune the docker container -if does_this_docker_exist 'onlyoffice/documentserver' +if does_this_docker_exist 'ghcr.io/euro-office/documentserver' || does_this_docker_exist 'onlyoffice/documentserver' then - # Removal - remove_onlyoffice_docker + # Removal (also cleans up a legacy OnlyOffice install) + remove_eurooffice_docker fi # Remove all office apps diff --git a/apps/collabora_integrated.sh b/apps/collabora_integrated.sh index b667bbed0c..d327986cdc 100644 --- a/apps/collabora_integrated.sh +++ b/apps/collabora_integrated.sh @@ -46,11 +46,11 @@ then remove_collabora_docker fi -# Check if Onlyoffice is installed and remove every trace of it -if does_this_docker_exist 'onlyoffice/documentserver' +# Check if EuroOffice (or the legacy OnlyOffice) is installed and remove every trace of it +if does_this_docker_exist 'ghcr.io/euro-office/documentserver' || does_this_docker_exist 'onlyoffice/documentserver' then - # Removal - remove_onlyoffice_docker + # Removal (also cleans up a legacy OnlyOffice install) + remove_eurooffice_docker fi # Remove all office apps diff --git a/apps/onlyoffice_docker.sh b/apps/eurooffice_docker.sh similarity index 78% rename from apps/onlyoffice_docker.sh rename to apps/eurooffice_docker.sh index df5a1b1e21..67919eaea4 100644 --- a/apps/onlyoffice_docker.sh +++ b/apps/eurooffice_docker.sh @@ -3,8 +3,8 @@ # T&M Hansson IT AB © - 2019, https://www.hanssonit.se/ true -SCRIPT_NAME="OnlyOffice (Docker)" -SCRIPT_EXPLAINER="This script will install the OnlyOffice Document Server bundled with Docker" +SCRIPT_NAME="EuroOffice (Docker)" +SCRIPT_EXPLAINER="This script will install the EuroOffice Document Server bundled with Docker" # shellcheck source=lib.sh source /var/scripts/fetch_lib.sh @@ -17,18 +17,23 @@ debug_mode # Check if root root_check -# Check if collabora is already installed -if ! does_this_docker_exist 'onlyoffice/documentserver' +# Check if EuroOffice (or the legacy OnlyOffice) is already installed +if ! does_this_docker_exist 'ghcr.io/euro-office/documentserver' && ! does_this_docker_exist 'onlyoffice/documentserver' then # Ask for installing install_popup "$SCRIPT_NAME" else # Ask for removal or reinstallation reinstall_remove_menu "$SCRIPT_NAME" - # Removal - remove_onlyoffice_docker - # Remove config.php value set when install was successful + # Removal (also cleans up a legacy OnlyOffice install) + remove_eurooffice_docker + # Remove config.php values set when install was successful nextcloud_occ config:system:delete allow_local_remote_servers + nextcloud_occ config:system:delete eurooffice + nextcloud_occ config:system:delete eurooffice jwt_secret + nextcloud_occ config:app:delete eurooffice jwt_secret + nextcloud_occ config:system:delete eurooffice jwt_header + # Remove legacy OnlyOffice config values if they still exist nextcloud_occ config:system:delete onlyoffice nextcloud_occ config:system:delete onlyoffice jwt_secret nextcloud_occ config:app:delete onlyoffice jwt_secret @@ -51,7 +56,7 @@ remove_all_office_apps if [ "$(apache2ctl -M | grep evasive)" != "" ] then msg_box "We noticed that 'mod_evasive' is installed which is the DDOS protection for webservices. \ -It has compatibility issues with OnlyOffice and you can now choose to disable it." +It has compatibility issues with EuroOffice and you can now choose to disable it." if ! yesno_box_yes "Do you want to disable DDOS protection?" then print_text_in_color "$ICyan" "Keeping mod_evasive active." @@ -63,8 +68,8 @@ It has compatibility issues with OnlyOffice and you can now choose to disable it fi fi -# Ask for the domain for OnlyOffice -SUBDOMAIN=$(input_box_flow "OnlyOffice subdomain e.g: office.yourdomain.com +# Ask for the domain for EuroOffice +SUBDOMAIN=$(input_box_flow "EuroOffice subdomain e.g: office.yourdomain.com NOTE: This domain must be different than your Nextcloud domain. \ They can however be hosted on the same server, but would require separate DNS entries.") @@ -113,8 +118,8 @@ Please install Nextcloud and make sure your domain is reachable, or activate TLS on your domain to be able to run this script. If you use the Nextcloud VM you can use the Let's Encrypt script to get TLS and activate your Nextcloud domain. When TLS is activated, run these commands from your CLI: -sudo curl -sLO $APP/onlyoffice_docker.sh -sudo bash onlyoffice_docker.sh" +sudo curl -sLO $APP/eurooffice_docker.sh +sudo bash eurooffice_docker.sh" exit 1 fi @@ -127,20 +132,20 @@ check_open_port 80 "$SUBDOMAIN" check_open_port 443 "$SUBDOMAIN" # Test RAM size (2GB min) + CPUs (min 2) -ram_check 2 OnlyOffice -cpu_check 2 OnlyOffice +ram_check 2 EuroOffice +cpu_check 2 EuroOffice # Check if Nextcloud is installed with TLS -check_nextcloud_https "OnlyOffice (Docker)" +check_nextcloud_https "EuroOffice (Docker)" # Install Docker install_docker -ONLYOFFICE_SECRET="$(gen_passwd "$SHUF" "a-zA-Z0-9")" +EUROOFFICE_SECRET="$(gen_passwd "$SHUF" "a-zA-Z0-9")" -# Install Onlyoffice docker -docker pull onlyoffice/documentserver:latest -docker run -i -t -d -p 127.0.0.3:9090:80 -e JWT_ENABLED=true -e JWT_HEADER=AuthorizationJwt -e JWT_SECRET="$ONLYOFFICE_SECRET" --restart always --name onlyoffice onlyoffice/documentserver +# Install EuroOffice docker +docker pull ghcr.io/euro-office/documentserver:latest +docker run -i -t -d -p 127.0.0.3:9090:80 -e JWT_ENABLED=true -e JWT_HEADER=AuthorizationJwt -e JWT_SECRET="$EUROOFFICE_SECRET" --restart always --name eurooffice ghcr.io/euro-office/documentserver # Install apache2 install_if_not apache2 @@ -164,7 +169,7 @@ then rm -f "$HTTPS_CONF" fi -# Create Vhost for OnlyOffice Docker online in Apache2 +# Create Vhost for EuroOffice Docker online in Apache2 if [ ! -f "$HTTPS_CONF" ]; then cat << HTTPS_CREATE > "$HTTPS_CONF" @@ -180,7 +185,7 @@ then SSLEngine on SSLCompression off SSLProtocol -all +TLSv1.2 $TLS13 - SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 + SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384 SSLHonorCipherOrder off SSLSessionTickets off ServerSignature off @@ -246,31 +251,31 @@ then print_text_in_color "$IGreen" "Certs are generated!" a2ensite "$SUBDOMAIN.conf" restart_webserver - # Install OnlyOffice - install_and_enable_app onlyoffice + # Install EuroOffice + install_and_enable_app eurooffice else - last_fail_tls "$SCRIPTS"/apps/onlyoffice.sh + last_fail_tls "$SCRIPTS"/apps/eurooffice_docker.sh exit 1 fi -# Set config for OnlyOffice -if [ -d "$NC_APPS_PATH"/onlyoffice ] +# Set config for EuroOffice +if [ -d "$NC_APPS_PATH"/eurooffice ] then - nextcloud_occ config:app:set onlyoffice DocumentServerUrl --value=https://"$SUBDOMAIN/" + nextcloud_occ config:app:set eurooffice DocumentServerUrl --value=https://"$SUBDOMAIN/" chown -R www-data:www-data "$NC_APPS_PATH" # Appending the new domain to trusted domains add_to_trusted_domains "$SUBDOMAIN" # Allow remote servers with local addresses e.g. in federated shares, webcal services and more nextcloud_occ config:system:set allow_local_remote_servers --value="true" - nextcloud_occ config:system:set onlyoffice jwt_secret --value="$ONLYOFFICE_SECRET" - nextcloud_occ config:app:set onlyoffice jwt_secret --value="$ONLYOFFICE_SECRET" - nextcloud_occ config:system:set onlyoffice jwt_header --value="AuthorizationJwt" + nextcloud_occ config:system:set eurooffice jwt_secret --value="$EUROOFFICE_SECRET" + nextcloud_occ config:app:set eurooffice jwt_secret --value="$EUROOFFICE_SECRET" + nextcloud_occ config:system:set eurooffice jwt_header --value="AuthorizationJwt" # Add prune command add_dockerprune # Restart Docker print_text_in_color "$ICyan" "Restarting Docker..." - docker restart onlyoffice - msg_box "OnlyOffice Docker is now successfully installed. + docker restart eurooffice + msg_box "EuroOffice Docker is now successfully installed. Please be aware that the container is currently starting which can take a few minutes." fi diff --git a/apps/pico_cms.sh b/apps/pico_cms.sh index 32fdc4418c..92a9a53116 100644 --- a/apps/pico_cms.sh +++ b/apps/pico_cms.sh @@ -151,7 +151,7 @@ then exit fi -# Ask for the domain for OnlyOffice +# Ask for the domain for EuroOffice SUBDOMAIN=$(input_box_flow "Please enter your Sites subdomain e.g: 'sites.yourdomain.com' or 'blog.yourdomain.com' NOTE: This domain must be different than your Nextcloud domain. \ They can however be hosted on the same server, but would require separate DNS entries.") @@ -226,7 +226,7 @@ then rm -f "$HTTPS_CONF" fi -# Create Vhost for OnlyOffice Docker online in Apache2 +# Create Vhost for EuroOffice Docker online in Apache2 if [ ! -f "$HTTPS_CONF" ]; then cat << HTTPS_CREATE > "$HTTPS_CONF" diff --git a/lib.sh b/lib.sh index c6bf8d7f6a..78781ee480 100644 --- a/lib.sh +++ b/lib.sh @@ -818,7 +818,7 @@ You now have two choices: in the same way as you just have. 2. Import this VM again without raising the RAM, but don't install any of the following apps: 1) Collabora - 2) OnlyOffice + 2) EuroOffice 3) Full Text Search This script will now exit. @@ -932,7 +932,7 @@ check_nextcloud_https() { if ! nextcloud_occ_no_check config:system:get overwrite.cli.url | grep -q "https" then # Check if it's used by any of the Documentserver apps and adopt the message to that - if [ "$1" == 'Collabora (Docker)' ] || [ "$1" == 'OnlyOffice (Docker)' ] + if [ "$1" == 'Collabora (Docker)' ] || [ "$1" == 'EuroOffice (Docker)' ] then ncdomain if ! curl -s https://"$NCDOMAIN"/status.php | grep -q 'installed":true' @@ -1817,12 +1817,15 @@ remove_collabora_docker() { remove_from_trusted_domains "$SUBDOMAIN" } -remove_onlyoffice_docker() { - # Check if Onlyoffice is previously installed +remove_eurooffice_docker() { + # Check if EuroOffice or the legacy OnlyOffice is previously installed # If yes, then stop and prune the docker container + # The legacy OnlyOffice image (onlyoffice/documentserver) is still removed + # here so that older installs are cleaned up before switching solution. docker_prune_this 'onlyoffice/documentserver' + docker_prune_this 'ghcr.io/euro-office/documentserver' # Revoke LE - SUBDOMAIN=$(input_box_flow "Please enter the subdomain you are using for OnlyOffice, e.g: office.yourdomain.com") + SUBDOMAIN=$(input_box_flow "Please enter the subdomain you are using for EuroOffice, e.g: office.yourdomain.com") if [ -f "$CERTFILES/$SUBDOMAIN/cert.pem" ] then yes no | certbot revoke --cert-path "$CERTFILES/$SUBDOMAIN/cert.pem" @@ -1838,7 +1841,12 @@ remove_onlyoffice_docker() { restart_webserver rm -f "$SITES_AVAILABLE/$SUBDOMAIN.conf" fi - # Disable onlyoffice if activated + # Disable eurooffice if activated + if is_app_installed eurooffice + then + nextcloud_occ app:remove eurooffice + fi + # Disable the legacy onlyoffice app if it's still activated if is_app_installed onlyoffice then nextcloud_occ app:remove onlyoffice @@ -1849,13 +1857,19 @@ remove_onlyoffice_docker() { # Remove all office apps remove_all_office_apps() { - # remove OnlyOffice-documentserver if installed + # remove EuroOffice-documentserver if installed if is_app_installed documentserver_community then nextcloud_occ app:remove documentserver_community fi - # Disable OnlyOffice App if installed + # Disable EuroOffice App if installed + if is_app_installed eurooffice + then + nextcloud_occ app:remove eurooffice + fi + + # Disable the legacy OnlyOffice App if it's still installed if is_app_installed onlyoffice then nextcloud_occ app:remove onlyoffice @@ -1937,7 +1951,7 @@ fi } # Remove selected Docker image -# docker_prune_this 'collabora/code' 'onlyoffice/documentserver' 'ark74/nc_fts' 'imaginary' +# docker_prune_this 'collabora/code' 'eurooffice/documentserver' 'ark74/nc_fts' 'imaginary' docker_prune_this() { if does_this_docker_exist "$1" then diff --git a/menu/additional_apps.sh b/menu/additional_apps.sh index 6a64aebe78..cbee0d942c 100644 --- a/menu/additional_apps.sh +++ b/menu/additional_apps.sh @@ -38,7 +38,7 @@ fi choice=$(whiptail --title "$TITLE" --checklist \ "Which apps do you want to install?\n\nAutomatically configure and install selected apps $CHECKLIST_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \ -"Documentserver" "(OnlyOffice or Collabora - Docker or Integrated)" OFF \ +"Documentserver" "(EuroOffice or Collabora - Docker or Integrated)" OFF \ "Bitwarden" "(External password manager) [4GB RAM]" OFF \ "Fail2ban " "(Extra Bruteforce protection)" "$STARTUP_SWITCH" \ "Recognize" "(Use [local] AI on your photos in Nextcloud) [8GB RAM]" OFF \ diff --git a/menu/documentserver.sh b/menu/documentserver.sh index 69a2210909..f91649286f 100644 --- a/menu/documentserver.sh +++ b/menu/documentserver.sh @@ -18,11 +18,10 @@ root_check choice=$(whiptail --title "$TITLE" --menu \ "Which Documentserver for online editing do you want to install?\n\nWe recommend Collabora with Docker. The subdomain could look like this:\noffice.your-nextcloud.tld\n\nAutomatically configure and install the selected Documentserver. -$MENU_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \ +$MENU_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 3 \ "Collabora (Docker)" "(Extra Subdomain required)" \ "Collabora (Integrated)" "(No Subdomain required)" \ -"OnlyOffice (Docker)" "(Extra Subdomain required)" \ -"OnlyOffice (Integrated)" "(No Subdomain required)" 3>&1 1>&2 2>&3) +"EuroOffice (Docker)" "(Extra Subdomain required)" 3>&1 1>&2 2>&3) case "$choice" in "Collabora (Docker)") @@ -33,13 +32,9 @@ case "$choice" in print_text_in_color "$ICyan" "Downloading the Collabora (Integrated) script..." run_script APP collabora_integrated ;; - "OnlyOffice (Docker)") - print_text_in_color "$ICyan" "Downloading the OnlyOffice (Docker) script..." - run_script APP onlyoffice_docker - ;; - "OnlyOffice (Integrated)") - print_text_in_color "$ICyan" "Downloading the OnlyOffice (Integrated) script..." - run_script APP onlyoffice_integrated + "EuroOffice (Docker)") + print_text_in_color "$ICyan" "Downloading the EuroOffice (Docker) script..." + run_script APP eurooffice_docker ;; *) ;; diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh index 1676fae702..63233793d6 100644 --- a/nextcloud_install_production.sh +++ b/nextcloud_install_production.sh @@ -993,7 +993,7 @@ apt-get autoremove -y apt-get autoclean find /root "/home/$UNIXUSER" -type f \( -name '*.sh*' -o -name '*.html*' -o -name '*.tar*' -o -name '*.zip*' \) -delete -# Install virtual kernels for Hyper-V, (and extra for UTF8 kernel module + Collabora and OnlyOffice) +# Install virtual kernels for Hyper-V, (and extra for UTF8 kernel module + Collabora and EuroOffice) # Kernel 5.4 if ! home_sme_server then diff --git a/nextcloud_update.sh b/nextcloud_update.sh index e74d69611b..7150aa0ff7 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -684,10 +684,16 @@ $DOCKER_RUN_OUTPUT" fi # Collabora CODE docker_update_specific 'code' 'Collabora' - # OnlyOffice + # EuroOffice ## Don't upgrade to community if EE is installed - if ! does_this_docker_exist onlyoffice-ee + if ! does_this_docker_exist eurooffice-ee && ! does_this_docker_exist onlyoffice-ee then + # New EuroOffice install (container name: eurooffice) + if does_this_docker_exist 'ghcr.io/euro-office/documentserver' + then + docker_update_specific 'eurooffice' 'EuroOffice' + fi + # Legacy OnlyOffice install (container name: onlyoffice) if does_this_docker_exist 'onlyoffice/documentserver' then docker_update_specific 'onlyoffice' 'OnlyOffice' diff --git a/not-supported/restore-backup.sh b/not-supported/restore-backup.sh index 36e9b455cb..297cfdfd7c 100644 --- a/not-supported/restore-backup.sh +++ b/not-supported/restore-backup.sh @@ -717,7 +717,7 @@ If yes, just press '[ENTER]'." msg_box "Restore completed!\n You can now simply reinstall all apps and addons that were installed on your server before!\n Those need to get installed (if they were installed on the old server before): -Geoblocking, Disk Monitoring, Fail2Ban, ClamAV, SMTP Mail, DDclient, Activate TLS, OnlyOffice, Push Notifications for Nextcloud, \ +Geoblocking, Disk Monitoring, Fail2Ban, ClamAV, SMTP Mail, DDclient, Activate TLS, EuroOffice, Push Notifications for Nextcloud, \ High-Performance backend for Nextcloud Talk, Whiteboard for Nextcloud, Vaultwarden, Pi-hole, PiVPN, \ Plex Media Server, Previewgenerator, Remotedesktop and Midnight Commander.\n Note: diff --git a/apps/onlyoffice_integrated.sh b/old/onlyoffice_integrated.sh similarity index 100% rename from apps/onlyoffice_integrated.sh rename to old/onlyoffice_integrated.sh