enfascination here are the steps to install and run Etherpad:
- Create a new Node.js app and make a note of the app's assigned port (visible in the app list).
- Add the app to a website.
- Log in to SSH as your app's shell user.
- Install pnpm and Etherpad by running the following commands, replacing "name_of_app" with your app name:
source scl_source enable nodejs20
cd ~/apps/name_of_app
npm install pnpm
export PATH=$PWD/node_modules/.bin:$PATH
git clone -b master https://github.com/ether/etherpad-lite.git
cd etherpad-lite
pnpm i
pnpm run build:etherpad
- Edit the app's
start
script so it looks like the following, again replacing "name_of_app" with your app name. Also replace "NNNNN" with your app's assigned port:
#!/bin/bash
APPNAME=name_of_app
PORT=NNNNN
# set node version via scl
source scl_source enable nodejs20
NODE="$( which node )"
PNPM="$HOME/apps/$APPNAME/node_modules/.bin/pnpm"
# set your project info here
PROJECT="etherpad-lite"
STARTCMD="$PNPM run prod"
APPDIR=$HOME/apps/$APPNAME
LOGDIR=$HOME/logs/apps/$APPNAME
TMPDIR=$APPDIR/tmp
PROJECTDIR=$APPDIR/$PROJECT
PIDFILE=$TMPDIR/node.pid
mkdir -p $APPDIR/tmp
if [ -e "$PIDFILE" ] && (pgrep -F $PIDFILE &> /dev/null); then
echo "$APPNAME already running."
exit 99
fi
/usr/sbin/daemonize -E PORT=$PORT -c $PROJECTDIR -a -e $LOGDIR/error.log -o $LOGDIR/console.log -p $PIDFILE $STARTCMD
echo "Started $APPNAME."
- Restart the app:
~/apps/name_of_app/stop
~/apps/name_of_app/start
At this point EtherPad should be up and running on the site you created in step 2.