knb:meet-server

Freifunk München Jitsi Server Setup - meet.ffmuc.net

The setup consists of multiple Jitsi videobridges which can be added and removed on demand as well as one control server which does the loadbalancing decisions.

Each server has at least 8vCPUs, 16GB RAM and 10GB disc space. But the most important thing is bandwidth so a 1Gbit/s link is necessary for smooth operation.

The more CPUs you have the better, also you need good network hardware as you can expect many pps.

We installed the first instance as described on https://jitsi.org/downloads and stopped the videobridge there, because the first server should only act as a control server. If you only host a single instance skip the step of disabling the videobridge. Just set the settings, restart and be done.

Disable the videobridge:

# systemctl stop jitsi-videobridge.service
# systemctl mask jitsi-videobridge.service

Disable unnecessary and broken features on the control server: /etc/jitsi/meet/meet.ffmuc.net-config.js

defaultLanguage: 'de',
disableThirdPartyRequests: true,
p2p: { enabled: false },
enableLipSync: false

Most important thing is to get hostnames and DNS settings correct for each instance, otherwise your setup will fail.

Jitsi instances balance based on metrics published by the videobridges to jicofo. To allow the videobridges to publish those metrics we need to change some settings in the prosody settings.

In the Admin section you need to add all the bridges. /etc/prosody/prosody.cfg.lua

admins = {
        "jvb1.meet.ffmuc.net",
        "jvb2.meet.ffmuc.net",
        "jvb3.meet.ffmuc.net"
}

As we want to scale beyond 1024 connections we also switch to epoll in prosody.cfg.lua.

-- for better scaling
-- https://prosody.im/doc/network_backend
network_backend = "epoll"

And as we want external videobridges we need to listen on the external interface and not just localhost:

component_interface = "0.0.0.0";

And you also need to assign a component to each videobridge in your site config. /etc/prosody/conf.d/meet.ffmuc.net.cfg.lua

Component "jvb1.meet.ffmuc.net"
    component_secret = "pass"
Component "jvb2.meet.ffmuc.net"
    component_secret = "pass"
Component "jvb3.meet.ffmuc.net"
    component_secret = "pass"

On those servers only the jitsi-videobridge needs to be installed. There is no need for any other jitsi component.

Again watch your DNS and hostname setup!

First you need to change /etc/jitsi/videobridge/config to fit your install.

Settings may vary on other systems than Debian Buster

The „subdomain“ setting has to match first part of your hostname in this example the hostname is jvb1.meet.ffmuc.net.

We also enable statistics for later polling via Telegraf (–apis).

# Jitsi Videobridge settings

# sets the XMPP domain (default: none)
JVB_HOSTNAME=meet.ffmuc.net

# sets the hostname of the XMPP server (default: domain if set, localhost otherwise)
JVB_HOST=meet.ffmuc.net

# sets the port of the XMPP server (default: 5275)
JVB_PORT=5347

# sets the shared secret used to authenticate to the XMPP server
JVB_SECRET=pass

# extra options to pass to the JVB daemon
JVB_OPTS="--subdomain=jvb1 --apis=rest,xmpp"


# adds java system props that are passed to jvb (default are for home and logging config file)
JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=videobridge -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi -Djava.util.logging.config.file=/etc/jitsi/videobridge/logging.properties --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED"

Then we need to adjust the sip-communicator settings:

This is also important because we enable the stats on the videobridge here. If not activated there will be no loadbalancing decisions.

/etc/jitsi/videobridge/sip-communicator.properties

[email protected]fmuc.net/.*
org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_INTERVAL=1000
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc,colibri,pubsub
org.jitsi.videobridge.PUBSUB_SERVICE=meet.ffmuc.net
org.jitsi.videobridge.PUBSUB_NODE=sharedStatsNode

We use telegraf to poll the statistics of the videobridges. We just use the exec section of Telegraf, to get the data.

Example: Our grafana dashboard

/etc/telegraf/telegraf.conf

[[inputs.exec]]
   commands = [
     "curl localhost:8080/colibri/stats",
   ]
   name_suffix = "_meet"
   data_format = "json"

Use Chrome or it's derivates as client. The Mobile and Desktop Apps of jitsi-meet work as well.

Avoid using Firefox! It causes problems for the Firefox-user but as well the other parties which do not use Firefox.

  • knb/meet-server.txt
  • Zuletzt geändert: 2020/05/12 08:53
  • von awickert