How to Integrate Etherpad & Jitsi

Written by: Bagus Facsi Aginsa
Published at: 17 Dec 2020


Prerequisite

  1. Mysql Installed
  2. Jitsi Meet Installed
  3. Nodejs Installed (min v10.13)
  4. git installed

Sudo Access

Before we start we have to make sure that will be no permission problem

sudo su

Install Etherpad

Clone Etherpad source code and place it in directory

cd /usr/share
git clone --branch master https://github.com/ether/etherpad-lite.git etherpad

Create etherpad user & change directory permission

adduser etherpad
chown -R etherpad:etherpad etherpad
chmod -R 744 etherpad

Configure Etherpad

go to etherpad folder

cd etherpad

install pm2

npm install pm2 -g

find and configure this setting on setting.json:

"dbType" : "mysql",
  "dbSettings" : {
    "user":     "<your db user>",
    "host":     "localhost",
    "port":     3306,
    "password": "<your db password>",
    "database": "<your db name>",
    "charset":  "utf8mb4"
  },

create env by open /etc/environment

NODE_ENV=production

open bin/run.sh change this line

exec node "$SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js" "$@"

to this:

exec pm2 start "$SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js" "$@"

Run the Etherpad

su - etherpad
cd /usr/share/etherpad
bin/run.sh

check weather the service is running

netstat -ntplu | grep 9001

NGINX Configuration

Openjitsi nginx virtual host config at /etc/nginx/site-available/<your jitsi domain> and add this statement:

   # Etherpad Integration
    location ^~ /etherpad/ {
        proxy_pass http://localhost:9001/;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_buffering off;
        proxy_set_header ost $host;
    }

Jitsi Configuration

open config.js on /etc/jitsi/meet/<your domain>-config.js and add this statement:

      etherpad_base: 'https://<your domain>/etherpad/p/',

Checking

To make sure the etherpad is running and integrated with jitsi, create a nference room and open the menu on the bottom right corner. There should be “open shared document” menu. Click it, and it will open the etherpad document

For custom build and setting, you can refer to etherpad github page: https://github.com/ether/etherpad-lite.