This document presents the configuration steps to install Jitsi meetings over the Openfire XMPP server. But it doesn't cover the Openfire installation.
- ClearOS 7
- Apache 2.4
- Java 1.8
Despite being ClearOS 7, it is very close to CentOS and also helpful for distros other than Debian/Ubuntu
- Setup facts
export MEET_HTDOCS=/var/www/virtual/meet.example.com/html
export MEET_CONFIG=/var/www/virtual/meet.example.com/conf
- Get the source
curl -O https://download.jitsi.org/jitsi-meet/src/jitsi-meet-1.0.4089.tar.bz2
- Decompress on ${MEET_HTDOCS}
tar -C ${MEET_HTDOCS} --strip-components 1 -jxvf jitsi-meet-1.0.4089.tar.bz2
- Create proper config folder
mkdir ${MEET_CONFIG}
- Move config files to that folder
mv ${MEET_HTDOCS}/config.js ${MEET_CONFIG}/config.js
mv ${MEET_HTDOCS}/interface_config.js ${MEET_CONFIG}/interface_config.js
- Link back config files
ln -sr ${MEET_CONFIG}/config.js ${MEET_HTDOCS}/config.js
ln -sr ${MEET_CONFIG}/interface_config.js ${MEET_HTDOCS}/interface_config.js
- Create htaccess
cat > ${MEET_CONFIG}/htaccess <<EOF
RewriteEngine On
RewriteBase /
RewriteRule ^index.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
Options +Includes
AddType text/html .html
AddHandler server-parsed .html
EOF
ln -sr ${MEET_CONFIG}/htaccess ${MEET_HTDOCS}/.htaccess
- Edit ${MEET_CONFIG}/config.js and provide values for
- config.hosts.domain
- config.hosts.muc
- config.hosts.bosh (OR config.hosts.websocket)
var config = {
hosts: {
domain: 'example.com',
muc: 'conference.example.com'
},
websocket: 'wss://server.example.com:7443/ws/'
// ...
}
- Save links state to restore after eventual upgrade
cd ${MEET_HTDOCS}
find -type l | xargs tar -cvf ../link-rep.tar
- Restore symlinks after eventual upgrade
cd ${MEET_HTDOCS}
tar -xUf ../link-rep.tar
Why Jicofo? From the docs you read Conference focus is mandatory component of Jitsi Meet conferencing system next to the videobridge.
There is no ClearOS packages for Jicofo. It is needed to build the package, so it is also needed to have JDK 1.8 and maven >3.
In this setup, Jicofo runs in the same machine where Openfire runs, so I set XMPP_SERVER=127.0.0.1 and org.jitsi.jicofo.ALWAYS_TRUST_MODE_ENABLED=true.
- Set facts
export XMPP_SERVER=127.0.0.1
export XMPP_DOMAIN=example.com
export XMPP_COMPONENT_SECRET=xuoUKyuwBeLn76yv
export XMPP_MUC_DOMAIN=conference.example.com
export JICOFO_AUTH_USER=focus
export JICOFO_AUTH_PASSWORD=vR6N69hE9fyTzNU9
export JVB_BREWERY_MUC=jvbbrewery
- Get the sources
mkdir /opt/jicofo
curl -Lo jicofo-master.tar.gz https://github.com/jitsi/jicofo/archive/master.tar.gz
tar -C /opt/jicofo --strip-components 1 -zxvf jicofo-master.tar.gz
- Build using maven
mkdir /opt/jicofo
mvn verify
-
Set the XMPP_COMPONENT_SECRET on Openfire
-
Go to Openfire admin panel
-
Navigate to Server > Server Setting > External Components
-
Focus on field Default Shared Secret, in the box Allowed to Connect
-
Paste there the value of XMPP_COMPONENT_SECRET;
-
Still on Openfire panel, in the same section above, copy value of port, in the Plain-text (with STARTTLS) connections and create a new fact, like below
export XMPP_COMPONENT_PORT=5275
- Create a config file
cat > /etc/sysconfig/jicofo <<EOF
XMPP_SERVER=${XMPP_SERVER}
XMPP_DOMAIN=${XMPP_DOMAIN}
XMPP_COMPONENT_PORT=${XMPP_COMPONENT_PORT:-5275}
XMPP_COMPONENT_SECRET=${XMPP_COMPONENT_SECRET}
JICOFO_AUTH_USER=${JICOFO_AUTH_USER}
JICOFO_AUTH_PASSWORD=${JICOFO_AUTH_PASSWORD}
EOF
chown root:openfire /etc/sysconfig/jicofo
chmod 640 /etc/sysconfig/jicofo
- Properties
mkdir -p /etc/jitsi-meet/jicofo
cat > /etc/jitsi-meet/jicofo/sip-communicator.properties <<EOF
org.jitsi.jicofo.auth.URL=XMPP:${XMPP_DOMAIN}
org.jitsi.jicofo.ALWAYS_TRUST_MODE_ENABLED=true
org.jitsi.jicofo.BRIDGE_MUC=${JVB_BREWERY_MUC}@${XMPP_MUC_DOMAIN}
org.jitsi.jicofo.health.ENABLE_HEALTH_CHECKS=true
EOF
chown -R openfire:root /etc/jitsi-meet/jicofo
chmod 700 /etc/jitsi-meet /etc/jitsi-meet/jicofo
- Create systemd using to manage this servidce (note the single quote around EOF)
cat > /usr/lib/systemd/system/jicofo.service <<'EOF'
[Unit]
Description=Openfire XMPP server
After=syslog.target network.target openfire.service
[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/jicofo
ExecStart=/usr/bin/java \
-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi-meet/ \
-Dnet.java.sip.communicator.SC_HOME_DIR_NAME=jicofo \
-cp /opt/jicofo/target/jicofo-1.1-SNAPSHOT-jar-with-dependencies.jar \
org.jitsi.jicofo.Main \
--host=${XMPP_SERVER} \
--domain=${XMPP_DOMAIN} \
--secret=${XMPP_COMPONENT_SECRET} \
--user_domain=${XMPP_DOMAIN} \
--user_name=${JICOFO_AUTH_USER} \
--user_password=${JICOFO_AUTH_PASSWORD} \
--port=${XMPP_COMPONENT_PORT}
SyslogIdentifier=jicofo
User=openfire
Group=openfire
[Install]
WantedBy=multi-user.target
EOF
- Enable and start Jicofo
systemctl enable jicofo
systemctl start jicofo
- Set facts
export XMPP_SERVER=127.0.0.1
export XMPP_DOMAIN=example.com
export JVB_AUTH_USER=jvb
export JVB_AUTH_PASSWORD=dDR6TqY6oGi5ezhT
export JVB_BREWERY_MUC=jvbbrewery
export XMPP_MUC_DOMAIN=conference.example.com
- Getting the binary
curl -LO https://download.jitsi.org/jitsi-videobridge/linux/jitsi-videobridge-linux-x86-1132.zip
- Unzip it to /opt
unzip -d /opt jitsi-videobridge-linux-x86-1132.zip
- Rename the folder
mv /opt/jitsi-videobridge-linux-x86-1132 /opt/jitsi-videobridge
- Properties
cat > /etc/jitsi-meet/jvb/sip-communicator.properties <<EOF
org.jitsi.videobridge.SINGLE_PORT_HARVESTER_PORT=10000
org.jitsi.videobridge.DISABLE_TCP_HARVESTER=true
org.jitsi.videobridge.TCP_HARVESTER_PORT=4443
org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=meet-jit-si-turnrelay.jitsi.net:443
org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=${XMPP_SERVER}
org.jitsi.videobridge.xmpp.user.shard.DOMAIN=${XMPP_DOMAIN}
org.jitsi.videobridge.xmpp.user.shard.USERNAME=${JVB_AUTH_USER}
org.jitsi.videobridge.xmpp.user.shard.PASSWORD=${JVB_AUTH_PASSWORD}
org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=${JVB_BREWERY_MUC}@${XMPP_MUC_DOMAIN}
org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=${HOSTNAME}
org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true
org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc
org.jitsi.videobridge.STATISTICS_INTERVAL=5000
EOF
chown -R openfire:root /etc/jitsi-meet
chmod 700 /etc/jitsi-meet /etc/jitsi-meet/jvb
- Systemd service
cat > /usr/lib/systemd/system/jvb.service <<'EOF'
[Unit]
Description=Openfire XMPP server
After=syslog.target network.target openfire.service
[Service]
Type=simple
ExecStart=/usr/bin/java -Xmx3072m \
-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi-meet/ \
-Dnet.java.sip.communicator.SC_HOME_DIR_NAME=jvb \
-cp /opt/jitsi-videobridge/jitsi-videobridge.jar:/opt/jitsi-videobridge/lib/* \
org.jitsi.videobridge.Main --apis=none
SyslogIdentifier=jvb
User=openfire
Group=openfire
[Install]
WantedBy=multi-user.target
EOF
- Enable and start Jicofo
systemctl enable jvb
systemctl start jvb
Notes:
org.jitsi.jicofo.BRIDGE_MUC
in/etc/jitsi-meet/jicofo
needs to matchorg.jitsi.videobridge.xmpp.user.shard.MUC_JIDS
in/etc/jitsi-meet/jvb/sip-communicator.properties
/etc/jitsi-meet
, but just for openfire user