Reading Time: 9 minutes

What is Jitsi?

Jitsi is a set of open-source projects that allow you to create a secure video conferencing system for your team. It has features such as superior sound quality, excellent encryption and privacy, multi-platform and much more. The Jitsi client can work both in the application and in the web browser. You can broadcast your desktop as well as individual windows, and invite users using URL-link. We will be installing Jitsi on Ubuntu 18.04 server. We will install additional components such as Java's OpenJdk, Nginx to correctly install, configure and use it. Let's talk a bit about the components.

  • Java OpenJDK - Java is one of the most popular object-oriented programming languages. OpenJDK is a free version of the Java development platform and consists of several components.
  • Nginx - Nginx is an HTTP reverse proxy server, a mail proxy server, and a general-purpose TCP/UDP proxy server.

Update Server

Before starting the installation, lets update our system software to the latest versions.

root@host:~# apt-get upgrade -y
Reading package lists... Done
Building dependency tree    
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@host:~#

Setting up Jitsi Meet 

Hostname and Full Domain Name

For this build, we will create our own Jitsi server which will use a FQDN (Fully Qualified Domain Name) to launch Jitsi within a browser. We begin with this step at the very beginning of our tutorial so that we can configure Encrypt to deploy an HTTPS certificate.

root@host:~# hostnamectl set-hostname jitsimeet
root@host:~#

Next, open the hosts file using the nano editor.

root@host:~# nano /etc/hosts

Add the following lines there.

127.0.1.1 jitsi.example.com jitsimeet
GNU nano 2.9.3 /etc/hosts
127.0.0.1 localhost
127.0.1.1 jitsi.example.com jitsimeet

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Now, save the file with Ctrl + X, then Y and enter. 

Now, let's do a hostname check using the following command.

root@host:~# hostname
jitsimeet
root@host:~#

root@host:~# hostname -f
jitsimeet.example.com
root@host:~#

Installing OpenJDK

Next, let's move on to installing the OpenJDK version of JRE 8. Although this is an older version of Java, it is quite stable and is used in many projects.

root@host:~# apt install -y openjdk-8-jre-headless
Reading package lists... Done
Building dependency tree    
Reading state information... Done

The following additional packages will be installed:
  ca-certificates-java java-common
Suggested packages:
  default-jre fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho
  fonts-wqy-microhei fonts-wqy-zenhei
The following NEW packages will be installed:
  ca-certificates-java java-common openjdk-8-jre-headless
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 27,5 MB of archives.
After this operation, 100 MB of additional disk space will be used.
Get:1 http://by.archive.ubuntu.com/ubuntu bionic-updates/main amd64 java-common all 0.68ubuntu1~18.04.1 [14,5 kB]
Get:2 http://by.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 openjdk-8-jre-headless amd64 8u242-b08-0ubuntu3~18.04 [27,5 MB]
Get:3 http://by.archive.ubuntu.com/ubuntu bionic-updates/main amd64 ca-certificates-java all 20180516ubuntu1~18.04.1 [12,2 kB]
Fetched 27,5 MB in 5s (5.491 kB/s)            
Selecting previously unselected package java-common.
(Reading database ... 153398 files and directories currently installed.)
Preparing to unpack .../java-common_0.68ubuntu1~18.04.1_all.deb ...
Unpacking java-common (0.68ubuntu1~18.04.1) ...

done.
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ca-certificates (20180409) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
done.
Setting up openjdk-8-jre-headless:amd64 (8u242-b08-0ubuntu3~18.04) ...
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode
root@host:~#

Now, let's verify our version of OpenJDK.

root@host:~# java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
root@host:~#

Next, we can set up our environment variable and refresh our profile.

root@host:~# echo "JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")" | sudo tee -a /etc/profile
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/
root@host:~#

root@host:~# source /etc/profile
root@host:~#

Install Nginx

Since Jitsi uses Nginx to work, there are several options on how to proceed. The fact is that when you install Jitsi, it automatically checks whether Nginx and Apache are installed and if they are not installed, then Jitsi installs Nginx by default. It also reconfigures port 443 which uses Nginx.

This being said, the preferred option here is to install Nginx ourselves. We choose to do this in advance so that we can better control the options we want to use. If we do not install it now, Jitsi will try to install it when the software is installed. If we disable any of the additional Nginx installation options or automatic configurations applied during the Jitsi install, our ports may be locked down and it will be quite difficult to repair it. Therefore, if we do not have Nginx currently installed, we should install it ourselves, and then during the Jitsi installation, disable the automatic installation and configuration of Nginx.

Next, we will install and configure the Nginx web server.

root@host:~# apt install -y nginx
Reading package lists... Done
Building dependency tree    
Reading state information... Done

The following additional packages will be installed:
  libnginx-mod-http-geoip libnginx-mod-http-image-filter
  libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream
  nginx-common nginx-core
Suggested packages:
  fcgiwrap nginx-doc
The following NEW packages will be installed:
  libnginx-mod-http-geoip libnginx-mod-http-image-filter
  libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx
  nginx-common nginx-core
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 598 kB of archives.
After this operation, 2.120 kB of additional disk space will be used.
...
Setting up libnginx-mod-http-image-filter (1.14.0-0ubuntu1.7) ...
Setting up libnginx-mod-mail (1.14.0-0ubuntu1.7) ...
Setting up libnginx-mod-http-xslt-filter (1.14.0-0ubuntu1.7) ...
Setting up libnginx-mod-http-geoip (1.14.0-0ubuntu1.7) ...
Setting up libnginx-mod-stream (1.14.0-0ubuntu1.7) ...
Setting up nginx-core (1.14.0-0ubuntu1.7) ...
Setting up nginx (1.14.0-0ubuntu1.7) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ufw (0.36-0ubuntu0.18.04.1) ...
Rules updated for profile 'OpenSSH'
Firewall reloaded
root@host:~#

Now, let's start the Nginx service if it did not start during installation.

root@host:~# systemctl start nginx.service
root@host:~#

Next, we should activate the Nginx service.

root@host:~# systemctl enable nginx.service
Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nginx
root@host:~#

Now, let verify that the service is active.

root@host:~# systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: e
   Active: active (running) since Thu 2020-04-02 18:17:00 +03; 13min ago
  Docs: man:nginx(8)
 Main PID: 3879 (nginx)
 Tasks: 3 (limit: 2327)
   CGroup: /system.slice/nginx.service
        ├─3879 nginx: master process /usr/sbin/nginx -g daemon on; master_pr
        ├─3880 nginx: worker process
        └─3881 nginx: worker process
 
кра 02 18:17:00 jitsimeet systemd[1]: Starting A high performance web server an
кра 02 18:17:00 jitsimeet systemd[1]: Started A high performance web server and
lines 1-13/13 (END)

We can exit the above command using Ctrl + c.

Note:
If you do not install Nginx now, it will be automatically installed with Jitsi. But, it is better to install it separately to better provide for more granular options and controls.

Install Jitsi

Next, we can proceed with installing the Jitsi software itself. We must note that there is a vast difference between Jitsi Meet used with or without active video bridge. Without video bridge, all video streams are peer to peer, so the more video participants you have, the more each local client has to work and, the more streams each participant's internet connection has to interact with. If we use video bridge, it bundles these streams on the server side.

Add Jitsi Repository.

Next, we will download the Jitsi gpg key, add the repository, and finally, install

root@host:~# wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
OK

root@host:~#
sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list"

root@host:~# sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list"
root@host:~#

Add Universal Repository

In Ubuntu, a Jitsi installation requires the universal package repositories to be enabled to install all the required dependencies.

root@host:~# apt-add-repository universe
'universe' distribution component is already enabled for all sources.
root@host:~#

Install Apt HTTPS Security

Next, we should verify that https support for apt repositories is available. This allows for the use of HTTPS when accessing repositories.

root@host:~# apt-get install apt-transport-https
Reading package lists... Done
Building dependency tree    
Reading state information... Done

The following NEW packages will be installed:
  apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1.692 B of archives.
After this operation, 153 kB of additional disk space will be used.
Get:1 http://by.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 apt-transport-https all 1.6.12 [1.692 B]
Fetched 1.692 B in 0s (123 kB/s)      
Selecting previously unselected package apt-transport-https.
(Reading database ... 150837 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.6.12_all.deb ...
Unpacking apt-transport-https (1.6.12) ...
Setting up apt-transport-https (1.6.12) ...
root@host:~#

Now, let’s update the package repository again.

root@host:~# apt-get update
Hit:1 http://by.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://by.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://by.archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]   
Get:5 https://download.jitsi.org stable/ InRelease [1.882 B]                  
Get:6 https://download.jitsi.org stable/ Packages [37,8 kB]            
Fetched 128 kB in 1s (156 kB/s)                                 
Reading package lists... Done
root@host:~#

Install JitsiMeet

Before installing, make sure to disable the installation of Nginx using the –no-install-recommends command flag like so. 

root@host:~#apt install --no-install-recommends jitsi-meet -y
Caution:
Do not skip entering important data during installation.

During installation, you will need to provide the name of the current host.

jitsimeet.example.com

And then we ask Jitsi to generate the SSL certificate themselves, we need to select the following option...

Generate a new self-signed certificate (You will later get as chance to obtain a Let's Encrypt certificate)

and press enter.

Now, we can use apt to install jitsi-meet.

root@host:~# apt install --no-install-recommends jitsi-meet
Reading package lists... Done
Building dependency tree
Reading state information... Done
...
The following additional packages will be installed:
jicofo jitsi-meet-prosody jitsi-meet-web jitsi-meet-web-config
jitsi-videobridge2 lua-bitop lua-expat lua-filesystem lua-sec lua-socket
lua5.1 prosody
Suggested packages:
lua-dbi-mysql lua-dbi-postgresql lua-dbi-sqlite3 lua-zlib
Recommended packages:
jitsi-meet-turnserver | apache2 lua5.1-event
The following NEW packages will be installed:
jicofo jitsi-meet jitsi-meet-prosody jitsi-meet-web jitsi-meet-web-config
jitsi-videobridge2 lua-bitop lua-expat lua-filesystem lua-sec lua-socket
lua5.1 prosody
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 70,3 MB of archives.
After this operation, 108 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y

* Applying /etc/sysctl.d/99-sysctl.conf ...
* Applying /etc/sysctl.conf ...
Created symlink /etc/systemd/system/multi-user.target.wants/jitsi-videobridge2.service → /lib/systemd/system/jitsi-videobridge2.service.
Setting up lua-sec:amd64 (0.6-4) ...
Setting up jitsi-meet-web-config (1.0.3962-1) ...
Can't load /root/.rnd into RNG
140358865605056:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd
Generating a RSA private key
.........++++....................................................++++
writing new private key to '/etc/jitsi/meet/jitsi.example.com.key'
---------------------
You can now switch to a Let's Encrypt certificate. To do so, execute:
/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh
----------------
Setting up lua-filesystem:amd64 (1.6.3-1) ...
Setting up lua-bitop:amd64 (1.0.2-5) ...
Setting up jitsi-meet-web (1.0.3962-1) ...
Setting up lua5.1 (5.1.5-8.1build2) ...
update-alternatives: using /usr/bin/lua5.1 to provide /usr/bin/lua (lua-interpreter) in auto mode
update-alternatives: using /usr/bin/luac5.1 to provide /usr/bin/luac (lua-compiler) in auto mode
Setting up lua-expat:amd64 (1.3.0-4) ...
Setting up jicofo (1.0-541-1) ...
useradd: warning: the home
 
directory already exists.
Not copying any file from skel directory into it.
Setting up prosody (0.10.0-1build1) ...
Adding user prosody to group ssl-cert
Setting up jitsi-meet-prosody (1.0.3962-1) ...
Generating RSA private key, 2048 bit long modulus (2 primes)
.............+++++...+++++
e is 65537 (0x010001)
Choose key size (2048): Key written to /var/lib/prosody/jitsi.example.com.key
Please provide details to include in the certificate config file.
Leave the field empty to use the default value or '.' to exclude the field.
countryName (GB): localityName (The Internet): organizationName (Your Organisation): organizationalUnitName (XMPP Department): commonName (jitsi.example.com): emailAddress (xmpp@jitsi.example.com):
Config written to /var/lib/prosody/jitsi.example.com.cnf
Certificate written to /var/lib/prosody/jitsi.example.com.crt
 
Generating RSA private key, 2048 bit long modulus (2 primes)
..............+++++..........+++++
e is 65537 (0x010001)
Choose key size (2048): Key written to /var/lib/prosody/auth.jitsi.example.com.key
Please provide details to include in the certificate config file.
Leave the field empty to use the default value or '.' to exclude the field.
countryName (GB): localityName (The Internet): organizationName (Your Organisation): organizationalUnitName (XMPP Department): commonName (auth.jitsi.example.com): emailAddress (xmpp@auth.jitsi.example.com):
Config written to /var/lib/prosody/auth.jitsi.example.com.cnf
Certificate written to /var/lib/prosody/auth.jitsi.example.com.crt
 
Clearing symlinks in /etc/ssl/certs...
done.
Updating certificates in /etc/ssl/certs...
134 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

Adding debian:auth.jitsi.example.com.pem
done.
done.
Setting up jitsi-meet (2.0.4376-1) ...
Processing triggers for systemd (237-3ubuntu10.39) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
root@host:~# 

After the installation has completed, enter the following command to submit the SSL-certificate.

Note:
It is necessary to enter an email address during the SSL install.

admin@example.com

And then click enter.

root@host:~# /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh
---------------------------------------------------------------------
This script will:
- Need a working DNS record pointing to this machine(for domain jitsimeet.example.com)
- Download certbot-auto from https://dl.eff.org to /usr/local/sbin
- Install additional dependencies in order to request Let's Encrypt certificate
- If running with jetty serving web content, will stop Jitsi Videobridge
- Configure and reload nginx or apache2, whichever is used
 
You need to agree to the ACME server's Subscriber Agreement (https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf)
by providing an email address for important account notifications
Enter your email and press [ENTER]: admin@example.com
--2020-04-02 22:48:27-- https://dl.eff.org/certbot-auto
Resolving dl.eff.org (dl.eff.org)... 151.101.112.201, 2a04:4e42:1b::201
Connecting to dl.eff.org (dl.eff.org)|151.101.112.201|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 80073 (78K) [application/octet-stream]
Saving to: 'certbot-auto'
 
certbot-auto 	100%[==================>] 78,20K --.-KB/s	in 0,07s  
 
2020-04-02 22:48:28 (1,13 MB/s) - 'certbot-auto' saved [80073/80073]

Creating virtual environment...
Installing Python packages...
Installation succeeded.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Unable to register an account with ACME server
root@host:~#

Verify Installation

Now we can open our browser and enter the address http://jitsimeet.example.com or https://jitsimeet.example.com. Then, follow the link above to get better acquainted with the interface.

Note:
Jitsi recommends using a minimum of 2 GB memory, although most servers now use two or more GB as a standard, even if you have less or want to play it safe by configuring the memory paging file.
root@host:~# dd if=/dev/zero of=/swapfile count=2048 bs=1M
root@host:~#

root@host:~# chmod 600 /swapfile
root@host:~#

root@host:~# mkswap /swapfile
root@host:~#

root@host:~# swapon /swapfile
root@host:~#

root@host:~#echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
/swapfile none swap sw 0 0
root@host:~#

root@host:~#free -m
total used free shared buff/cache available
Mem: 3936 1399 1558 37 977 2261
Swap: 472 0 472
root@host:~#

Conclusion

To recap what we've learned; In this article, we have read about what Jitsi is, what its used for and how it can be set up on Ubuntu 18. This set of open-source projects permits us to create a secure video conferencing system offering superior sound quality, excellent encryption and privacy, and much more. The official Jitsi client works both as an app and in a web browser allowing us to broadcast our desktop as well as individual windows.

Talk to an Expert Today!

Liquid Web can provide this type of platform in addition to many others to utilize Jitsi and similar software in which you can expand and diversify your ability to communicate effectively. If you would like to begin utilizing these options, reach out to one of our knowledgeable hosting advisors or Solutions team members to discuss your options!

Give us a call at 800.580.4985, or open a chat or ticket to learn how you can take advantage of these techniques today!

Avatar for Ellen Sletton

About the Author: Ellen Sletton

I'm 23 years old Linux Tech who always takes NO as Next Opportunity. Every day I'm trying to learn something new and share my knowledge with others. My free time I spend with my dog Emil or doing some UI/UX design or simply making an inspiring photo for my blog :) Sharing knowledge helps me generate new ideas and stay motivated.

Latest Articles

How to use kill commands in Linux

Read Article

Change cPanel password from WebHost Manager (WHM)

Read Article

Change cPanel password from WebHost Manager (WHM)

Read Article

Change cPanel password from WebHost Manager (WHM)

Read Article

Change the root password in WebHost Manager (WHM)

Read Article