- 1. About
- 2. Jitsi Meet Server (JMS)
- 3. Additional Jitsi Videobridge (JVB) node
- 4. Additional Jibri node
- 5- FAQ
This tutorial provides step by step instructions on how to create a Jitsi cluster based on Debian Buster (Debian 10).
Create or install a Debian Buster 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
.
JMS is a standalone server with conference room, video recording and streaming features. If the load level is low and simultaneous recording will not be made, JMS can operate without an additional JVB or Jibri node.
Additional JVB and Jibri nodes can be added in the future if needed.
Complete the following steps before starting the JMS installation.
At least 4 cores and 8 GB RAM (no recording/streaming)
At least 8 cores and 8 GB RAM (with recording/streaming)
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 meet.mydomain.com
then the following
command should resolv the server IP address:
host meet.mydomain.com
>>> meet.mydomain.com has address 1.2.3.4
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
meet.mydomain.com
in our example.
Let's say the host address of TURN is turn.mydomain.com
then the following
command should resolv the server IP address:
host turn.mydomain.com
>>> turn.mydomain.com is an alias for meet.mydomain.com.
>>> meet.mydomain.com has address 1.2.3.4
JMS needs the snd_aloop
kernel module to be able to record/stream a
conference but some cloud computers have a kernel that doesn't support it. In
this case, first install the standart Linux kernel and reboot the node with
this kernel. If you don't know how to do this, check FAQ.
Run the following command to check the snd_aloop
support. If the command has
an output, it means that the kernel doesn't support it.
modprobe snd_aloop
If the JMS server is behind a firewall, open the following ports:
- TCP/80
- TCP/443
- TCP/5222
- UDP/10000
Installation will be done with emrah-buster installer.
wget -O eb https://raw.githubusercontent.com/emrahcom/emrah-buster-base/master/installer/eb
wget -O eb-jitsi.conf https://raw.githubusercontent.com/emrahcom/emrah-buster-templates/master/installer/eb-jitsi.conf
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
meet.mydomain.com
and the host address of TURN is turn.mydomain.com
echo export TURN_HOST=turn.mydomain.com >> eb-jitsi.conf
echo export JITSI_HOST=meet.mydomain.com >> eb-jitsi.conf
This is an advanced option and skip this step if you don't need a development environment.
To install the development environment:
echo export INSTALL_JICOFO_DEV=true >> eb-jitsi.conf
echo export INSTALL_JITSI_MEET_DEV=true >> eb-jitsi.conf
bash eb eb-jitsi
Let's say the host address of JMS is meet.mydomain.com
and the host address
of TURN is turn.mydomain.com
. To set the Let's Encrypt certificate:
set-letsencrypt-cert meet.mydomain.com,turn.mydomain.com
Reboot the server
reboot
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 node when needed.
Complete the following steps before starting the JVB installation.
At least 4 cores and 8 GB RAM
If the JVB server is behind a firewall, open the following ports:
- TCP/22 (at least for JMS server)
- UDP/10000
If openssh-server
is not installed on the JVB node, install it first!
apt-get -y --allow-releaseinfo-change 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://meet.mydomain.com/static/jms.pub >> /root/.ssh/authorized_keys
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
A standalone JMS installation can only record a limited number of concurrent conferences but the CPU and RAM capacities are the limiting factor for the Jibri component. It is easy to scale the Jibri pool horizontally by adding as many as Jibri node when needed.
Complete the following steps before starting the Jibri installation.
At least 8 cores and 8 GB RAM
The Jibri node needs the snd_aloop
module too. Therefore check the kernel
first.
If the Jibri server is behind a firewall, open the following ports:
- TCP/22 (at least for JMS server)
If openssh-server
is not installed on the Jibri node, install it first!
apt-get -y --allow-releaseinfo-change 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://meet.mydomain.com/static/jms.pub >> /root/.ssh/authorized_keys
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
The cloud kernel used in most cloud machines has no support for the snd_aloop
module. It's easy to install the standart Linux kernel on a Debian system.
Execute the following commands as root
apt-get update
apt-get install linux-image-amd64
However, activating this kernel can be a bit complicated in some cases. GRUB
decides which kernel will be active at the next boot. If the standart Linux
kernel is not on the top order, you need to force GRUB
to choice the right
kernel.
First, check the GRUB
config using the following command
egrep '(^\s*initrd|submenu)' /boot/grub/grub.cfg | cut -c1-80
If the standart kernel is on the top, there is no problem. If the standard
kernel is under the submenu
line, you need to force GRUB
to choice it.
Edit the GRUB_DEFAULT
value in /etc/default/grub
. Let's say the standart
kernel is the third menuentry
after the submenu
line, the value will be
GRUB_DEFAULT='1>2'
'1' means the submenu
and '2' means the third menuentry (start counting
from 0)
Save the file, update the GRUB
config and reboot
update-grub
reboot
Check the active kernel after reboot
uname -a
But it's not completed yet. An upgrade
can easily break the boot order. It's
time to delete the cloud kernel packages completely.
apt-get purge 'linux-image-*cloud*'
Now, we can reset the default value for GRUB_DEFAULT
again.
In /etc/default/grub
GRUB_DEFAULT=0
Save the file, update the GRUB
config and reboot again.
update-grub
reboot
First, connect to the Jitsi container eb-jitsi
then edit the config files.
lxc-attach -n eb-jitsi
cd /etc/jitsi
ls
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.
At least 8 cores are required to start a Jibri
instance. The first 4 cores
are reserved for the base processes. After these 4 cores, one Jibri instance
is started for each additional 4 cores.
Just shutdown the machine, increase the number of cores and reboot.
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.
Use the related systemd
service.
systemctl stop jibri-ephemeral-container.service
systemctl start jibri-ephemeral-container.service
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/*
Jibri can only stream to Youtube but there is a little customization on
eb-jitsi
. So It is possible to stream to any RTMP server from eb-jitsi
.
Just use the full RTMP address as the stream key.
The jibri
config file was changed a while ago and the installer started to
use the new jibri
config file for the new installation. But if your JMS
was
installed before this change, you will get the following error message while
adding an additional Jibri
node:
sed: can't read /var/lib/lxc/eb-jibri-template/rootfs//etc/jitsi/jibri/config.json: No such file or directory
Something went wrong. The installation couldn't be completed!
Update add-jibri-node
script to fix this issue. Run the following command on
the JMS
host:
wget -O /usr/local/sbin/add-jibri-node https://raw.githubusercontent.com/emrahcom/emrah-buster-templates/master/machines/eb-jitsi-host/usr/local/sbin/add-jibri-node