// How to Customize docker-compose Based Jitsi Installation - Root101 | Fundamentals of Linux Administration

Latest posts

How to Customize docker-compose Based Jitsi Installation

So, you installed Jitsi, and it works pretty fine. But you want to rebrand the system for your own company. Here is a quick and dirty guide for customization on docker-compose.

You need to create your own docker images instead of pulling them from docker hub. To build images instead of pulling update the docker-compose file as follows:

services:
    # Frontend
    web:
-        image: jitsi/web
+        build: ./web

    ...
    ...
    ...

    # XMPP server
    prosody:
-        image: jitsi/prosody
+        build: ./prosody

    ...
    ...
    ...

    # Focus component
    jicofo:
-        image: jitsi/jicofo
+        build: ./jicofo

    ...
    ...
    ...

    # Video bridge
    jvb:
-        image: jitsi/jvb
+        build: ./jvb
    ...
    ...
    ...

Now, this file tells the docker engine to build images from related Dockerfiles. By doing this, you will also make sure to use the latest codebase, official docker images do not get updated daily. Now you can edit your Dockerfiles to include any changes you would like on the system. These dockerfiles based on an online image, namely jitsi/base. This won't prevent any customizations, but if you like to build your own base image, you can create a custom base image with :

docker build -t myjitsibase .

Then you would have to change the first lines of the following files.

  • ./web/Dockerfile
  • ./prosody/Dockerfile
  • ./jicofo/Dockerfile
  • ./jvb/Dockerfile
-ARG JITSI_REPO=jitsi
-FROM ${JITSI_REPO}/base
+FROM myjitsibase

This step is optional. But it includes daily commits in your installation. To create container images before running:

docker-compose build

Now we have fresh images, we need to configure the .env file before running our containers. You need the copy the example and update the parameters in the newly copied file.

cp env.example .env
./gen-passwords.sh

Instead of generating random passwords, you can also enter them by hand to .env file.

# XMPP component password for Jicofo.
JICOFO_COMPONENT_SECRET=s3cr37

# XMPP user for Jicofo client connections. NOTE: this option doesn't currently work due to a bug.
JICOFO_AUTH_USER=focus

# XMPP password for Jicofo client connections.
JICOFO_AUTH_PASSWORD=passw0rd

# XMPP user for Jigasi MUC client connections.
JIGASI_XMPP_USER=jigasi

# XMPP password for Jigasi MUC client connections.
JIGASI_XMPP_PASSWORD=passw0rd

# MUC name for the Jigasi pool.
JIGASI_BREWERY_MUC=jigasibrewery

To start the containers:

docker-compose up
Starting docker-jitsi-meet_web_1     ... done
Starting docker-jitsi-meet_prosody_1 ... done
Starting docker-jitsi-meet_jicofo_1  ... done
Starting docker-jitsi-meet_jvb_1     ... done
..
..
..
Stopping docker-jitsi-meet_jvb_1       ... done
Stopping docker-jitsi-meet_jicofo_1    ... done
Stopping docker-jitsi-meet_prosody_1   ... done
Stopping docker-jitsi-meet_web_1       ... done

Browse http://127.0.0.1:8000/ after running the following command to make sure is system in running fine.

image-20200418235544176

Change the welcome message and any of the texts in the system

I see a lot of people on the internet playing with CSS files to get this done. It is much better to edit the language file instead of CSS files.

Since the default language file is created by the package manager, we need to pull it out from the container.

mkdir ./web/customfiles
docker cp docker-jitsi-meet_web_1:/usr/share/jitsi-meet/lang/main-enUS.json ./web/customfiles/
docker cp docker-jitsi-meet_web_1:/usr/share/jitsi-meet/title.html ./web/customfiles/

Local language files are also in the same folder. Run the following command to list them all

docker exec docker-jitsi-meet_web_1 ls /usr/share/jitsi-meet/lang/

You can edit the welcome screen by changing the following line. Almost every word in the jitsi web interface can be changed here.

-         "appDescription": "Go ahead, video chat with the whole team. In fact, invite everyone you know. {{app}} is a fully encrypted, 100% open source video conferencing solution that you can use all day, every day, for free — with no account needed.",
+        "appDescription": "Choose and room and start your conference",
-        "title": "fully featured, and completely free video conferencing"
+        "title": "Welcome to our system"

Some parts of text are not read from translation file, for example when you send a link over whatsapp, you would see "Join a WebRTC video conference powered by the Jitsi Videobridge" under the link. These are called from title.html which resides in web container.(/usr/share/jitsi-meet/title.html)

<title>Jitsi Meet</title>
<meta property="og:title" content="Jitsi Meet"/>
<meta property="og:image" content="images/jitsilogo.png?v=1"/>
<meta property="og:description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
<meta description="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
<meta itemprop="name" content="Jitsi Meet"/>
<meta itemprop="description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
<meta itemprop="image" content="images/jitsilogo.png?v=1"/>
<link rel="icon" type="image/png" href="images/favicon.ico?v=1"/>

Now to make sure our next containers are built with our custom language file, edit the ./web/Dockerfile as following

RUN \
	chmod a+x /usr/local/bin/certbot-auto && \
	certbot-auto --noninteractive --install-only

EXPOSE 80 443
+COPY ./customfiles/main-enUS.json /usr/share/jitsi-meet/lang/main-enUS.json
+COPY ./customfiles/title.html /usr/share/jitsi-meet/title.html

VOLUME ["/config", "/etc/letsencrypt", "/usr/share/jitsi-meet/transcripts"]

image-20200419003429490

Interface Configuration

Since docker-compose file uses a local volume for these files, these configurations could easily be changed from the local file system.

Interface file is located at /root/.jitsi-meet-cfg/web/interface_config.js

This is not a long file, and its well documented, I advise to read the whole file. But if you are in a hurry, here are some interesting parameters.

  • DEFAULT_REMOTE_DISPLAY_NAME:
  • DEFAULT_LOCAL_DISPLAY_NAME:
  • BRAND_WATERMARK_LINK:
  • SHOW_POWERED_BY:
  • SHOW_JITSI_WATERMARK:
  • INVITATION_POWERED_BY:
  • JITSI_WATERMARK_LINK:
  • APP_NAME:
  • NATIVE_APP_NAME:
  • PROVIDER_NAME:
  • LANG_DETECTION:
  • TOOLBAR_BUTTONS:
  • SUPPORT_URL:

Random Room Names

There is a parameter to disable this behavior.

In the file /root/.jitsi-meet-cfg/web/interface_config.js

GENERATE_ROOMNAMES_ON_WELCOME_PAGE: true,

I personally like this feature too much to disable it. But customize random names, jitsi-web package needs to rebuild with custom source files.

Change logos and artwork

To pull images out, just run

docker cp docker-jitsi-meet_web_1:/usr/share/jitsi-meet/images  web/customfiles/

Now you can use GIMP or any image editor of your choice to modify the images. Don't forget to save them in the same format.

Edit the dockerfile accordingly.

RUN \
	chmod a+x /usr/local/bin/certbot-auto && \
	certbot-auto --noninteractive --install-only

EXPOSE 80 443
COPY ./customfiles/main-enUS.json /usr/share/jitsi-meet/lang/main-enUS.json
+COPY ./customfiles/images /usr/share/jitsi-meet/images

VOLUME ["/config", "/etc/letsencrypt", "/usr/share/jitsi-meet/transcripts"]

Enable LDAP Authentication

Jitsi can use LDAP directory for authentication. You can configure this with using environment variables.

  • ENABLE_AUTH
  • LDAP_URL
  • LDAP_BASE
  • LDAP_BINDDN
  • LDAP_BINDPW
  • LDAP_FILTER
  • LDAP_AUTH_METHOD
  • LDAP_VERSION
  • LDAP_USE_TLS

These options configure saslauthd for us. But not all features of saslauthd is covered with environment variables. Using a custom saslauthd.conf solves this problem. Check our LDAP configuration guide for more information.

Enable Statistics

To enable web statistics interface, edit the jvb Dockerfile.

        build: ./jvb
        restart: ${RESTART_POLICY}
        ports:
            - '${JVB_PORT}:${JVB_PORT}/udp'
            - '${JVB_TCP_PORT}:${JVB_TCP_PORT}'
+            - 8080:8080

Uncomment the following line in .env file

JVB_ENABLE_APIS=rest,colibri

/root/.jitsi-meet-cfg/jvb/sip-communicator.properties

org.jitsi.videobridge.STATISTICS_TRANSPORT=muc,colibri

Now you can curl the following link to get current statistics.

curl http://127.0.0.1:8080/colibri/stats
{"inactive_endpoints":0,"inactive_conferences":0,"total_ice_succeeded_relayed":0,"total_loss_degraded_participant_seconds":0,"bit_rate_download":0,"muc_clients_connected":1,"total_participants":0,"total_packets_received":0,"rtt_aggregate":0.0,"packet_rate_upload":0,"p2p_conferences":0,"total_loss_limited_participant_seconds":0,"octo_send_bitrate":0,"total_dominant_speaker_changes":0,"receive_only_endpoints":0,"total_colibri_web_socket_messages_received":0,"octo_receive_bitrate":0,"loss_rate_upload":0.0,"version":"2.1.183-gdbddd169","total_ice_succeeded":0,"total_colibri_web_socket_messages_sent":0,"total_bytes_sent_octo":0,"total_data_channel_messages_received":0,"loss_rate_download":0.0,"total_conference_seconds":0,"bit_rate_upload":0,"total_conferences_completed":0,"octo_conferences":0,"num_eps_no_msg_transport_after_delay":0,"endpoints_sending_video":0,"packet_rate_download":0,"muc_clients_configured":1,"conference_sizes":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"total_packets_sent_octo":0,"conferences_by_video_senders":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"videostreams":0,"jitter_aggregate":0.0,"total_ice_succeeded_tcp":0,"octo_endpoints":0,"current_timestamp":"2020-04-19 13:21:19.616","total_packets_dropped_octo":0,"conferences":0,"participants":0,"largest_conference":0,"total_packets_sent":0,"total_data_channel_messages_sent":0,"total_bytes_received_octo":0,"octo_send_packet_rate":0,"conferences_by_audio_senders":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"total_conferences_created":0,"total_ice_failed":0,"threads":30,"videochannels":0,"total_packets_received_octo":0,"graceful_shutdown":false,"octo_receive_packet_rate":0,"total_bytes_received":0,"rtp_loss":0.0,"total_loss_controlled_participant_seconds":0,"total_partially_failed_conferences":0,"endpoints_sending_audio":0,"total_bytes_sent":0,"mucs_configured":1,"total_failed_conferences":0,"mucs_joined":1}

Root101

Open Source and Linux, Notes, Guides and Ideas