Jitsi meet manual installation

I am trying to install jitsi meet manually but I didn’t found jitsi-videobridge at the following url https://download.jitsi.org/jitsi-videobridge/linux

1 Like

Looks like generic packages for other distributions than ubuntu/debian aren’t going to come back.

You can have a look at https://github.com/jitsi/jitsi-videobridge. At the very end, it says how to run it directly after cloning the repository. Another option if you don’t have an available ubuntu/debian server to host it, could be compiling it on your own linux server using maven, setting some enviroment variables (or send them as parameters) as you run the executable sh file that maven gives you after compiling (i did that with a version from the beginning of June and it’s still working on a CEntOS 7 box).

However, looks like this is a very hard way to get jitsi running compared to installing and running it on a debian/ubuntu server or getting the dockerized images and run it from there. I had no option (already had the servers and all of them run CEntOS).

I cloned jitsi-videobridge from github, when I am trying to compile the project I got the following error:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (default-cli) on project jvb-parent

I use

mvn package -DskipTests -Dassembly.skipAssembly=false

It will grab all dependencies and pack them.
I had some issues with older maven versions, so I installed maven 3.6 and was able to run the process. After runing that I end up with a target directory. Inside it, you should find a runnable file (in my case was jvb.sh).

I used your command then I unzip the jvb/target/jitsi-vidoebrdige-*.zip, after that I tried to start the jvb using the following command:

./jvb.sh --host=localhost --domain=jitsi.example.com --port=5347 --secret=YOURSECRET1 &

But the command failed and I got the following error:

Exception in thread “main” java.lang.NullPointerException
at org.jitsi.videobridge.Main.main(Main.java:78)

In the domain parameter, you should replace jistsi.example.com with your server’ domain.

It also needs the parameter apis. it should look like

jvb.sh --secret=yoursecret1 --domain=meet.your_domain.com --host=localhost --port=5347 --apis=xmpp,rest

Also, yoursecret 1 corresponds to the component_secret setting you set up in prosody settings file for the jitsi videobridge component.

Hope that the missing parameter was the cause of the error. Otherwise, I think more details about the error are needed. Each jitsi component handles pretty nice errors and, mostly, display helpful messages.

I am using my own parameters but the problem is the same.

Without more detail about the error, it’s hard to figure out what’s happening (like which was the variable/object that caused the NullPointer, if it was an argument, an internal variable, etc.).

Only thing I can think of is which branch and release did you clone. Maybe, if you haven’t already tried, use one of the stable releases. I’ve got luck with the bgrozev branch and with a stable release from last days of may.

1 Like

I wanted to build and customize JVB and Jicofo with git, so I tried this method.
I changed the commit in the master branch to around the beginning of May and it started successfully.

git log --after '2020/05/01' --before '2020/05/10'

How to start

mvn package -DskipTests -Dassembly.skipAssembly = false
jvb.sh --secret=yoursecret1 --domain=meet.your_domain.com --host=localhost --port=5347 --apis=xmpp,rest

The latest master branch and the May branch seem to pass jvb.sh arguments differently.

The version of maven is 3.6.3.

Anyway, it was saved! Thank you very much.

I can’t speak English, so it’s Google Translate.

yeah, they use different arguments.

In the may version, you can use it like you stated in the post, but without spaces between the argument name and its value:

mvn package -DskipTests -Dassembly.skipAssembly=false
jvb.sh --secret=yoursecret1 --domain=meet.your_domain.com --host=localhost --port=5347 --apis=xmpp,rest

In the newer versions, those arguments are passed from enviroment variables because it’s prepared to be ran as a service (and it’s set up for debian). If you’re building it from source and you’re in a debian-related enviroment, i could recomend installing it using the package manager (apt, it think). If not, just let me know and will try to guide you on how to set them up (as long as you’re installing them on a linux or macos enviroment).

1 Like

Thank you for your reply!

I have fixed the space.

It is built on EC2 and the OS is Debian GNU / Linux 9 (Stretch).

In the newer versions, those arguments are passed from enviroment variables because it’s prepared to be ran as a service (and it’s set up for debian). If you’re building it from source and you’re in a debian-related enviroment, i could recomend installing it using the package manager (apt, it think).

Can you tell me how to do it here?

Also, the main reason for building the environment is to change to the JVB or Jicofo source code on the instance and develop it.

So I plan to commit to the forked repository.

In order to run the video bridge from terminal (not as a service but on demand) i modified the jvb.sh script in the following way:

    # Include videobridge defaults if available
if [ -f /etc/jitsi/videobridge/config ]; then
    . /etc/jitsi/videobridge/config
else

    if [[ "$1" == "--help"  || $# -lt 1 ]]; then
        echo -e "Usage:"
        echo -e "$0 [OPTIONS], where options can be:"
        echo -e "\t--apis=APIS where APIS is a comma separated list of APIs to enable. Currently the only supported API is 'rest'. The default is none."
        echo
        exit 1
    fi

fi

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"

mainClass="org.jitsi.videobridge.Main"
cp=$SCRIPT_DIR/jitsi-videobridge.jar:$SCRIPT_DIR/lib/*
logging_config="$SCRIPT_DIR/lib/logging.properties"
videobridge_rc="$SCRIPT_DIR/lib/videobridge.rc"

# if there is a logging config file in lib folder use it (running from source)
if [ -f $logging_config ]; then
    LOGGING_CONFIG_PARAM="-Djava.util.logging.config.file=$logging_config"
fi

if [ -f $videobridge_rc  ]; then
        source $videobridge_rc
fi

if [ -z "$VIDEOBRIDGE_MAX_MEMORY" ]; then VIDEOBRIDGE_MAX_MEMORY=3072m; fi
if [ -z "$VIDEOBRIDGE_GC_TYPE" ]; then VIDEOBRIDGE_GC_TYPE=ConcMarkSweepGC; fi

exec java -Xmx$VIDEOBRIDGE_MAX_MEMORY $VIDEOBRIDGE_DEBUG_OPTIONS -XX:+Use$VIDEOBRIDGE_GC_TYPE -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -Djdk.tls.ephemeralDHKeySize=2048 $LOGGING_CONFIG_PARAM $JAVA_SYS_PROPS -cp $cp $mainClass $JVB_OPTS $@

As you can see in the first lines, it looks for a /etc/jitsi/videobridege/config file, that file contains the following:

# sets the XMPP domain (default: none)

JVB_HOSTNAME=meet.your.domain

# sets the hostname of the XMPP server (default: domain if set, localhost otherwise)

JVB_HOST=localhost

# 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=Your_videobridge_secret

# extra options to pass to the JVB daemon

JVB_OPTS="--apis=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"

That file, in the JAVA_SYS_PROPS also indicates to look for the sip communicator properties in the file /etc/jitsi/videobridge/sip-communicator.properties. That file is written as follows:

org.ice4j.ice.harvest.DISABLE_AWS_HARVESTER=true
org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=meet-jit-si-turnrelay.jitsi.net:443
org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc
org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=localhost
org.jitsi.videobridge.xmpp.user.shard.DOMAIN=auth.meet.your.domain
org.jitsi.videobridge.xmpp.user.shard.USERNAME=jvb
org.jitsi.videobridge.xmpp.user.shard.PASSWORD=videobridge_password
org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=JvbBrewery@internal.auth.meet.your.domain
org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=AC81A2AE-56AC-47E7-BD44-D473442A0EE6
org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true
org.jitsi.videobridge.xmpp.user.shard.IQ_HANDLER_MODE=sync
org.jitsi.videobridge.rest.COLIBRI_WS_DISABLE=true
org.jitsi.impl.neomedia.transform.srtp.SRTPCryptoContext.checkReplay=false
org.jitsi.videobridge.TCP_HARVESTER_PORT=4443

#Jicofo settings
    org.jitsi.jicofo.auth.URL=XMPP:meet.your.domain
    org.jitsi.jicofo.auth.jetty.port=8889
    org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.meet.your.domain
    org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90

just adjust your.domain and password settings in order to meet those set up in the prosody settings.

Same settings apply for the jicofo part:

/etc/jisi/jicofo/config:
# sets the host name of the XMPP server
JICOFO_HOST=localhost

# sets the XMPP domain (default: none)
JICOFO_HOSTNAME=meet.your.domain

# sets the secret used to authenticate as an XMPP component
JICOFO_SECRET=jicofo_secret

# sets the port to use for the XMPP component connection
JICOFO_PORT=5347

# sets the XMPP domain name to use for XMPP user logins
JICOFO_AUTH_DOMAIN=auth.meet.your.domain

# sets the username to use for XMPP user logins
JICOFO_AUTH_USER=focus

# sets the password to use for XMPP user logins
JICOFO_AUTH_PASSWORD=jicofo_password

# extra options to pass to the jicofo daemon
JICOFO_OPTS=""

# adds java system props that are passed to jicofo (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=jicofo\
 -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi\
 -Djava.util.logging.config.file=/etc/jitsi/jicofo/logging.properties"\
 -Dorg.jitsi.jicofo.auth.URL=XMPP:meet.your.domain

That file points to another file located in /etc/jitsi/jicofo/sip-communicator.properties:

org.jitsi.jicofo.BRIDGE_MUC=JvbBrewery@internal.auth.your.domain
org.jitsi.videobridge.TCP_HARVESTER_PORT=4443
org.jitsi.jicofo.auth.URL=XMPP:auth.meet.your.domain
org.jitsi.jicofo.auth.jetty.port=8889
org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.meet.your.domain
org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90

And the jicofo.sh file ended up like this:
#!/bin/bash

if [ -f /etc/jitsi/jicofo/config ]; then
    . /etc/jitsi/jicofo/config
    DAEMON_OPTS=" --host=$JICOFO_HOST --domain=$JICOFO_HOSTNAME --port=$JICOFO_PORT --user_name=$JICOFO_AUTH_USER --user_domain=$JICOFO_AUTH_DOMAIN $JICOFO_OPTS --secret=$JICOFO_SECRET"
else

    if [[ "$1" == "--help"  || $# -lt 1 ]]; then
        echo -e "Usage:"
        echo -e "$0 [OPTIONS], where options can be:"
        echo -e "\t--host=HOST\t sets the hostname of the XMPP server (default: domain, if domain is set, localhost otherwise)"
        echo -e "\t--domain=DOMAIN\t sets the XMPP domain"
        echo -e "\t--port=PORT\t sets the port of the XMPP server (default: 5347)"
        echo -e "\t--subdomain=SUBDOMAIN\t sets the sub-domain used to bind focus XMPP component (default: focus)"
        echo -e "\t--secret=SECRET\t sets the shared secret used to authenticate focus component to the XMPP server"
        echo -e "\t--user_domain=DOMAIN\t specifies the name of XMPP domain used by the focus user to login."
        echo -e "\t--user_name=USERNAME\t specifies the username used by the focus XMPP user to login. (default: focus@user_domain)"
        echo -e "\t--user_password=PASSWORD\t specifies the password used by focus XMPP user to login. If not provided then focus user will use anonymous authentication method."
        echo
        echo -e "\tSECRET and PASSWORD can alternatively be set via the environment variables JICOFO_SECRET and JICOFO_AUTH_PASSWORD respectively."
        echo
        exit 1
    fi

fi

echo $DAEMON_OPTS #just to be sure

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"

mainClass="org.jitsi.jicofo.Main"
cp=$(JARS=($SCRIPT_DIR/jicofo*.jar $SCRIPT_DIR/lib/*.jar); IFS=:; echo "${JARS[*]}")

if [ -z "$JICOFO_MAX_MEMORY" ]; then JICOFO_MAX_MEMORY=3072m; fi

JAVA_SYS_PROPS="$JAVA_SYS_PROPS"
exec java -Xmx$JICOFO_MAX_MEMORY -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -Djdk.tls.ephemeralDHKeySize=2048 $LOGGING_CONFIG_PARAM $JAVA_SYS_PROPS -cp $cp $mainClass $DAEMON_OPTS $@

Both the jicofo.sh and jvb.sh files are produced by the mvn package command, but i modified them in order to be able to run them with the settings configured in the corresponding files. Also, be sure to use the directory structure you get inside the generated zip file (which contains the libs directory).

As you can see, most of the options are set as enviroment variables, those files mostly automate the process of setting them up again and again.

Hope this send you in the correct path in order to get your project up and running. I’m sure that as you’re going to modify the code, you’ll find more settings and useful stuff. I’ve also worked with some of the code (mostly with the jitsi meet react code) and it’s a beauty: Very well documented and mostly self explanatory (if it wasn’t documented, you could still easily understand it).

Sorry for not detailing each part of the code, but right now i’m very short of time.

Edit: Note that all of those settings and .sh scripts are for running the processes manually. I haven’t set them up as service for debian servers, but you can figure out how to write a couple scripts to be used as a service. In the source there is a debian directory with an init.d file that gives you a pretty good idea about how the files for debian should look (and the users that may need to be created).

1 Like

Thank you very much for explaining that to me so nicely!
I will use that as reference from now on.