
To install jitsi with jibri(recording & streaming module) on aws it takes quite a list of things to be done in sequence and more often than not results in some silly mistake somewhere which makes it a pain to get it working completely as expected. Since i have been setting up around 15-20 servers in the last month or so – I had become quite aware of the sequence of installation steps on ubuntu 16.04. Wanted to try the sequence in 20.04 latest LTS version of ubuntu. Surprisingly, the following sequence of steps makes it work in 20.04 without any problem. I was able to achieve installation to a working solution in under 20 mins 🙂 Not bad!
The sequence of things to do is: (all commands are run as root and server hostname shoudl replace test.nutcrackerz.in which was where I installed.)
Entire video of the 20 minutes of installation is here:
- The ports to be opened on the server instance is shown below:

- Since AWS comes with aws kernel image and jibri needs generic image to record sounds thru sound module. we have to install the generic kernel image and boot to it. its just few commands to get it working :
$apt -y install linux-image-extra-virtual
$vim /boot/grub/grub.cfg
## Find out the new kernel from above and make it as default
## so the first line on below file looks something like
## GRUB_DEFAULT='gnulinux-advanced-ce780dbf-6f70-412d-87dd-61654730a231>gnulinux-5.4.0-42-generic-advanced-ce780dbf-6f70-412d-87dd-61654730a231'
$vim /etc/default/grub
## add above modification as per your generic kernel version you installed. Checkout the youtube video link if you have any doubts.
$update-grub
- Install latest google chrome and web driver.
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 -y update
apt-get -y install google-chrome-stable
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
sudo mv -f ~/chromedriver /usr/local/bin/chromedriver
sudo chown root:root /usr/local/bin/chromedriver
sudo chmod 0755 /usr/local/bin/chromedriver
Install jibri
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
sudo sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list"
sudo apt-get update
sudo apt-get install jibri
Configure Jibri
echo "snd-aloop" >> /etc/modules
mkdir /srv/recordings
chown jibri:jitsi /srv/recordings
vim /etc/jitsi/jibri/config.json
## Modify the domain and all string that is xmpp.domain to your server hostname . I was installing on test.nutcrackerz.in so it will look like the following:

Restart jibri
systemctl restart jibri
systemctl status jibri
Install jitsi-meet and remove TLSv1.3 from nginx config.
apt install jitsi-meet
vim /etc/nginx/sites-enabled/test.nutcrackerz.in.conf ## in line 25 make change so it is [ ssl_protocols TLSv1.2 ] ; remove TLSv1.3
systemctl restart nginx
certbot-auto has problems with ubuntu 20.04 so do following
apt install certbot
vim /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh
## under condition if [ -f /etc/nginx/sites-enabled/$DOMAIN.conf ] ; then
## replace ./certbot-auto to certbot (without ./) so it looks like:

Update prosody config with recorder domain
vim /etc/prosody/conf.d/test.nutcrackerz.in.cfg.lua
#add
VirtualHost "recorder.test.nutcrackerz.in"
modules_enabled = {
"ping";
}
authentication = "internal_plain"
so it looks like:

prosodyctl register username auth.test.nutcrackerz.in password
prosodyctl register username recorder.test.nutcrackerz.in password
##username and password are default strings set in jibri config if you need to change you can set your custom names/passwords in initial jibri/config.json file
edit sip properties file as below:
vim /etc/jitsi/jicofo/sip-communicator.properties
## add below lines:
org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.test.nutcrackerz.in
org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90
Enable services so they autostart on server bootup (if required) and add user mod for jibri user
systemctl enable nginx.service
systemctl enable jitsi-videobridge2.service
systemctl enable jicofo.service
systemctl enable prosody.service
systemctl enable jibri.service
sudo usermod -aG adm,audio,video,plugdev jibri
Add hiddenDomain to jitsi meet config so it does not show recorder joinee as another conference user:
vim /etc/jitsi/meet/test.nutcrackerz.in-config.js
# add
hiddenDomain: 'recorder.test.nutcrackerz.in',
Reboot and you are done. You should have the server working with recordings stored in /srv/recordings and live streaming should work as expected as well.
hlw sir i am problem with recording. it says failed to start recording.
my jicofo log is
Jicofo 2020-11-20 08:14:39.202 INFO: [36] org.jitsi.jicofo.recording.jibri.JibriRecorder.log() Failed to start a Jibri session:Internal server error
Hi , do you find other logs like ffmpeg.log browser.log inside the jibri log folder. only with that we can find out the problem
no logs like ffmpeg.log,browser.log inside jibri log folder.i have jitsi and jibri on same aws. i am getting error like this on jicofo log.
Jicofo 2020-11-22 11:13:36.924 INFO: [66] org.jitsi.jicofo.recording.jibri.JibriSession.log() Cleaning up current JibriSession
Jicofo 2020-11-22 11:13:36.928 INFO: [35] org.jitsi.jicofo.recording.jibri.JibriRecorder.log() Failed to start a Jibri session:Internal server error
org.jitsi.jicofo.recording.jibri.JibriSession$StartException: Internal server error
at org.jitsi.jicofo.recording.jibri.JibriSession.startInternal(JibriSession.java:382)
at org.jitsi.jicofo.recording.jibri.JibriSession.start(JibriSession.java:335)
at org.jitsi.jicofo.recording.jibri.JibriSession.retryRequestWithAnotherJibri(JibriSession.java:649)
thanks for the reply. i dont have other logs like ffmpeg.log browser.log inside the jibri log folder.
Any help sir
Hey @sujeeb ping my on Skype at Vivek.vn. Let me see if I can help
can we download or send to email recorded file?
Setup a simple http server on server say http / server ip:6000/ and have the root directory of Web server as recordings then you can download the files from that Web server http access
I want to download directly when recording is stopped.
Any solution on that sir?
THe simplest way to do somehting with the recording is as soon as jibri stops hook a script to do whatever you want. or from UI when y ou have end confierence, trigger a backend api call to upload /transfer video recording. Either way you have to do lot of tinkering in internals, may need to do lot of trial and error there.
thank you for the reply sir.
My finalize script is:
RECORDINGS_DIR=$1
# Find latest modified directory
_lastdir=$(find /srv/recordings -mindepth 1 -maxdepth 1 -type d -exec stat –printf=”%Y\t%n\n” {} \; | sort -n -r | head -1 | cut -f2)
# Rename the directory
if [ -r ${_lastdir} ]; then
mv ${_lastdir} /srv/recordings/$(date +%Y-%m-%d_%H:%M)
fi
# Find files in directory
_recording=$(find /srv/recordings/$(date +%Y-%m-%d_%H:%M) -type f -name “*.mp4” -exec basename {} .mp4 \;)
# Send file(s) list
echo -e “Hi ,\n\nNew conference recording is available:\n\n ${_recording}” | mailx -s “New conference recording” meeting creator email address
# Move the .mp4 file & delete the folder
mv /srv/recordings/$(date +%Y-%m-%d_%H:%M)/*.mp4 /srv/recordings/
# ffmpeg need some time to finalize the .mp4 – then remove old folder
sleep 1m
cd /srv/recordings
find . -maxdepth 1 -mindepth 1 -type d -exec rm -rf ‘{}’ \;
exit 0
now i want to download directly when recording stops or send email to meeting creator email address. how can i do that sir?
@Sujeeb you cant diretly download or emailt he video .. instead you can set up a different server on some unused port.. say some python http.server on port 3000.. that is serving the recording directory. then in that script you can send email with link for download liek http://serverip/recording.mp4 etc. you have to setup some SMTP server or use some service to send email i think. So technically you download si actually a download link
any solution for that sir?
thank you sir.
i have smtp server setup but i want meeting creator email address on that finalized script to send email how can achieve that sir?
you have to customize the react code for jitsi. or you have to just overlay a text box to capture email address seperately adn have a php or some POST script on webserver to save that email address adn pass taht to the script. eitherway UI has to be added/modified. checkout jitsi react code. it shoudl be simple to get user.email information from the react code and add POST request in it . or inside index.html in jitsi-meet foldedr.. add a text box and submit button adn save that email address.. after entering hide it .. so all logic is inside html file not in jitsi-meet react.
Where is jitsi react code? I didn’t find that sir.
https://github.com/jitsi/jitsi-meet this is the one that gets installed in your /usr/share/jitsi-meet/ yu have to customize this code and then place it there
I dont have react folder on my jitsi installation aws andi have jwt token implemention howcan I get meeting creator email address in recording finalize script sir
hlw sir i have implemented jitis and jibri on same aws lightsail can we access recording file from that sir?