Skip to content

Instantly share code, notes, and snippets.

@facsiaginsa
Last active April 26, 2020 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save facsiaginsa/68650c06b258f3bf4e228c34c601b133 to your computer and use it in GitHub Desktop.
Save facsiaginsa/68650c06b258f3bf4e228c34c601b133 to your computer and use it in GitHub Desktop.

Jitsi Videobridge Websocket

Sudo Privileges

sudo su

Config on JVB Server

Jitsi videobridge config

open file /etc/jitsi/videobridge/sip-communicator.properties and add these line:

org.jitsi.videobridge.STATISTICS_TRANSPORT=colibri
org.jitsi.videobridge.rest.jetty.port=9090
org.jitsi.videobridge.rest.COLIBRI_WS_TLS=true
org.jitsi.videobridge.rest.COLIBRI_WS_DOMAIN=<your.jvb.domain>:443
org.jitsi.videobridge.rest.COLIBRI_WS_SERVER_ID=<jvb-id>

The jetty port can be different, but don't use 8080. Because it is already used by jvb statistics api.

Install NGINX

apt-get update
apt-get install nginx

Config NGINX

create file for handling webscoket

nano /etc/nginx/site-available/videobridge

copy & paste this config

server {
        listen 443 ssl;
        server_name <your jvb domain>;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
        ssl_ciphers "EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA256:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EDH+aRSA+AESGCM:EDH+aRSA+SHA256:EDH+aRSA:EECDH:!aNULL:!eNULL:!MEDIUM:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED";
        add_header Strict-Transport-Security "max-age=31536000";

        ssl_certificate /path/to/<your.jvb.domain>.crt;
        ssl_certificate_key /path/to/<your.jvb.domain>.key;

        location ~ ^/colibri-ws/<jvb-id>/(.*) {
                proxy_pass http://127.0.0.1:9090/colibri-ws/<jvb-id>/$1$is_args$args;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_set_header Host $host;
                tcp_nodelay on;
        }
}

don't forget to adjust the domain name, jvb id & SSL certificate.

Create link and reload NGINX

ln -s /etc/nginx/site-available/videobridge /etc/nginx/site-enabled/
nginx -t
service nginx reload

Restart Videobridge

systemctl restart jitsi-videobridge2

Check service

To ensure the websocket is on, check jvb log

grep 'wss:' /var/log/jitsi/jvb.log

you should see that your websocket url is live.

Check listen port on the server, make sure 443 and 9090 is listening:

netsat -ntplu

Lastly, check from browser that nothing is blocking the jvb websocket:

https://<your jvb domain>/colibri-ws/<jvb id>/

you will get error 405 from jetty, that is ok.

Config on Main Server

Client Config

open client configuration at /etc/jitsi/meet/<domain>-config.js and add/uncomment this line:

openBridgeChannel: 'websocket',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment