From abb7601e1b162112e471a39b663106da6362c2a7 Mon Sep 17 00:00:00 2001 From: Thieneret Date: Fri, 24 Jul 2026 00:19:36 +0200 Subject: [PATCH] add euro-office --- ct/eurooffice.sh | 52 ++++++++++++++++++++ install/eurooffice-install.sh | 91 +++++++++++++++++++++++++++++++++++ json/eurooffice.json | 38 +++++++++++++++ 3 files changed, 181 insertions(+) create mode 100644 ct/eurooffice.sh create mode 100644 install/eurooffice-install.sh create mode 100644 json/eurooffice.json diff --git a/ct/eurooffice.sh b/ct/eurooffice.sh new file mode 100644 index 0000000000..842f2ef04b --- /dev/null +++ b/ct/eurooffice.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +source "$(dirname "${BASH_SOURCE[0]}")/../misc/build.func" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}/misc/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Thieneret +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/Euro-Office + +APP="eurooffice" +var_tags="${var_tags:-office}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_arm64="${var_arm64:-no}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + if check_for_gh_release "EuroOffice" "Euro-Office/DocumentServer" "latest"; then + msg_info "Stoping services" + systemctl stop ds-docservice ds-converter ds-metrics nginx + msg_ok "Services stoped" + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "EuroOffice" "Euro-Office/DocumentServer" "binary" "latest" "/opt/eurooffice" "euro-office-documentserver_*.deb" + msg_info "Starting services" + systemctl restart ds-docservice ds-converter ds-metrics + for i in {1..10}; do + if [[ $(systemctl is-active ds-docservice) == active && $(systemctl is-active ds-converter) == active && $(systemctl is-active ds-metrics) == active ]]; then + break + fi + sleep 1 + done + systemctl restart nginx + msg_ok "Services started" + msg_ok "Updated successfully!" + fi + exit +} + +start +build_container +description + +msg_ok "Completed successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" +echo -e "${INFO}${YW} Secret Key is located in ${HOME}/.euro-office.creds${CL}" diff --git a/install/eurooffice-install.sh b/install/eurooffice-install.sh new file mode 100644 index 0000000000..b00dcb80fe --- /dev/null +++ b/install/eurooffice-install.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Thieneret +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/Euro-Office + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" + +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Creating RabitMQ configuration" +mkdir -p /etc/rabbitmq +cat </etc/rabbitmq/rabbitmq-env.conf +NODENAME=rabbit@localhost +NODE_IP_ADDRESS=127.0.0.1 +NODE_PORT=5672 +EOF +msg_ok "Created RabitMQ configuration" + +msg_info "Installing Dependencies" +$STD apt install -y \ + curl \ + git \ + redis-server \ + rabbitmq-server \ + nginx +msg_ok "Installed Dependencies" + +setup_yq +PG_VERSION="17" setup_postgresql +PG_DB_NAME="eurooffice" PG_DB_USER="eurooffice" setup_postgresql_db + +msg_info "Create documentserver install config" +cat </opt/setup_eo +ds ds/db-type select postgres +ds ds/db-host string localhost +ds ds/db-port string 5432 +ds ds/db-user string eurooffice +ds ds/db-pwd password ${PG_DB_PASS} +ds ds/db-name string eurooffice +EOF +debconf-set-selections /opt/setup_eo +msg_ok "Documentserver install config created" + +fetch_and_deploy_gh_release "EuroOffice" "Euro-Office/DocumentServer" "binary" "latest" "/opt/eurooffice" "euro-office-documentserver_*.deb" + +msg_info "Configuring Euro-Office" +EUO_SECRET=$(openssl rand -hex 32) +yq -i ".services.CoAuthoring.sql.type = \"postgres\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.sql.dbHost = \"127.0.0.1\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.sql.dbPort = \"5432\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.sql.dbName = \"eurooffice\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.sql.dbUser = \"eurooffice\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.sql.dbPass = \"${PG_DB_PASS}\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.token.enable.request.inbox = \"true\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.token.enable.request.outbox = \"true\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.token.enable.browser = \"true\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.token.inbox.header = \"Authorization\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.token.outbox.header = \"Authorization\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.secret.inbox.string = \"${EUO_SECRET}\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.secret.outbox.string = \"${EUO_SECRET}\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.secret.browser.string = \"${EUO_SECRET}\"" /etc/euro-office/documentserver/local.json +yq -i ".services.CoAuthoring.secret.session.string = \"${EUO_SECRET}\"" /etc/euro-office/documentserver/local.json + +cat <$HOME/.euro-office.creds +Set this in the Nextcloud administration settings Nextcloud Office settings: +Secret key: +${EUO_SECRET} +EOF +msg_ok "Configured Euro-Office" + +msg_info "Starting services" +systemctl restart ds-docservice ds-converter ds-metrics +for i in {1..10}; do + if [[ $(systemctl is-active ds-docservice) == active && $(systemctl is-active ds-converter) == active && $(systemctl is-active ds-metrics) == active ]]; then + break + fi + sleep 1 +done +systemctl restart nginx +msg_ok "Services started" + +motd_ssh +customize +cleanup_lxc diff --git a/json/eurooffice.json b/json/eurooffice.json new file mode 100644 index 0000000000..3eedd7169d --- /dev/null +++ b/json/eurooffice.json @@ -0,0 +1,38 @@ +{ + "name": "Euro-Office", + "slug": "eurooffice", + "categories": [12], + "date_created": "2026-07-23", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://euro-office.github.io/documentation/", + "website": "https://github.com/Euro-Office", + "logo": "", + "description": "Euro-Office is a FOSS office suite and collaborative software platform, based on software from a more restrictively licensed office suite called OnlyOffice, that provides editors for documents, spreadsheets, presentations, and PDFs. The software includes web-based applications designed for document creation, editing, and collaborative work.", + "install_methods": [ + { + "type": "default", + "script": "ct/eurooffice.sh", + "config_path": "/etc/euro-office/documentserver/local.json", + "resources": { + "cpu": 4, + "ram": 4096, + "hdd": 10, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Secret Key is located in /root/.euro-office.creds", + "type": "info" + } + ] +}