Skip to content

feat: add Etherpad#1723

Open
JohnMcLear wants to merge 2 commits into
community-scripts:mainfrom
JohnMcLear:feat/etherpad
Open

feat: add Etherpad#1723
JohnMcLear wants to merge 2 commits into
community-scripts:mainfrom
JohnMcLear:feat/etherpad

Conversation

@JohnMcLear
Copy link
Copy Markdown

@JohnMcLear JohnMcLear commented Apr 19, 2026

✍️ Description

Adds an LXC helper-script for Etherpad — a real-time collaborative document editor (Node.js / pnpm, Apache-2.0).

  • ct/etherpad.sh — launcher + update_script using check_for_gh_release against ether/etherpad-lite, with service-stop / config-backup / CLEAN_INSTALL=1 fetch_and_deploy_gh_release / rebuild / config-restore / service-start steps.
  • install/etherpad-install.sh — installs Node.js 22 via setup_nodejs, enables pnpm via corepack, deploys the latest ether/etherpad-lite release tarball to /opt/etherpad-lite via fetch_and_deploy_gh_release, runs pnpm install --frozen-lockfile && pnpm run build:etherpad, creates a dedicated etherpad system user, seeds settings.json from the template (rewriting ip to 0.0.0.0), and installs a systemd unit running pnpm run prod.
  • json/etherpad.json — category 12 (Documents & Notes), port 9001, default credentials none, selfh.st/icons logo, Debian 13.

🔗 Related PR / Issue

Link: ether/etherpad#7529

✅ Prerequisites

  • Self-review completed – Code follows project standards; AI-drafted, hand-reviewed and tested before submission.
  • Tested thoroughly – Fresh install on Debian 12 unprivileged LXC; http://<ip>:9001 loads the pad, multi-browser collaboration works, systemctl status etherpad active, logs via journalctl -u etherpad -f clean. Retest on Debian 13 pending after review refactor.
  • No breaking changes – New files only; no edits to existing scripts/json.
  • No security risks – Runs as an unprivileged etherpad system user; no hardcoded credentials; firewalling is the operator's responsibility.

🛠️ Type of Change

  • 🐞 Bug fix
  • New feature
  • 💥 Breaking change
  • 🆕 New script – A fully functional and tested script set.
  • 🌍 Website update
  • 🔧 Refactoring / Code Cleanup
  • 📝 Documentation update

🔍 Code & Security Review

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)ct/etherpad.sh, install/etherpad-install.sh, json/etherpad.json.
  • No hardcoded credentials

📋 Additional Information

  • Default resources: 2 vCPU / 2048 MB RAM / 8 GB disk, Debian 13, unprivileged.
  • Install path: fetch_and_deploy_gh_release "etherpad-lite" "ether/etherpad-lite" "tarball" "latest" "/opt/etherpad-lite" — same helper used across the catalog (e.g. ct/clickhouse.sh).
  • Update path: check_for_gh_release detects new ether/etherpad-lite tags; on update the script stops the service, backs up settings.json and var/, redeploys the tarball with CLEAN_INSTALL=1, reinstalls deps, rebuilds, restores config, restarts.
  • Review feedback addressed in commit e56def8a:
    • fetch_and_deploy_gh_release replaces manual clone in both install and update.
    • Dropped git, curl, ca-certificates from apt list (base image has them, helper removes git need).
    • Removed the id -u etherpad guard around useradd.
    • Debian 12 → 13.
    • Logo switched to selfh.st/icons webp.

📦 Application Requirements (for new scripts)

  • The application is at least 6 months old — Etherpad has been under active development since 2011 (14+ years).
  • The application is actively maintained — v2.6.1 released January 2026; continuous commit activity on develop through today.
  • The application has 600+ GitHub starsether/etherpad-lite has 18k+ stars.
  • Official release tarballs are published — see GitHub Releases; fetch_and_deploy_gh_release consumes archive/refs/tags/<tag>.tar.gz.
  • I understand that not all scripts will be accepted due to various reasons and criteria by the community-scripts ORG.

🌐 Source

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
@JohnMcLear JohnMcLear requested a review from a team as a code owner April 19, 2026 18:01
@JohnMcLear JohnMcLear mentioned this pull request Apr 19, 2026
6 tasks
Comment thread ct/etherpad.sh Outdated
Comment thread install/etherpad-install.sh
Comment thread install/etherpad-install.sh Outdated
Comment thread install/etherpad-install.sh Outdated
Comment thread json/etherpad.json Outdated
Comment thread json/etherpad.json Outdated
@JohnMcLear
Copy link
Copy Markdown
Author

Really valuable feedback, thanks. I'll get to making the proposed changes hopefluly in the next hour or so :)

- Replace manual tag lookup + git clone/checkout with
  fetch_and_deploy_gh_release (tarball mode) for both install and update
  paths, matching repo convention (see ct/clickhouse.sh).
- Drop git, curl, ca-certificates from apt deps — base image ships them
  and the helper no longer needs git.
- Remove the id -u etherpad guard; fresh LXC will not have the user.
- Bump Debian from 12 to 13 (trixie).
- Switch logo to selfh.st/icons webp.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JohnMcLear
Copy link
Copy Markdown
Author

Sorry about the delay in making the changes and thanks again for the feedback, you should be able to review and test deployment now :)

Comment thread json/etherpad.json
Comment on lines +36 to +37
"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"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't we directly add a mysql or postgresql-db?

we offer functions like setup_postgres_db to directly create a db with user

Copy link
Copy Markdown
Author

@JohnMcLear JohnMcLear Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm, we abstract database using ueberdb so let me see how we would make that work. I think it should be fine but I don't want to force a specific database on an admin as I think we support ten or so databases...

I'll grab my laptop out and provide a thorough answer shortly

@JohnMcLear
Copy link
Copy Markdown
Author

Would you be comfortable with sqlite? That might be the optimal choice?

If not, I'll look into the setup_postgres_db :)

@CrazyWolf13
Copy link
Copy Markdown
Member

sure, if you fully support sqlite then that is your choice ^^
I was more concerned because of the note that the other db is only for non-prod deployments.

@JohnMcLear
Copy link
Copy Markdown
Author

Perfect I'll get back to you within 48 hours

@JohnMcLear
Copy link
Copy Markdown
Author

Apologies, it's been a long 48 hours, I will get to this ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants