Credits to woodworker_life [ https://community.jitsi.org/t/how-to-to-setup-integrated-jitsi-and-jibri-for-dummies-my-comprehensive-tutorial-for-the-beginner/35718 ]
To handle recording and youtube streaming in your jitsy environment you need a jibri server who connects to your jitsi.
Your jitsi server is jitsi.mydomain.mytld
Your jibri server is jibri.mydomain.mytld
On Jibri:
Edit /etc/hosts and add jibri jibri.mydomain.mytld to 127.0.0.1
Edit /etc/hostname content to jibri
Update your Debian.
Install Java 8. YOU WILL NEED version 8, cs later versions will fail.
So test for exixting java:
java -version
Should return something like
openjdk version "1.8.0_242"
Remove it, if it’s not the lucky 8.
Installing Java 8:
apt-get install -y wget gnupg software-properties-common wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add - add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ apt-get update apt-get install -y adoptopenjdk-8-hotspot
Edit roots ~/.bash_profile and user jibri bash profile too and add this line export JAVA_HOME=/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java
Do
source ~/.bash_profile
Install some helpers:
apt-get install -y install unzip ffmpeg curl alsa-utils icewm xdotool xserver-xorg-input-void xserver-xorg-video-dummy
Setup your ALSA:
echo "snd-aloop" >> /etc/modules modprobe snd-aloop lsmod | grep snd_aloop
Install some Chrome:
curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list apt-get update apt-get install -y google-chrome-stable
Then configure Chrome:
mkdir -p /etc/opt/chrome/policies/managed echo '{ "CommandLineFlagSecurityWarningsEnabled": false }' >>/etc/opt/chrome/policies/managed/managed_policies.json
Install Chromedriver:
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` wget -N http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P ~/ unzip ~/chromedriver_linux64.zip -d ~/ rm ~/chromedriver_linux64.zip mv -f ~/chromedriver /usr/local/bin/chromedriver chown root:root /usr/local/bin/chromedriver chmod 0755 /usr/local/bin/chromedriver
Install Jibri:
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add - sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list" apt-get update && apt-get install -y jibri
Set jibri user rights:
usermod -aG adm,audio,video,plugdev jibri
Enable the jibri service.
systemctl enable jibri
On Jitsi:
Configure prosody:
Edit /etc/prosody/conf.avail/meet.myfirewall.org.cfg.lua
and add at the end:
-- internal muc component, meant to enable pools of jibri and jigasi clients Component "internal.auth.jitsi.mydomain.mytld" "muc" modules_enabled = { "ping"; } storage = "memory" muc_room_cache_size = 1000 VirtualHost "recorder.jitsi.mydomain.mytld" modules_enabled = { "ping"; } authentication = "internal_plain"
Reload prosody:
/etc/init.d/prosody reload
Create two prosody users:
prosodyctl register jibri auth.jitsi.mydomain.mytld JIBRIPASSWORD prosodyctl register recorder recorder.jitsi.mydomain.mytld RECORDERPASSWORD
Keep these passwords in mind!
Configure Jicofo:
Edit /etc/jitsi/jicofo/sip-communicator.properties and add two lines
at the end:
org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.jitsi.mydomain.mytld org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90
Reload jicofo:
/etc/init.d/jicofo reload
Configure jitsi meet:
Edit /etc/jitsi/meet/jitsi.mydomain.mytld-config.js:
Enable these lines or add them:
fileRecordingsEnabled: true, liveStreamingEnabled: true, hiddenDomain: 'recorder.jitsi.mydomain.mytld',
These commas are important!
Edit /usr/share/jitsi-meet/interface_config.js and add recording and livestreaming to TOOLBAR_BUTTONS
Open incoming port 5222 for jibri.mydomain.mytld on jitsis firewall.
On Jibri:
Do
mkdir /data/recordings chown jibri:jitsi /data/recordings
Edit /etc/jitsi/jibri/config.json:
{ "recording_directory":"/data/recordings", "finalize_recording_script_path": "/path/to/finalize_recording.sh", "xmpp_environments": [ { "name": "prod environment", "xmpp_server_hosts": [ "jitsi.mydomain.mytld" ], "xmpp_domain": "jitsi.mydomain.mytld", "control_login": { // The domain to use for logging in "domain": "auth.jitsi.mydomain.mytld", // The credentials for logging in "username": "jibri", "password": "JIBRIPASSWORD" }, "control_muc": { "domain": "internal.auth.jitsi.mydomain.mytld", "room_name": "JibriBrewery", "nickname": "jibri-nickname" }, "call_login": { "domain": "recorder.jitsi.mydomain.mytld", "username": "recorder", "password": "RECORDERPASSWORD" }, "room_jid_domain_string_to_strip_from_start": "conference.", "usage_timeout": "0" } ] }
Restart jibri:
systemctl restart jibri