These days, the need for platforms that provide online communication services has increased exponentially. At Clouding, we are here to make your life easier in any way we can during the COVID-19 health emergency.
That is why we are sharing the following article, in which we explain how to install the free videoconferencing platform Jitsi, which can serve as an alternative to Skype, Webex, or Zoom.
Jitsi offers several important advantages, including:
- It is a P2P system, meaning that each participant's video and audio are shared by each node (each participant), so, since it is not centralized on a server (or VPS in our case), we will avoid interruptions in videoconferences.
- It can be scaled to suit your needs: if it performs poorly with our VPS's initial configuration, more resources can be allocated as needed.
- It is compatible with WebRTC.
- It allows encrypted videoconferences.
In this tutorial, we will install Jitsi on a server with 1 vCore, 2GB of RAM, and 5GB of ssd disk space. We will use the Docker image since it will be installed in containers.
Before installing it, we recommend trying it out at https://meet.jit.si, which lets you test this service deployed on a public server.
Create the VPS
As mentioned, we will choose the Docker on Ubuntu 18.04 image, with 1 vCore, 2GB of RAM, and 5GB of SSD.
You must also open the following ports for it to work correctly:
- 80/tcp for the HTTP web service (will redirect to 443)
- 443/tcp for HTTPS
- 4443/tcp for RTP media over TCP
- 10000/udp for RTP media over UDP
Jitsi Architecture
The Jitsi diagram is as follows:
Jitsi is organized into the following components:
- Web server: the Jitsi Meet graphical interface, based on Nginx.
- Prosody: the XMPP server.
- Jicofo: the main XMPP component.
- Jitsi Videobridge: the core of the system.
- Jigasi: the SIP component, for dialing into the video call by phone (we will not use it in this article, since it requires a subscription with a telephone company).
Jitsi uses an XMPP server for relaying, but it will not be visible outside the system by default.
We will use Let's Encypt to generate an HTTPS certificate.
Settings
To install it, we will use Docker Compose to speed up the process. The configuration file we will use is: https://raw.githubusercontent.com/jitsi/docker-jitsi-meet/master/docker-compose.yml
The file has quite a few environment variables for configuring the installation. In our case, we will change the following:
Basic:
- CONFIG: Directory where we will store the configuration
- TZ: Time zone
- HTTP_PORT: Port for exposing the HTTP service
- HTTPS_PORT: Port for exposing the HTTPS service
- PUBLIC_URL: The website where Jitsi will be accessible
Let's Encrypt:
- ENABLE_LETSENCRYPT: To generate an HTTPS certificate
- LETSENCRYPT_DOMAIN: The domain for which we want to generate the certificate
- LETSENCRYPT_EMAIL: To receive notifications about our certificate.
Jibri:
- ENABLE_RECORDING: To allow videoconferences to be recorded to disk
Many more installation parameters can be modified. To do so, see the environment variable documentation
The easiest way to customize the file is to download it from https://raw.githubusercontent.com/jitsi/docker-jitsi-meet/master/env.example and replace the values explained above with:
Basic Configuration
CONFIG=~/.jitsi-conf
HTTP_PORT=80
HTTPS_PORT=443
TZ=Europe/Madrid
PUBLIC_URL=VPS.clouding.host
Let's Encrypt
ENABLE_LETSENCRYPT=1
LETSENCRYPT_DOMAIN=VPS.clouding.host
LETSENCRYPT_EMAIL=CORREO@DOMINIO.ES
To receive emails from Let's Encrypt, SMTP traffic must be enabled.
Installation
Get the Docker compose file mentioned above from GitHub:
wget https://raw.githubusercontent.com/jitsi/docker-jitsi-meet/master/docker-compose.yml
Download the example env file and rename it to .env:
wget https://raw.githubusercontent.com/jitsi/docker-jitsi-meet/master/env.example
mv env.example .env
Modify the .env file with the desired configuration; we will use the one mentioned above as an example.
Create the directories needed to store the Jitsi configuration. This will be done in the folder specified in the .env file as CONFIG, in our case, in ~/.jitsi-conf:
mkdir -p ~/.jitsi-conf/{web/letsencrypt,transcripts,prosody,jicofo,jvb}
Install Docker Compose:
apt install docker-compose
Run Docker Compose:
docker-compose up -d
Warning
If Docker Compose returns an error saying it does not support the version of the docker-compose.yml file, it is probably because you installed Ubuntu 16.04 instead of Ubuntu 18.04, since at least version 1.10.0 of docker-compose is required (the minimum that supports version 3 of the file).
Usage
Once installed, all you need to do is access our server's URL using a browser:
As you can see, the interface is very simple: there is only a text field for creating a room. Rooms are meetings that different users can join through the link shown on the screen (https://VPS.clouding.host/NOMBRESALA):
The first person to join acts as the moderator, and people who join afterward act as guests (with fewer permissions).
You can also set a password for the room to restrict access to the users you give it to. You can also use an authentication method and require users to identify themselves (this is not required by default). To do so, see the environment variable documentation.
You can configure the videoconference with options such as changing the video quality or even streaming it live through YouTube in the room's configuration options:
As we have seen, Jitsi is a simple and powerful alternative to other cloud videoconferencing services, highly customizable and independent of third-party servers.
The author of this article is David Población, a regular Clouding contributor.