Install Etherpad-lite: Difference between revisions

From Creative Crowds wiki
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Installation==
''7 Nov 2025''
''7 Nov 2025''


Line 10: Line 8:


nodejs in apt trixie: <code>nodejs/stable 20.19.2+dfsg-1 amd64</code>
nodejs in apt trixie: <code>nodejs/stable 20.19.2+dfsg-1 amd64</code>
==install etherpad-lite==


  apt install nodejs npm
  apt install nodejs npm
Line 18: Line 18:


  adduser --system --no-create-home etherpad-lite
  adduser --system --no-create-home etherpad-lite
addgroup etherpad-lite
adduser etherpad-lite etherpad-lite


  cd /opt/
  cd /opt/
Line 23: Line 27:
  git clone -b master https://github.com/ether/etherpad-lite.git
  git clone -b master https://github.com/ether/etherpad-lite.git


  chown -R etherpad-lite:root etherpad-lite/
mv etherpad-lite etherpad
 
  chown -R etherpad-lite:etherpad-lite etherpad/


  su -s /bin/bash etherpad-lite
  su -s /bin/bash etherpad-lite


  cd etherpad-lite/
  cd etherpad/


  pnpm i
  pnpm i
Line 44: Line 50:


now, a systemd file to make it run in the background as a service?
now, a systemd file to make it run in the background as a service?
cd /etc/systemd/system/
nano etherpad-lite.service
paste the following:
<pre>
[Unit]
Description=etherpad-lite (real-time collaborative document editor)
After=syslog.target network.target
[Service]
Type=simple
User=etherpad-lite
Group=etherpad-lite
WorkingDirectory=/opt/etherpad-lite
Environment=NODE_ENV=production
ExecStart=pnpm run prod
Restart=always
StandardOutput=append:/var/log/etherpad/etherpad.log
StandardError=append:/var/log/etherpad/etherpad-error.log
[Install]
WantedBy=multi-user.target
</pre>
systemctl daemon-reload
systemctl enable <service file name without .service extension>
/opt/etherpad-lite/bin/installDeps.sh
systemctl start <service file name without .service extension>
To see if it worked:
systemctl status etherpad-lite


==nginx==
==nginx==


and changes in the nginx config to make it run at https://cc.practices.tools/pad/
change the nginx config to make etherpad run at https://cc.practices.tools/pad/
 
sudo nano /etc/nginx/sites-enabled/default
 
paste the following:
 
# ----------------------------------------------------
# ETHERPAD
location /pad/ {
        proxy_buffering off;
        proxy_set_header Host $host;
        # optional headers
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr; # EP logs to show the actual remote IP
        proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when https is used
        # recommended with keepalive connections
        proxy_http_version 1.1;
        # WebSocket support
        proxy_set_header Upgrade $http_upgrade;
        # upstream
        proxy_pass http://127.0.0.1:9001/;
}
# make sure that /pad also works
location = /pad {
        return 301 /pad/;
}


==admin access==
==admin access==
Line 55: Line 126:
==install plugins==
==install plugins==


==migrate database==
List of plugins: https://static.etherpad.org/index.html
 
and then migrate the database from the OVH server here.. (hmm, would the database of the etherpad version there be compatible the with this etherpad version 2.5.3?.... something to check....)


==Plugins==
To install one:
 
For plugins: https://static.etherpad.org/index.html


  cd /path/to/etherpad-lite
  cd /path/to/etherpad-lite
  pnpm run plugins i ep_${plugin_name}
  pnpm run plugins i ep_${plugin_name}


wish list:
A plugin wish list for CC:


* ep_linkify2 https://www.npmjs.com/package/ep_linkify2
* ep_linkify2 https://www.npmjs.com/package/ep_linkify2
==migrate database==
and then migrate the database from the OVH server here.. (hmm, would the database of the etherpad version there be compatible the with this etherpad version 2.5.3?.... something to check....)
let's follow this: https://github.com/ether/etherpad-lite/wiki/How-to-migrate-the-database-from-Etherpad-to-Etherpad-Lite
[[Category:Sysadmin]]

Latest revision as of 19:54, 11 December 2025

7 Nov 2025

These are the steps followed to install Etherpad-lite 2.5.3 on CC:

https://github.com/ether/etherpad-lite?tab=readme-ov-file#installation

required: Node.js >= 18.18.2.

nodejs in apt trixie: nodejs/stable 20.19.2+dfsg-1 amd64

install etherpad-lite

apt install nodejs npm
npm install -g pnpm

"pnpm is up to 2x faster than npm" (hmm, oke)

adduser --system --no-create-home etherpad-lite
addgroup etherpad-lite
adduser etherpad-lite etherpad-lite
cd /opt/
git clone -b master https://github.com/ether/etherpad-lite.git
mv etherpad-lite etherpad
chown -R etherpad-lite:etherpad-lite etherpad/
su -s /bin/bash etherpad-lite
cd etherpad/
pnpm i
pnpm run build:etherpad
pnpm run prod

we should now be able to open etherpad at: http://localhost:9001, but as we are not in the same local network as the CC server... we can open it at:

http://193.170.194.207:9001/

works!

systemd file

now, a systemd file to make it run in the background as a service?

cd /etc/systemd/system/
nano etherpad-lite.service

paste the following:

[Unit]
Description=etherpad-lite (real-time collaborative document editor)
After=syslog.target network.target

[Service]
Type=simple
User=etherpad-lite
Group=etherpad-lite
WorkingDirectory=/opt/etherpad-lite
Environment=NODE_ENV=production
ExecStart=pnpm run prod
Restart=always

StandardOutput=append:/var/log/etherpad/etherpad.log
StandardError=append:/var/log/etherpad/etherpad-error.log

[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable <service file name without .service extension>
/opt/etherpad-lite/bin/installDeps.sh
systemctl start <service file name without .service extension>

To see if it worked:

systemctl status etherpad-lite

nginx

change the nginx config to make etherpad run at https://cc.practices.tools/pad/

sudo nano /etc/nginx/sites-enabled/default

paste the following:

# ----------------------------------------------------
# ETHERPAD

location /pad/ {
       proxy_buffering off;
       proxy_set_header Host $host;
       # optional headers
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $remote_addr; # EP logs to show the actual remote IP
       proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when https is used
       # recommended with keepalive connections
       proxy_http_version 1.1;
       # WebSocket support
       proxy_set_header Upgrade $http_upgrade;
       # upstream
       proxy_pass http://127.0.0.1:9001/;
}
# make sure that /pad also works 
location = /pad {
       return 301 /pad/;
}

admin access

Admin username and password not set in settings.json. To access admin please uncomment and edit "users" in settings.json

install plugins

List of plugins: https://static.etherpad.org/index.html

To install one:

cd /path/to/etherpad-lite
pnpm run plugins i ep_${plugin_name}

A plugin wish list for CC:

migrate database

and then migrate the database from the OVH server here.. (hmm, would the database of the etherpad version there be compatible the with this etherpad version 2.5.3?.... something to check....)

let's follow this: https://github.com/ether/etherpad-lite/wiki/How-to-migrate-the-database-from-Etherpad-to-Etherpad-Lite