# Jitsi Integration Configuration Guide This guide provides step-by-step instructions for configuring Reflector to work with a self-hosted Jitsi Meet installation for video meetings and recording. ## Prerequisites Before configuring Jitsi integration, ensure you have: - **Self-hosted Jitsi Meet installation** (version 2.0.8922 or later recommended) - **Jibri recording service** configured and running - **Prosody XMPP server** with mod_event_sync module installed - **Docker or system deployment** of Reflector with access to environment variables - **SSL certificates** for secure communication between services ## Environment Configuration Add the following environment variables to your Reflector deployment: ### Required Settings ```bash # Jitsi Meet domain (without https://) JITSI_DOMAIN=meet.example.com # JWT secret for room authentication (generate with: openssl rand -hex 32) JITSI_JWT_SECRET=your-64-character-hex-secret-here # Webhook secret for secure event handling (generate with: openssl rand -hex 16) JITSI_WEBHOOK_SECRET=your-32-character-hex-secret-here # Application identifier (should match Jitsi configuration) JITSI_APP_ID=reflector # JWT issuer and audience (should match Jitsi configuration) JITSI_JWT_ISSUER=reflector JITSI_JWT_AUDIENCE=jitsi ``` ### Example .env Configuration ```bash # Add to your server/.env file JITSI_DOMAIN=meet.mycompany.com JITSI_JWT_SECRET=$(openssl rand -hex 32) JITSI_WEBHOOK_SECRET=$(openssl rand -hex 16) JITSI_APP_ID=reflector JITSI_JWT_ISSUER=reflector JITSI_JWT_AUDIENCE=jitsi ``` ## Jitsi Meet Server Configuration ### 1. JWT Authentication Setup Edit `/etc/prosody/conf.d/[YOUR_DOMAIN].cfg.lua`: ```lua VirtualHost "meet.example.com" authentication = "token" app_id = "reflector" app_secret = "your-jwt-secret-here" -- Allow anonymous access for non-authenticated users c2s_require_encryption = false admins = { "focusUser@auth.meet.example.com" } modules_enabled = { "bosh"; "pubsub"; "ping"; "roster"; "saslauth"; "tls"; "dialback"; "disco"; "carbons"; "pep"; "private"; "blocklist"; "vcard"; "version"; "uptime"; "time"; "ping"; "register"; "admin_adhoc"; "token_verification"; "event_sync"; -- Required for webhook events } ``` ### 2. Room Access Control Edit `/etc/jitsi/meet/meet.example.com-config.js`: ```javascript var config = { hosts: { domain: 'meet.example.com', muc: 'conference.meet.example.com' }, // Enable JWT authentication enableUserRolesBasedOnToken: true, // Recording configuration fileRecordingsEnabled: true, liveStreamingEnabled: false, // Reflector-specific settings prejoinPageEnabled: true, requireDisplayName: true, }; ``` ### 3. Interface Configuration Edit `/usr/share/jitsi-meet/interface_config.js`: ```javascript var interfaceConfig = { // Customize for Reflector branding APP_NAME: 'Reflector Meeting', DEFAULT_WELCOME_PAGE_LOGO_URL: 'https://your-domain.com/logo.png', // Hide unnecessary buttons TOOLBAR_BUTTONS: [ 'microphone', 'camera', 'closedcaptions', 'desktop', 'fullscreen', 'fodeviceselection', 'hangup', 'chat', 'recording', 'livestreaming', 'etherpad', 'sharedvideo', 'settings', 'raisehand', 'videoquality', 'filmstrip', 'invite', 'feedback', 'stats', 'shortcuts', 'tileview', 'videobackgroundblur', 'download', 'help', 'mute-everyone' ] }; ``` ## Jibri Configuration ### 1. Recording Service Setup Edit `/etc/jitsi/jibri/jibri.conf`: ```hocon jibri { recording { recordings-directory = "/var/recordings" finalize-script = "/opt/jitsi/jibri/finalize.sh" } api { xmpp { environments = [{ name = "prod environment" xmpp-server-hosts = ["meet.example.com"] xmpp-domain = "meet.example.com" control-muc { domain = "internal.auth.meet.example.com" room-name = "JibriBrewery" nickname = "jibri-nickname" } control-login { domain = "auth.meet.example.com" username = "jibri" password = "jibri-password" } }] } } } ``` ### 2. Finalize Script Setup Create `/opt/jitsi/jibri/finalize.sh`: ```bash #!/bin/bash # Jibri finalize script for Reflector integration RECORDING_FILE="$1" ROOM_NAME="$2" REFLECTOR_API_URL="${REFLECTOR_API_URL:-http://localhost:1250}" WEBHOOK_SECRET="${JITSI_WEBHOOK_SECRET}" # Generate webhook signature generate_signature() { local payload="$1" echo -n "$payload" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" | cut -d' ' -f2 } # Prepare webhook payload TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%S.%3NZ) PAYLOAD=$(cat <