How to enable Jitsi Meet WebSocket (XMPP-WebSocket) and smacks for Prosody

After updating the prosody server you need to change in prosody config /etc/prosody/conf.avail/ like below

cross_domain_websocket = true;
consider_websocket_secure = true;

  VirtualHost ""
         modules_enabled = {

         smacks_max_unacked_stanzas = 5;
         smacks_hibernation_time = 60; 
         smacks_max_hibernated_sessions = 1;
         smacks_max_old_sessions = 1;

Update your Nginx config file /etc/nginx/sites-available/ like below

    listen ssl http2;

# ...

    location = /xmpp-websocket
        proxy_pass http://localhost:5280/xmpp-websocket;

        add_header 'x-jitsi-shard' 'shard';
        add_header 'x-jitsi-region' 'us-east-2a';
        add_header 'Access-Control-Expose-Headers' 'X-Jitsi-Shard, X-Jitsi-Region';

        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $http_host;

        proxy_http_version 1.1;
        proxy_buffer_size 128k;
        proxy_buffers 4 256k;
        proxy_busy_buffers_size  256k;
        proxy_set_header Connection "upgrade";
        tcp_nodelay on;
# ...

Check shard and region from /etc/jitsi/meet/ deploymentInfo:{} section

Update /etc/jitsi/meet/ file uncomment WebSocket like below

    websocket: 'wss://',

Restart services like below

service nginx restart && service prosody restart && service jicofo restart

Leave a Reply