In this guide we’ll setup and configure Jitsi together with JWT authentication, and moderated meetings to be able to host video conferences for several hundreds (thousands depending on your server) of users, with the capability to host webinars.

The last couple of years has been very productive in the open source area. More and more companies decided to go open-source, and with that many great new open-sourced (and free) options are available for both your company and private life day-to-day. One of those services are Jitsi - one of the best (if not the best) video conference software. A big bonus is that it’s free to use, and you can even run it on your own server! If you care about privacy and your integrity, Jitsi is something for you. Eager to begin? Well, let’s do it!

Install Jitsi

First of all, you need to install the Jitsi “base”. It’s super easy since the developers made the configuring of the packages very straight forward. We won’t reinvent the wheel here, so take a look at their own guide.

We’ll install Jitsi on Ubuntu 22.04 (minimal) and here’s a short summation of the steps.


sudo apt-get update && sudo apt-get install lshw net-tools apt-utils gnupg2 nginx-full apt-transport-https ufw -y

Prosody repository

curl -sL | sudo tee /etc/apt/keyrings/prosody-debian-packages.key
echo "deb [signed-by=/etc/apt/keyrings/prosody-debian-packages.key] $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/prosody-debian-packages.list

Jitsi repository

curl -sL | gpg --dearmor | sudo tee /usr/share/keyrings/jitsi-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] stable/" | sudo tee /etc/apt/sources.list.d/jitsi-stable.list

More dependencies

sudo apt-get update && sudo apt-get install lua5.2 -y

Add ufw allow rules

This step is optional since you can control this in your gateway, and all the services that needs to be opened are automatically opened by Ubuntu. But, just to make sure, it could be a good idea to add this.

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 10000/udp
sudo ufw allow 22/tcp
sudo ufw allow 3478/udp
sudo ufw allow 5349/tcp
sudo ufw --force enable
sudo ufw status verbose

Kernel tuning

sudo sed -i "s|.*DefaultLimitNOFILE=.*|DefaultLimitNOFILE=65000|g" /etc/systemd/system.conf
sudo sed -i "s|.*DefaultLimitNPROC=.*|DefaultLimitNPROC=65000|g" /etc/systemd/system.conf
sudo sed -i "s|.*DefaultTasksMax=.*|DefaultTasksMax=65000|g" /etc/systemd/system.conf

Install Jitsi-meet

sudo apt-get install jitsi-meet -y

The recommended option here is to use Let’s Encrypt for TLS, and to be able to obtain a certificate you need 2 things:

  1. A domain i.e.
  2. Port 80/443 to be opened in your firewall/gateway

JWT authentication

Install and setup jitsi-meet-tokens

sudo apt install jitsi-meet-tokens

During the setup you will be asked to add your ID and SECRET. This could be anything, like a super long password i.e; 6TBGBuMaX8CpMtjqL53RgaqFCYSfhP2jR5RHDZLrQFzYBcPyG8. Remember, ID and SECRET should be different! Do not use our example password, create your own and save them in a secured place.

Disable auto-owner

sudo hocon -f /etc/jitsi/jicofo/jicofo.conf \
    set jicofo.conference.enable-auto-owner false

You may test your tokens on jitok, or

"aud": "jitsi",
"iss": "your token ID goes here",
"sub": "",
"room": "*"

Enable tokens

  1. Add allow_empty_token = true; in /etc/prosody/conf.d/
VirtualHost ""
    authentication = "token" -- do not delete me
    allow_empty_token = true;
    -- Properties below are modified by jitsi-meet-tokens package config
    -- and authentication above is switched to "token"

  1. Restart your services
sudo systemctl restart prosody.service
sudo systemctl restart jicofo.service

Moderated meetings

.env Config Micro-service

Generating key-pair can be done through OpenSSL:

sudo openssl genrsa -out keypair.pem 2048
sudo openssl rsa -in keypair.pem -pubout -out publickey.pem
sudo openssl pkcs8 -topk8 -inform PEM -outform DER -nocrypt -in keypair.pem -out moderated.der

Get the private_key_id for the .env file through this command

echo -n moderated.der | shasum -a 256

Change the publickey.pem name to the fetched private_key_id.

DEPLOYMENT_URL= url to the jitsi meet instance ex. (ending with a /)
PORT= Port for the microservice
PRIVATE_KEY_FILE= ex. path/to/key/moderated.der
PRIVATE_KEY_ID= for this instance it would be
'3c582c2fd86242e0a3655642607d548b5c271d4e1fe21ee7aa548438b3858640' as explained above
TARGET_TENANT= Tenant of your choice ex. moderated

Key Server

Next you’ll need to be able to serve the public key to the Jitsi instance. If you do not have a dedicated server for serving files, you could just set up a simple python HTTP server to test it out before creating a permanent solution.

Create a new folder and add the public key to it.

python3 -m http.server [PORT]

Jitsi Meet Configuration

Add the following global variables in the top section of /etc/prosody/conf.d/ either set this to * or specify the accepted issuer and audiences for the instance:

asap_accepted_issuers = {"*"};
asap_accepted_audiences = {"*"};

Then go to the Virtual-Host section and add/make sure the following is enabled:

VirtualHost ""
authentication = "token";
allow_empty_token = true;

Don’t forget to comment out the app-secret section like this since we now are using public keys

-- app_secret="super-secret-string"

Modify the component. Add muc_allowners to modules_enabled and set the allowners_moderated_subdomains to the target tenant you specified during the micro-service setup.

Component "" "muc"
modules_enabled = {
allowners_moderated_subdomains = { "moderated" }
sudo systemctl restart prosody && sudo systemctl restart jicofo && sudo systemctl restart jitsi-videobridge2

Download moderated meetings

  1. Clone the moderated meetings Git repository

    git clone
  2. Run the service

    npm run build && source .env && mvn spring-boot:run

Do you need help?

Now you should have Jitsi with JWT authentication and moderated meetings setup! If you need help, or are looking for someone that can host this for you, please contact Redpill Linpro - experts in Jitsi.

Containerized Development Environment

Do you spend days or weeks setting up your development environment just the way you like it when you get a new computer? Is your home directory a mess of dotfiles and metadata that you’re reluctant to clean up just in case they do something useful? Do you avoid trying new versions of software because of the effort to roll back software and settings if the new version doesn’t work?

Take control over your local development environment with containerization and Dev-Env-as-Code!

... [continue reading]


Published on February 27, 2024

Portable Java shell scripts with Java 21

Published on February 21, 2024