Skip to content

Instantly share code, notes, and snippets.

@facsiaginsa
Last active November 30, 2023 10:31
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save facsiaginsa/c1f45a359adefabe71f748d9894a22bb to your computer and use it in GitHub Desktop.
Save facsiaginsa/c1f45a359adefabe71f748d9894a22bb to your computer and use it in GitHub Desktop.
How to Integrate Etherpad & Jitsi

How to Integrate Etherpad & Jitsi

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.

@daxiondi
Copy link

daxiondi commented Dec 3, 2020

I followed your configuration and successfully started document sharing, but when the second person came in, document sharing was automatically turned off. Do you have such a problem? Can you share your solution?

@facsiaginsa
Copy link
Author

I don't have such problem. maybe look at your browser console to search for a clue what causing the error?

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