#!/usr/bin/env bash # Copyright (c) 2021-2025 community-scripts ORG # Author: vhsdream # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # Source: https://opencloud.eu source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 catch_errors setting_up_container network_check update_os # msg_info "Installing Dependencies" # 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/collaboraonline.sources Types: deb URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-deb Suites: ./ Signed-By: /etc/apt/keyrings/collaboraonline-release-keyring.gpg EOF $STD apt-get update $STD apt-get install -y coolwsd code-brand msg_info "Installing ${APPLICATION}" OPENCLOUD=$(curl -s https://api.github.com/repos/opencloud-eu/opencloud/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') DATA_DIR="/var/lib/opencloud/" CONFIG_DIR="/etc/opencloud" ENV_FILE="${CONFIG_DIR}/opencloud.env" IP="$(hostname -I | awk '{print $1}')" curl -fsSL "https://github.com/opencloud-eu/opencloud/releases/download/v${OPENCLOUD}/opencloud-${OPENCLOUD}-linux-amd64" -o /usr/bin/opencloud chmod +x /usr/bin/opencloud mkdir -p "$DATA_DIR" "$CONFIG_DIR" echo "${OPENCLOUD}" >/etc/opencloud/version msg_ok "Installed ${APPLICATION}" msg_info "Configuring ${APPLICATION}" cat <"$ENV_FILE" OC_URL=https://${IP}:9200 OC_INSECURE=true PROXY_ENABLE_BASIC_AUTH=true IDM_CREATE_DEMO_USERS=false OC_LOG_LEVEL=warning OC_CONFIG_DIR=${CONFIG_DIR} OC_BASE_DATA_PATH=${DATA_DIR} EOF cat </etc/systemd/system/opencloud.service [Unit] Description=OpenCloud server [Service] Type=simple User=opencloud Group=opencloud EnvironmentFile=${ENV_FILE} ExecStart=/usr/bin/opencloud server Restart=always [Install] WantedBy=multi-user.target EOF useradd -r -M -s /usr/sbin/nologin opencloud chown -R opencloud:opencloud "$CONFIG_DIR" "$DATA_DIR" sudo -u opencloud opencloud init --config-path "$CONFIG_DIR" --insecure yes systemctl enable -q --now opencloud.service msg_ok "Configured ${APPLICATION}" motd_ssh customize msg_info "Cleaning up" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned"