feat: add Etherpad

Adds a new LXC helper-script for Etherpad (https://etherpad.org), a
real-time collaborative document editor (Node.js / pnpm).

- ct/etherpad.sh — launcher + update_script using check_for_gh_release
  against ether/etherpad-lite.
- install/etherpad-install.sh — Node.js 22 via NodeSource, pnpm via
  corepack, clone latest release tag, pnpm install --frozen-lockfile &&
  pnpm run build:etherpad, dedicated etherpad system user, systemd unit
  running `pnpm run prod`.
- json/etherpad.json — category 12 (Documents & Notes), port 9001,
  default credentials none, default resources 2 vCPU / 2 GB RAM / 8 GB
  disk on Debian 12 unprivileged.

Refs ether/etherpad#7529
This commit is contained in:
John McLear
2026-04-19 18:10:32 +01:00
parent f67a9a6b0c
commit 53d15c56d7
3 changed files with 211 additions and 0 deletions

74
ct/etherpad.sh Executable file
View File

@@ -0,0 +1,74 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: John McLear (JohnMcLear)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://etherpad.org
APP="Etherpad"
var_tags="${var_tags:-docs;collaboration;editor}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/etherpad-lite ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "etherpad-lite" "ether/etherpad-lite"; then
msg_info "Stopping Service"
systemctl stop etherpad
msg_ok "Stopped Service"
msg_info "Backing up Configuration"
[ -f /opt/etherpad-lite/settings.json ] && cp /opt/etherpad-lite/settings.json /opt/etherpad-settings.json.bak
[ -d /opt/etherpad-lite/var ] && cp -a /opt/etherpad-lite/var /opt/etherpad-var.bak
msg_ok "Backed up Configuration"
LATEST_TAG=$(curl -fsSL https://api.github.com/repos/ether/etherpad-lite/releases/latest | grep -oP '"tag_name":\s*"\K[^"]+')
msg_info "Updating to ${LATEST_TAG}"
cd /opt/etherpad-lite
$STD git fetch --tags --prune
$STD git checkout "${LATEST_TAG}"
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
$STD corepack enable
$STD pnpm install --frozen-lockfile
$STD pnpm run build:etherpad
msg_ok "Updated to ${LATEST_TAG}"
msg_info "Restoring Configuration"
[ -f /opt/etherpad-settings.json.bak ] && mv /opt/etherpad-settings.json.bak /opt/etherpad-lite/settings.json
[ -d /opt/etherpad-var.bak ] && rm -rf /opt/etherpad-lite/var && mv /opt/etherpad-var.bak /opt/etherpad-lite/var
chown -R etherpad:etherpad /opt/etherpad-lite
msg_ok "Restored Configuration"
msg_info "Starting Service"
systemctl start etherpad
msg_ok "Started Service"
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}:9001${CL}"

89
install/etherpad-install.sh Executable file
View File

@@ -0,0 +1,89 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: John McLear (JohnMcLear)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://etherpad.org
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
git \
curl \
ca-certificates \
build-essential \
pkg-config \
libsqlite3-dev
msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs
msg_info "Enabling pnpm via corepack"
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
$STD corepack enable
msg_ok "Enabled pnpm"
msg_info "Creating etherpad User"
if ! id -u etherpad >/dev/null 2>&1; then
useradd --system --create-home --home-dir /var/lib/etherpad --shell /usr/sbin/nologin etherpad
fi
msg_ok "Created etherpad User"
msg_info "Cloning Etherpad"
LATEST_TAG=$(curl -fsSL https://api.github.com/repos/ether/etherpad-lite/releases/latest | grep -oP '"tag_name":\s*"\K[^"]+')
if [ -z "${LATEST_TAG}" ]; then
msg_error "Unable to determine latest Etherpad release"
exit 1
fi
$STD git clone --depth 1 --branch "${LATEST_TAG}" https://github.com/ether/etherpad-lite.git /opt/etherpad-lite
echo "${LATEST_TAG}" >/opt/etherpad-lite/.version
msg_ok "Cloned Etherpad ${LATEST_TAG}"
msg_info "Building Etherpad"
cd /opt/etherpad-lite
$STD pnpm install --frozen-lockfile
$STD pnpm run build:etherpad
msg_ok "Built Etherpad"
msg_info "Configuring Etherpad"
cp /opt/etherpad-lite/settings.json.template /opt/etherpad-lite/settings.json
sed -i 's#"ip": *"127.0.0.1"#"ip": "0.0.0.0"#' /opt/etherpad-lite/settings.json
chown -R etherpad:etherpad /opt/etherpad-lite
msg_ok "Configured Etherpad"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/etherpad.service
[Unit]
Description=Etherpad Collaborative Editor
Documentation=https://etherpad.org/doc
After=network.target
[Service]
Type=simple
User=etherpad
Group=etherpad
WorkingDirectory=/opt/etherpad-lite
Environment=NODE_ENV=production
ExecStart=/usr/bin/env pnpm run prod
Restart=always
RestartSec=5
LimitNOFILE=65536
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now etherpad
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc

48
json/etherpad.json Normal file
View File

@@ -0,0 +1,48 @@
{
"name": "Etherpad",
"slug": "etherpad",
"categories": [
12
],
"date_created": "2026-04-19",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 9001,
"documentation": "https://etherpad.org/doc",
"website": "https://etherpad.org",
"logo": "https://raw.githubusercontent.com/ether/etherpad-lite/develop/src/static/favicon.ico",
"description": "Etherpad is a highly customizable real-time collaborative document editor. It lets multiple people edit the same document simultaneously in the browser, with live changes, per-user colors, chat, and a rich plugin ecosystem.",
"install_methods": [
{
"type": "default",
"script": "ct/etherpad.sh",
"config_path": "/opt/etherpad-lite/settings.json",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 8,
"os": "Debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "The default install uses the built-in DirtyDB store, intended for evaluation only. For production, edit /opt/etherpad-lite/settings.json and switch the 'dbType' to mysql or postgres.",
"type": "info"
},
{
"text": "View logs with: journalctl -u etherpad -f",
"type": "info"
},
{
"text": "Etherpad listens on port 9001. Restart the service after editing settings.json: systemctl restart etherpad",
"type": "info"
}
]
}