Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/deSEC/desec_subdomain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions apps/collabora_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions apps/collabora_integrated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
69 changes: 37 additions & 32 deletions apps/onlyoffice_docker.sh → apps/eurooffice_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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."
Expand All @@ -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.")

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions apps/pico_cms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down Expand Up @@ -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"
Expand Down
32 changes: 23 additions & 9 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion menu/additional_apps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
15 changes: 5 additions & 10 deletions menu/documentserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand All @@ -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
;;
*)
;;
Expand Down
2 changes: 1 addition & 1 deletion nextcloud_install_production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions nextcloud_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion not-supported/restore-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
File renamed without changes.