Skip to content

Latest commit

 

History

History
330 lines (226 loc) · 9.07 KB

jitsi-cluster.md

File metadata and controls

330 lines (226 loc) · 9.07 KB

Jitsi Cluster

How to create a Jitsi cluster based on Debian 11 Bullseye

1. About

This tutorial provides step by step instructions on how to create a Jitsi cluster based on Debian 11 Bullseye.

Create or install a Debian 11 Bullseye server for each node in this tutorial. Please, don't install a desktop environment, only the standard packages...

Run each command on this tutorial as root.

2. JMS (Jitsi Meet Server)

JMS is a standalone server which contains jitsi-meet, prosody, jicofo, jvb and coturn services. If the load level is low then JMS can operate without an additional JVB node.

Additional JVB nodes can be added in the future if needed.

For the server side recording and live streaming features, you will need to add additional jibri nodes.

2.1 Prerequisites

Complete the following steps before starting the JMS installation.

2.1.1 Machine features

At least 4 cores and 8 GB RAM

2.1.2 DNS record for JMS

A resolvable host address is required for JMS and this address should point to this server. Therefore, create the DNS A record for JMS before starting the installation.

Let's say the host address of JMS is jitsi.mydomain.corp then the following command should resolv the server IP address:

host jitsi.mydomain.corp

>>> jitsi.mydomain.corp has address 1.2.3.4
2.1.3 DNS record for TURN

A resolvable host address is required for TURN and this address should point to this server. Therefore, create the DNS CNAME record for TURN before starting the installation. The CNAME record should be an alias for JMS which is jitsi.mydomain.corp in our example.

Let's say the host address of TURN is turn.mydomain.corp then the following command should resolv the server IP address:

host turn.mydomain.corp

>>> turn.mydomain.corp is an alias for jitsi.mydomain.corp.
>>> jitsi.mydomain.corp has address 1.2.3.4
2.1.4 Public ports

If the JMS server is behind a firewall, open the following ports:

  • UDP/10000
  • TCP/80
  • TCP/443
  • TCP/5222 (if you will have an additional JVB or an additional Jibri)

2.2 Installing JMS

2.2.1 Downloading the installer

Download eb (the installer) and eb-jitsi.conf (the installer config file):

wget -O eb https://raw.githubusercontent.com/chimjk/jitsi-bulleye-base/main/installer/eb
wget -O eb-jitsi.conf https://raw.githubusercontent.com/chimjk/jitsi-bulleye/main/installer/eb-jitsi.conf
2.2.2 Setting the host addresses

Set the host addresses on the installer config file eb-jitsi.conf. The host addresses must be FQDN, not IP address... Let's say the host address of JMS is jitsi.mydomain.corp and the host address of TURN is turn.mydomain.corp

echo export TURN_FQDN=turn.mydomain.corp >> eb-jitsi.conf
echo export JITSI_FQDN=jitsi.mydomain.corp >> eb-jitsi.conf
2.2.3 Running the installer
bash eb eb-jitsi
2.2.4 Let's Encrypt certificate

Let's say the host address of JMS is jitsi.mydomain.corp and the host address of TURN is turn.mydomain.corp. To set the Let's Encrypt certificate:

set-letsencrypt-cert jitsi.mydomain.corp,turn.mydomain.corp

Be careful, no space between host addresses.

2.2.5 Reboot

Reboot the server

reboot

3. Additional JVB (Jitsi Videobridge) node

A standalone JMS installation is good for a limited size of concurrent conferences but the first limiting factor is the JVB component, that handles the actual video and audio traffic. It is easy to scale the JVB pool horizontally by adding as many as JVB nodes when needed.

3.1 Prerequisites

Complete the following steps before starting the JVB installation.

3.1.1 Machine features

At least 4 cores and 4 GB RAM

3.1.2 Public ports

If the JVB server is behind a firewall, open the following ports:

  • UDP/10000
  • TCP/22 (at least for JMS server)
  • TCP/9090 (at least for JMS server)

3.2 Installing JVB

3.2.1 Adding the JMS public key

If openssh-server is not installed on the JVB node, install it first!

apt-get update
apt-get install openssh-server curl

Add the JMS public key to the JVB node.

mkdir -p /root/.ssh
chmod 700 /root/.ssh
curl https://jitsi.mydomain.corp/static/jms.pub >> /root/.ssh/authorized_keys
3.2.2 Adding the JVB node to the pool

Let's say the IP address of the JVB node is 100.1.2.3. On the JMS server:

add-jvb-node 100.1.2.3

4. Additional Jibri node

For the server side recording and live streaming features, install additional jibri nodes.

4.1 Prerequisites

Complete the following steps before starting the Jibri installation.

4.1.1 Machine features

At least 4 cores and 4 GB RAM

4.1.2 The snd_aloop module

The Jibri node needs the snd_aloop module. Therefore check the kernel first. If the following command has an output, this means that the kernel has no support for snd-aloop.

modprobe snd-aloop
4.1.3 Public ports

If the Jibri server is behind a firewall, open the following ports:

  • TCP/22 (at least for JMS server)

4.2 Installing Jibri

4.2.1 Adding the JMS public key

If openssh-server is not installed on the Jibri node, install it first!

apt-get update
apt-get install openssh-server curl

Add the JMS public key to the Jibri node.

mkdir -p /root/.ssh
chmod 700 /root/.ssh
curl https://jitsi.mydomain.corp/static/jms.pub >> /root/.ssh/authorized_keys
4.2.2 Adding the Jibri node to the pool

Let's say the IP address of the Jibri node is 200.7.8.9. On the JMS server:

add-jibri-node 200.7.8.9

5. FAQ

5.1 My kernel has no support for the snd_aloop module. How can I install the standard Linux kernel?

The cloud kernel used in most cloud machines has no support for the snd_aloop module. Execute the following commands as root to install the standart Linux kernel on a Debian system.

apt-get update
apt-get install linux-image-amd64
apt-get purge 'linux-image-*cloud*'
# Abort kernel removal? No
reboot

Check the active kernel after reboot

uname -a

5.2 How can I change the Jitsi config on JMS?

First, connect to the Jitsi container eb-jitsi then edit the config files.

lxc-attach -n eb-jitsi
cd /etc/jitsi
ls

5.3 How can I change the videobridge config on the additional JVB?

First, connect to the JVB container eb-jvb then edit the config files.

lxc-attach -n eb-jvb
cd /etc/jitsi/videobridge
ls

5.4 I’ve setup the initial JMS node successfully, but getting a 'recording unavailable' error when trying to record.

Setup additional jibri nodes. Each jibri server should have at least 4 cores and 4 GB RAM.

5.5 How can I make a change/addition permanent in Jibri?

All running Jibri instances are ephemeral and changes made will disappear after shutdown. Apply to the eb-jibri-template container to make a change permanent and restart the Jibri instances.

5.6 How can I restart all running Jibri instances?

Use the related systemd service.

systemctl stop jibri-ephemeral-container.service
systemctl start jibri-ephemeral-container.service

5.7 Where are the recorded files?

Jibri creates a randomly named folder for each recording and puts the MP4 file in it. The recording folder is /usr/local/eb/recordings and the MP4 files are in the subfolders of this folder.

ls -alh /usr/local/eb/recordings/*