Multiple videobridges howto?

Hi,

is there a howto for a setup with multiple videobridges and keeping videobridges separate from meet? I found a good video on youtube, but this is outdated: https://www.youtube.com/watch?v=Jj8a6ZRgehI

Ciao!
Marcus

Hi :slight_smile:
Take a look at this: https://www.youtube.com/watch?v=LyGV4uW8km8

Thanks. Isn’t that outdated too?

follow the jitsi meet quick installation setup, use the command apt-get -y install jitsi-videobridge2 instead apt-get -y install jitsi-meet. they use muc mechanism to join bridge to prosody.

Really??? It does not work for me.

I managed to add more videobridges, but I’m using the XMPP connection, not the newer MUC connection.

I’ll post my documentation on that if you’re interested, but I’d have to translate it to English first. My notes are currently in German.

@thoemie ahhh, thanks. German is fine, I’m native.

Isn’t there a howto for the newer MUC configuration?

On videobridge(s):

  1. wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add -

  2. sh -c “echo ‘deb https://download.jitsi.org stable/’ > /etc/apt/sources.list.d/jitsi-stable.list”

  3. apt-get update

  4. apt-get install jitsi-videobridge2

  5. during the installation it asks for an hostname, please use your jitsi-meet.server.domain there (it will fill the configs almost complete)

  6. edit /etc/jitsi/videobridge/sip-communicator.properties with the following values (the other values have to stay as they are):

  7. org.jitsi.videobridge.xmpp.user.shard.HOSTNAME=jitsi-meet.server.domain

  8. org.jitsi.videobridge.xmpp.user.shard.USERNAME=jvb

  9. org.jitsi.videobridge.xmpp.user.shard.PASSWORD=<Password in the file jvb.dat located in /var/lib/prosody… or create a user with prosodyctl adduser jvb@auth.jitsi-meet.server.domain>

  10. org.jitsi.videobridge.xmpp.user.shard.DISABLE_CERTIFICATE_VERIFICATION=true

  11. ​service jitsi-videobridge2 restart

  12. check /var/log/jitsi/jvb.log
    It has to say something like that:

MucClient$1.connected#266: Connected.
MucClient.lambda$getConnectAndLoginCallable$7#648: Logging in.
MucClient$MucWrapper.join#751: Joined MUC: jvbbrewery@internal.auth.meet.hs-mittweida.de

Thats how it works for me.

I’ve got my information from this post: How to add the secondary jvb to main jitsi-server

Don’t forget to add the component_interface in Prosody (i like the idea of an extra config-file so i did the same as in the post).

1 Like

I’d be interested if others could confirm that what I did (the link @JensRabe provided: How to add the secondary jvb to main jitsi-server) works for them too.

I didn’t get a confirmation from the Jitsi crew yet, but if it works for others, I’m going to move it to the jitsi-meet wiki to make it easier for others to find.

Instead of checking the jvb.dat file, you should be able to just use the same password that is used on the first / main bridge instance:

sudo grep PASSWORD /etc/jitsi/videobridge/sip-communicator.properties

PS: Lots of German universities scrimmaging around here lately… :wink:

1 Like

@localguru

@all Sorry for this messy post and the german comments. I’ll try to clean it up and translate it.

My domain is jitsi-test.example.org.

Here is my documentation. It describes how to add another videobridge on a separate VM (named “vbt” in my docs to an already existing and running jitsi-meet server (named “jid” in my docs) which has an internal videobridge. This internal videobridge on jid has the default name “jitsi-videobridge.jitsi-test.example.org”.
This main server jid was installed by following the quick install guide, nothing else was changed.

When adding an external videobridge for the first time, some settings have to changed fundamentally on the main jitsi-meet. Prosody, jicofo and the internal videobridge on jid must be changed to listen on an IP address instead of listening only on localhost. This IP must be reachable for the additional videobridge server (vbt).

I have created a private network between the servers, so I’m using private IPs, but they could also be public.

These settings must be changed only once on jid, when adding an additional videobridge for the first time (this is why it says “nur beim ersten zusätzlichen vb” in my documentation).

After that, to add further additional videobridges (the 3rd, 4th and so on) only the following must happen:

  1. you must decide on a subdomain name for the new videobridge. It will only be used internally between the servers, but it must be resolvable by DNS from jid (the main jutsi server). Also, from every videobridge server, the main server must be resolvable via dns (I just wrote the domainnames and IPs to /etc/hosts)

  2. the settings on the respective new videobridge must be changed

  3. the subdomain must be listed as admin in prosody-jitsi-test.example.org.conf.lua

  4. a component and component secret must be created also in the prosody config

I found a strange error, maybe what I did is wrong, but thats how I got it to work: at first, there was no Component in the prosody config for the internal videobridge on jid. I simply added the component and the component secret.

All of this is described in the following documentation with all steps, this was just for context.

Weitere Videobridge zu jitsi meet hinzufügen

Auf Frontendserver (jid) läuft videobridge #1. Wir fügen weiteren Server (vbt) hinzu, auf dem nur videobridge #2 läuft.

Auf erstem Server/ Frontend / jitsi meet / jid

prepare existing frontend with 1 vb for additional vbs

add the JIDs of the videobridges as admins BEI jedem zusätzlichen VB

in /etc/prosody/conf.d/jitsi-test.example.org.cfg.lua den Part mit admins = {} hinzufügen (bei erster zusätzlicher vb, oder neue subdomain einfügen (alle nachfolgenden zusätzlichen videobridges)

[…]VirtualHost “jitsi-test.example.org
– enabled = false – Remove this line to enable this host
authentication = “anonymous”
admins = {
jitsi-videobridge.jitsi-test.example.org”,
jitsi-test-vbt.jitsi-test.example.org”,
}

– Properties below are modified by jitsi-meet-tokens pack

Server jid statt auf Localhost auf public interface hören lassen (in diesem fall, wegen privatem Netz bei Hoster auf 2., private IP-ADresse, die über /etc/hosts gepflegt wird. Wer braucht schon DNS

Datei “/etc/prosody/prosody.cfg.lua” ändern (NUR BEIM ERSTEN ZUSÄTZLICHEN VB)

vim “/etc/prosody/prosody.cfg.lua”

unterhalb von "admins = {} hinzufügen:

component_ports = { 5347 }
component_interface = { “10.255.255.7” } #private IP der jid frontend servers

eigenes jicofo auf jid auf öffentliches Interface statt localhost konfigurieren (NUR BEIM ERSTEN Zusätzlichn VB)

vim “/etc/jitsi/jicofo/config”

Zeile JICOFO_HOST auf DNS Namen ändern:

JICOFO_HOST=jitsi-test.example.org

eigene Videobride auf öffentliches Interface statt localhost konfigurieren (NUR BEIM ERSTEN Zusätzlichen VB)

vi “/etc/jitsi/videobridge/config”

Zeile JVB_Host auf DNS-Namen ändern

JVB_HOST=jitsi-test.example.org

#SIP Communicator Config anpassen (Nur beim ersten zusätzlichen VB)
##videobridge
vi “/etc/jitsi/videobridge/sip-communicator.properties”

hinzufügen

org.jitsi.videobridge.ENABLE_STATISTICS=true # achten, dass nur einmal da ist
org.jitsi.videobridge.STATISTICS_TRANSPORT=pubsub
org.jitsi.videobridge.PUBSUB_SERVICE=jitsi-test.example.org
org.jitsi.videobridge.PUBSUB_NODE=sharedStatsNode

auskommentieren: #org.jitsi.videobridge.STATISTICS_TRANSPORT=muc #diese Zeile auskommentieren

jicofo (Nur beim ersten zusätzlichen VB)

vi /etc/jitsi/jicofo/sip-communicator.properties

hinzufügen

org.jitsi.focus.pubsub.ADDRESS=jitsi-test.example.org
org.jitsi.jicofo.STATS_PUBSUB_NODE=sharedStatsNode #(laut [Solved]How to handle the "No pub-sub node mapped" warning)

videobridge config anpassen

vim “/etc/jitsi/videobridge/config”
JVB_OPTS="–apis=rest,xmpp,"

auf zweitem Server -neue zusätzliche videobridge (vbt) - videobridge test

wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
sh -c “echo ‘deb https://download.jitsi.org stable/’ > /etc/apt/sources.list.d/jitsi-stable.list”

apt-get update

apt -y install jitsi-videobridge

Im Installationsbildschirm den DNS-Namen des ersten Frontendservers angeben (jid)

jitsi-test.example.org

#SIP Communicator Config anpassen

##videobridge sip config

vim “/etc/jitsi/videobridge/sip-communicator.properties”
###hinzufügen
org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_TRANSPORT=pubsub
org.jitsi.videobridge.PUBSUB_SERVICE=jitsi-test.example.org
org.jitsi.videobridge.PUBSUB_NODE=sharedStatsNode

videobridge config

vim /etc/jitsi/videobridge/config
###Zeile ändern: JVB_HOST
JVB_HOST=jitsi-test.example.org #Domain vom Frontendserver

###Zeile ändern JVB_OPTS, Subdomain für weitere Videobridge ausdenken
JVB_OPTS="–apis=rest,xmpp --subdomain=jitsi-test-vbt" # muss konfiguration der admin-subdomain auf Frontserver entsprechen (s.oben)

Auf Frontendeserver (JID) / Main server

vi /etc/prosody/conf.d/jitsi-test.example.org.cfg.lua

Im ersten VirtualHost für hauptdomäne ganz unten (vor dem nächsten virtualhost) hinzufügen:

Component “jitsi-test-vbt.jitsi-test.example.org
component_secret = “1234asd” # component secret ist vom vbt (zusätzlicher videobridge-Server aus der Datei “/etc/jitsi/videobridge/config”)

Aus irgendeinem Grund fehlte hier die “Component” für die eigene Videobridgediese

Diese scheint aber nötig zu sein. Standardmäßig muss sie “jitsi-videobridge.jitsi-test.example.org” heißen.(Test: zweite Videobridge abschalten, sodass nur die eigene läuft. Wenn die “Component” hier fehlt kann zwar ein Meeting erstellt werden, aber niemand weiteres kann joinen. Fehler im jicofo-Log: failed to find bridge…
###Also eine Component für eigene Videobridge vom Frontendserver im ersten Virtualhost (Haupt) hinzufügen (wie zweite Component für zweite Videobridge). Das secret aus der Datei “/etc/jitsi/videobridge/config” vom eigenen (Frontendserver) nehmen:

Component “jitsi-videobridge.jitsi-test.example.org
component_secret = “1234qwe”

I’m not 100% sure if this is how it should be done. Please excuse the formatting and messiness, I copied this from my private github and redacted it a but, all on my phone. But this is how I got it working for me, load balancing works.

Any suggesstions, recommendations or improvents welcome.
Stay safe.

Also I forgot to mention, that resolution of host names and domains must be properly working.
Either via DNS or by writing the name and IP to /etc/hosts.

Test this with the “host” or “nslookup” command on the shell.

Frontendserver (jid) must be able to resolve

  • the main domain being used, here: jitsi-test.example.org (this is pointing to it’s own IP)

  • maybe the subdomains of the additional videobridges must be resolvable, not sure about that

additional videobridge servers (vbt) must be able to resolve

  • the main domain being used,pointing to IP of main fronend server jid

  • maybe themselves, not sure

@thoemie @JensRabe thanks for helping. I got it working with two videobridges2 last night (I used the unstable deb repo). :+1:

Things I don’t understand still:

  1. if I add a new videobridge do I have to restart or reload “something” on the main server. Main server in my case is the first jitsi server with a full installation of jitsi-meet meta-package.

  2. this seems to be the old " Legacy videobridge configuration" way to configure multiple videobridges. The new way allows to add new videobridges at runtime (see question1). I was trying to understand this doc, but couldn’t get it working this way. Are there some example configs out there?

https://github.com/jitsi/jitsi-videobridge/blob/master/doc/muc.md

  1. my current testing setup is a full jitsi-meet installation (unstable deb repo) including videobridge2 package on the first server and only videobridge2 on a second server. What I’m looking for is a way to split the videobridge2 package from the installation on the first server to another machine. But following the quick howto, installing jitsi-meet is a full installation including videobridge2 package. Removing it would remove the complete installation. Any ideas how to setup that?

Cheers!
Marcus

@localguru i made a tutorial for the new MUC way which is not yet approved but it should work:

1 Like

Yes, isn’t it nice that many Germany universities are interested in Jitsi.
You could do your way too, but i’ve deinstalled the first / main bridge and forgot to look at the sip-communicator.properties. :wink:

2 Likes

You don’t need the unstable version for videobridge2 in the stable it is included too.
I’ve understand that the muc is the new way, because there is no need for many components in prosody.

To your 1. Question: if jigasi is configured right there is no need to restart.
To your 3. Question: you just need to deinstall the jitsi-meet package and keep the already installled (jitsi-meet is just the collector of the other packages)
I’m prefering aptitude to see whats going on with debian packages.
I’ve done the same. On jitsi-meet server there is no videobridge anymore. I’ve added to videobridges on seperate hosts. It works for me.

The way you are describing using components is the “old” / deprecated method of adding videobridges.

With the current stable, you can add videobridges a lot easier: How to add the secondary jvb to main jitsi-server

@Balu I’m still confused about the old and new config.

Is the howto from @flyinghuman the new one and the perferred way for multiple bridges?

And what would you recommend for bridge server on CPU quantity, RAM and storage?

@Balu
Yes, you are right, my documentation shows the “old” way. I haven’t had the time yet to try the new MUC variant. I just wanted to document how I got it to work (with xmpp connection).

For anyone reading this: I highy recommend that you take a look at the tutorial @flyinghuman wrote. Or the link that @Balu referred to.

@localguru: Yes, the howto by flyinghuman is the new way (MUC). With MUC, iirc there is no neeed to restart prosody and jicofo when adding new bridges. Just make sure you don’t mix instructions for the old, xmpp way with instructions for the new muc connection.

It’s best to start on a new clean installation. I host my VMs at Hetzer, where the cheapest VM is 2,98 € per month or 0,5 Cent / hour (yeah that’s right - half a cent). It’s calculated per hour, so I’m just spinning up new VMs - takes only seconds - very often just for testing, and afterwards delete them. So I just paid a few Cents for the time I had them. I am in no way affiliated to Hetzner or sponsored by them. I just think their service is good. https://www.hetzner.de/cloud

That is correct. New bridges basically just join a chatroom on the prosody server where jicofo checks for possible targets for a conference.

I’m sorry, I am experimenting with those parameters myself :wink:

@thoemie
Do you use a FQDN when installing jitsi-meet or an ip address?
I’m also trying to install jitsi-meet on a vServer but I’m using an ip address when installing cause I don’t own a domain. (and I can’t make it work)

Anyone installed jitsi-meet on a public vServer using the ip address?