How do I embed self-hosted Jitsi Meet with the IFrame API?

Short answer

Load external_api.js from your Jitsi server and create JitsiMeetExternalAPI with the room, user details and a backend-issued JWT. Use commands to control the meeting and events to update your app. On stable-11248, toggleLobby requires an explicit target state, but there is no lobby state getter or event, so local state cannot prove the server changed.

Applies to: Docker stable-11248 and Debian/Ubuntu packages using Jitsi Meet 11248; browser policies apply to both.

Who this is for

For a complete small React project with pinned dependencies and explicit embed cleanup, use the React SDK example. This page remains the owner for general IFrame commands, events and authentication integration.

You want application login, host controls and meeting events inside your app. The base setup below was source-reviewed against Docker stable-11248 and Meet 11248 on 6 October 2026. Later diagnostic sections identify their own source snapshot and review date; they are not claims about every deployed release.

If an existing integration closes after about five minutes, first check its meeting endpoint and warning with five-minute cutoff diagnostics. The setup below covers your own server; generic public-endpoint examples do not override the service provider’s embedding policy.

Missing PiP controls or failed automatic opening? Follow picture-in-picture diagnostics before changing your integration.

For additional meeting views on physical displays, see second-screen requirements and API usage.

How it works

external_api.js defines JitsiMeetExternalAPI, creates the iframe and transports commands and events across origins. Do not create another iframe around it.

A JWT carries authentication and room authorization to Prosody. Your backend signs it after authorizing the user. The browser receives the token, never the signing secret. Client display settings and hidden buttons do not enforce server permissions.

Commands send requests. executeCommand() returns no confirmation. Some functions return Promises, including isAudioMuted() and getRoomsInfo(). Others, including getSupportedCommands(), return values immediately.

Before you start

  • Confirm an ordinary meeting works on https://meet.example.com. The meeting, app and any outer embedding ancestors need HTTPS for media capture.
  • Keep working DNS and firewall rules. Standard public ports are TCP 80 and 443, UDP 10000 for media. Docker’s sample host ports are 8000 and 8443. Embedding needs no extra Jitsi port.
  • Choose your actual application origin. Examples use https://app.example.com; substitute yours everywhere. CSP checks origins, not just a shared parent domain.
  • Have a backend signer and a server policy that assigns the intended moderator roles. A valid JWT or userInfo does not, by itself, implement host versus attendee permissions.

Steps

  1. Docker stable-11248: enable token authentication and framing. Edit .env. Privately replace the secret placeholder with your backend’s shared secret. This requires tokens from everyone. Preserve existing settings and CSP directives.

    Config
    ENABLE_AUTH=1
    AUTH_TYPE=jwt
    ENABLE_GUESTS=0
    JWT_ALLOW_EMPTY=0
    JWT_APP_ID=my_jitsi_app_id
    JWT_APP_SECRET=REPLACE_WITH_A_PRIVATE_RANDOM_SECRET
    JWT_ACCEPTED_ISSUERS=my_jitsi_app_id
    JWT_ACCEPTED_AUDIENCES=jitsi
    ENABLE_LOBBY=1
    CSP_HEADER="frame-ancestors 'self' https://app.example.com"

    Recreate from the matching Compose directory to apply environment changes.

    Terminal
    docker compose up -d --force-recreate
  2. Debian/Ubuntu packages, Jitsi Meet 11248: configure tokens and framing. Install the token package and supply its Application ID and Application Secret when prompted.

    Terminal
    sudo apt-get install jitsi-meet-tokens

    In the existing token VirtualHost in /etc/prosody/conf.avail/meet.example.com.cfg.lua, retain the installer-created authentication = "token", app_id, app_secret and MUC token_verification module. Add explicit restrictions:

    Lua
    allow_empty_token = false;
    asap_accepted_issuers = { "my_jitsi_app_id" };
    asap_accepted_audiences = { "jitsi" };

    In /etc/jitsi/jicofo/jicofo.conf, ensure jicofo.authentication.enabled = false, editing the existing value and preserving other settings. This follows the package token handbook. Docker generates different Jicofo authentication settings.

    In /etc/nginx/sites-available/meet.example.com.conf, merge this into the HTTPS server block’s CSP:

    Nginx
    add_header Content-Security-Policy "frame-ancestors 'self' https://app.example.com" always;

    Validate and reload Nginx, then restart Prosody and Jicofo during a maintenance window.

    Terminal
    sudo nginx -t && sudo systemctl reload nginx
    sudo systemctl restart prosody jicofo
  3. Both install types, 11248: issue a short-lived JWT on the backend. Sign with HS256 and the configured application secret. This JavaScript object is the payload, not a complete signing implementation. Use your backend’s JWT library.

    JavaScript
    const payload = {
      iss: 'my_jitsi_app_id',
      aud: 'jitsi',
      sub: 'meet.example.com',
      room: 'team-standup',
      exp: Math.floor(Date.now() / 1000) + 300,
      context: { user: { id: 'user-42', name: 'Host', email: 'admin@example.com' } }
    };

    Packages normally verify the domain against sub. Docker defaults JWT_ENABLE_DOMAIN_VERIFICATION to false. If you enable it, use your actual internal XMPP domain or tenant, often meet.jitsi, rather than assuming the public hostname. Restrict room to the authorized room.

  4. Both install types, 11248: load the API and initialize it. Put these elements in your app:

    HTML
    <script src="https://meet.example.com/external_api.js"></script>
    <div id="meet"></div>

    Run this in your app script after both elements exist. Replace the token placeholder.

    JavaScript
    const api = new JitsiMeetExternalAPI('meet.example.com', {
      roomName: 'team-standup',
      parentNode: document.querySelector('#meet'),
      width: '100%',
      height: 600,
      jwt: 'REPLACE_WITH_BACKEND_ISSUED_JWT',
      userInfo: { displayName: 'Host', email: 'admin@example.com' },
      configOverwrite: {
        startWithAudioMuted: true,
        prejoinConfig: { enabled: false },
        securityUi: { hideLobbyButton: true }
      },
      interfaceConfigOverwrite: { DISABLE_DOMINANT_SPEAKER_INDICATOR: true }
    });
    api.addListener('videoConferenceJoined', () => console.log('JOINED'));
    api.addListener('participantJoined', e => console.log('participantJoined', e.id));
    api.addListener('participantLeft', e => console.log('participantLeft', e.id));
    api.addListener('audioMuteStatusChanged', e => console.log('audio muted', e.muted));
    api.addListener('errorOccurred', e => console.error(e.type, e.name, e.message));
    api.addListener('readyToClose', () => api.dispose());

    Use videoConferenceJoined for readiness. A frame load alone cannot prove joining. Also call dispose() on component or route cleanup.

  5. Both install types, 11248: connect host controls. Run each command from its button. Do not run the whole block on startup.

    JavaScript
    api.executeCommand('toggleAudio');
    api.executeCommand('toggleVideo');
    api.executeCommand('toggleShareScreen');
    api.executeCommand('displayName', 'Host');
    api.executeCommand('sendChatMessage', 'Welcome');
    api.executeCommand('hangup');
    api.isAudioMuted().then(muted => console.log(muted));
    api.getRoomsInfo().then(info => console.log(info.rooms));

    getParticipantsInfo() is deprecated in the handbook; prefer getRoomsInfo(). Screen sharing still requires user interaction and browser consent.

  6. Both install types, 11248: control lobby and moderation. Match role events to the local ID. The source also sends remote role events, contrary to the handbook’s local-only description. Store requested lobby state without claiming confirmation.

    JavaScript
    let localId = null;
    const roles = new Map();
    let requestedLobbyState = null;
    api.addListener('videoConferenceJoined', ({ id }) => {
      localId = id;
    });
    api.addListener('participantRoleChanged', ({ id, role }) => {
      roles.set(id, role);
    });
    api.addListener('videoConferenceLeft', () => {
      localId = null;
      roles.clear();
    });
    function setLobby(enabled) {
      if (roles.get(localId) !== 'moderator') return;
      api.executeCommand('toggleLobby', enabled);
      requestedLobbyState = enabled;
    }
    api.addListener('knockingParticipant', ({ participant }) => {
      if (roles.get(localId) !== 'moderator') return;
      const approved = window.confirm(`Admit ${participant.name}?`);
      api.executeCommand('answerKnockingParticipant', participant.id, approved);
    });

    Wire separate enable and disable buttons to setLobby(true) and setLobby(false). For audio moderation, a moderator can use toggleModeration, muteEveryone and askToUnmute:

    JavaScript
    api.executeCommand('toggleModeration', true, 'audio');
    api.executeCommand('muteEveryone', 'audio');
    // After selecting a participant from getRoomsInfo():
    api.executeCommand('askToUnmute', participantId);
    api.executeCommand('kickParticipant', participantId);

    In 11248, omitting toggleLobby’s argument disables the lobby. There is no isLobbyEnabled() or lobbyModeChanged. Issue #17784 and proposed PR #17860 remain open and unmerged, not fixed as of 2026-10-06. Another moderator can change the lobby, and enabling can be ignored when visitors are present. Hiding the local switch reduces accidental changes but cannot guarantee synchronized state.

Configuration reference

Defaults are from 11248; server overrides can change them.

Name Where Default Purpose
roomName Constructor '' Room name.
parentNode; width; height Constructor document.body; '100%'; '100%' Placement and size.
jwt; userInfo Constructor Unset Token and display identity.
configOverwrite; interfaceConfigOverwrite Constructor {} Allowed client overrides.
startWithAudioMuted; prejoinConfig.enabled Config overwrite false; true Initial mute and prejoin page.
securityUi.hideLobbyButton Config overwrite false Hide local lobby switch.
DISABLE_DOMINANT_SPEAKER_INDICATOR Interface overwrite false Hide speaker indicator.
ENABLE_AUTH; AUTH_TYPE Docker .env 0; internal Authentication mode.
ENABLE_GUESTS; JWT_ALLOW_EMPTY Docker .env 0; 0 Tokenless access.
JWT_APP_ID; JWT_APP_SECRET Docker .env Unset Application and signing secret.
JWT_ACCEPTED_ISSUERS; JWT_ACCEPTED_AUDIENCES Docker .env Unset; utility uses app ID and wildcard audience Restrict accepted claims.
JWT_ENABLE_DOMAIN_VERIFICATION Docker .env false Check token domain.
ENABLE_LOBBY; CSP_HEADER Docker .env true; unset Lobby module and response CSP.
authentication; app_id; app_secret; token_verification Package Prosody configuration Set by token installer Token authentication and room validation.
allow_empty_token; asap_accepted_issuers; asap_accepted_audiences Package Prosody configuration false; app ID; wildcard audience Token and claim restrictions.
jicofo.authentication.enabled Package jicofo.conf false Keep disabled for token setup.
iss; aud; sub; room; exp; context.user JWT payload No generated values Issuer, audience, domain, room, expiry and optional identity.
script-src; frame-src App response CSP Depends on existing policy Permit API script and meeting frame.
frame-ancestors Jitsi response CSP No restriction from this directive when absent Approved embedding origins.
camera; microphone; display-capture Permissions Policy and iframe allow Browser policy; API delegates these Media capability, subject to consent.

Audio-only sharing events and noise suppression

When an embed uses audioOrVideoSharingToggled, test Share audio separately from sharing a video track. Report #18093 describes an audio-only path that reports the participant selected on the large stage, rather than necessarily the participant starting the local share. It was identified through code inspection on master, not an independently reproduced browser or production failure from this site. [D1]

At the reviewed Meet commit, the screen-share middleware reads features/large-video.participantId for this event. The external API maps the internal event to audioOrVideoSharingToggled. Do not use that event’s participant field by itself as proof of the actor for permissions, billing or security-sensitive attribution. Keep authorization in the appropriate trusted application path. This note does not change the documented event schema or claim every older release has the same code. [D2]

The same report describes noise suppression remaining off after audio sharing. The reviewed track actions explicitly disable suppression before mixing desktop audio; the reviewed stop path clears the mixer but does not restore that prior preference. After stopping a test share, check the microphone’s actual setting and sound before assuming the previous state returned. Do not force suppression on while the audio mixer is active or describe a proposed patch as released. [D1][D3]

For an integration acceptance test, use two harmless test participants, vary who is on stage, start and stop audio-only sharing, and compare the event payload with the known local actor and actual audio. Repeat the equivalent ordinary screen-share path separately. Keep private room URLs and participant identifiers out of public logs. Issue #18093 remained open on 26 October; new PR #18111 proposes corrections for the actor and suppression restoration, but was open and unmerged. No released correction or completed media/event test is established here. [D1][N4]

IFrame noise suppression command does nothing

Checked 26 October 2026: issue #18106 reports that api.executeCommand('toggleNoiseSuppression') is exposed by the external API but has no matching receiver handler. At reviewed Meet commit 189dc916, the outer command map contains toggleNoiseSuppression: 'toggle-noise-suppression', while modules/API/API.js has no handler for that message. The report does not identify a deployed release, and we did not reproduce it in a meeting. [N1][N2]

Check the command and client together

Load external_api.js from the same Jitsi server as the meeting, using the instance created earlier in this guide. Record the actual deployed client version and compare both the external command map and the receiving client source for that build. A command name returned by api.getSupportedCommands() is not an execution acknowledgement: the reviewed method simply returns keys from the outer map. [N2]

The handbook documents an explicit target-state command, and the reviewed receiver implements it: [N2][N3]

JavaScript
// Use your existing JitsiMeetExternalAPI instance.
// Request the intended state; verify the result in the meeting.
api.executeCommand('setNoiseSuppressionEnabled', { enabled: true });

// Use this separately when the user intends to turn it off.
// api.executeCommand('setNoiseSuppressionEnabled', { enabled: false });

This is a source-backed alternative to evaluate, not an independently tested audio fix. Choose the intended state instead of blindly reversing a local Boolean that may no longer match the meeting. Neither an advertised command nor executeCommand() returning without an error proves that the audio effect changed. [N2][N3]

Separate missing handling from audio restrictions

The reviewed action can reject enabling suppression during screen-audio sharing or for a stereo local track. It can also report an effect-initialization failure. When no local audio track exists, it records the desired state for a later track; that is not evidence of processed microphone audio. Do not bypass those checks or force an effect onto an active audio mixer. [N3]

Test the explicit setting first with an ordinary microphone and no screen-audio share. Check the client setting, any warning and the actual audio with a consenting test participant. Then test the sharing scenario separately using the checklist above. Keep logs sanitized and record the exact client/browser. We have not completed these media checks.

PR #18110 proposes the missing toggle handler, but was open and unmerged on 26 October. Its proposed test is not a released-build result. The reverse mapping mismatch described in #18106 also means the internal toggle-share-audio handler is not, by itself, a callable public command in the reviewed outer map. Do not invent a toggleShareAudio API call from an internal message name. [N1][N2][N4]

For Docker and Debian/Ubuntu operators, investigate the web client delivered by your own deployment before changing server settings. This source review establishes no environment variable, firewall rule or Prosody setting that supplies the missing browser message handler. Revisit this advice when the proposal is merged, included in a release and verified on your deployed client.

Common mistakes

  • Blank frame: merge script-src 'self' https://meet.example.com and frame-src https://meet.example.com into the app’s CSP. Keep initialization in an allowed app script, or authorize inline code with a CSP nonce or hash. Jitsi separately needs compatible frame-ancestors; inspect proxy-added X-Frame-Options. Multiple CSP headers all apply.

  • Media denied: the API already supplies allow for camera, microphone and display capture. A parent denial still wins. Where needed, merge this scoped parent response header:

    http
    Permissions-Policy: camera=(self "https://meet.example.com"), microphone=(self "https://meet.example.com"), display-capture=(self "https://meet.example.com")
  • Overrides ignored: production builds filter override keys through whitelists. Keep modern configuration in configOverwrite; obsolete toolbar settings in interfaceConfigOverwrite can fail.

  • Unsupported API: the exact console message is Not supported command name. Check getSupportedCommands() and load the script from the same server as the meeting.

  • Cross-origin confusion: use the API rather than accessing the iframe DOM. The standard script tag needs no crossorigin attribute; adding one introduces CORS checks. Restrictive sandboxing can block scripts or media.

Verify

Both install types: this checks script availability. Expected: 200, which alone cannot prove a working conference.

Terminal
curl --fail --silent --show-error --output /dev/null --write-out '%{http_code}\n' https://meet.example.com/external_api.js

In the embedding page’s console, after creating api:

JavaScript
console.log(api.getSupportedCommands().includes('toggleLobby'));
console.log(api.getSupportedEvents().includes('knockingParticipant'));
console.log(api.getSupportedEvents().includes('lobbyModeChanged'));
console.log(typeof api.isLobbyEnabled);

Expected for 11248: true, true, false, undefined. Joining prints the application’s JOINED. Test two users: roles, admission, denial, media and screen sharing. Capability checks cannot prove authorization.

If it still fails

Inspect the app console and the meeting frame’s console and network requests separately. Check CSP, permission failures and errorOccurred payloads. Decode tokens locally and compare claims and expiry without exposing them in shared logs.

Docker stable-11248:

Terminal
docker compose logs --tail=100 web prosody jicofo jvb

Debian/Ubuntu packages:

Terminal
sudo journalctl -u prosody -u jicofo -u jitsi-videobridge2 --no-pager -n 100

If lobby enabling fails, the pinned client source includes the exact log Ignoring enable lobby request because there are visitors in the call already. A client command cannot override that guard.

Sources

What we have not confirmed yet

The complete flow needs real Docker, package and mobile browser tests, including role enforcement and changes by other moderators. The lobby PR has no confirmed release date.

Need a hand?

Embedding Jitsi in your product? Contact our engineers or see our integration service.

Written by the Jitsi Help engineering team

Jitsi infrastructure engineers who deploy and run Jitsi Meet servers in production. Last updated . How we write our guides

Stuck on something this page does not cover? Ask a question below. Jitsi Help engineers read every one.

Did this guide work for you?

Something on this page is outdated or wrong?

Frequently asked questions

Why does the IFrame toggleNoiseSuppression command do nothing?

Report #18106 and the master source reviewed on 26 October 2026 show an outer command mapping without a matching receiver handler. The documented setNoiseSuppressionEnabled command has a handler in that source, but audio restrictions can still prevent enabling the effect. PR #18110 was unmerged; no released fix or live media test is established here.

Does JWT automatically choose the meeting host?

No. Stock token validation checks access. Moderator assignment depends on Prosody modules and Jicofo role configuration; a moderator claim alone is insufficient.

Can my app read the current lobby state?

Not through the examined 11248 API. PR #17860 proposes a getter and event, but remains unmerged as of 2026-10-06.

Can I use a room password with the lobby?

Yes, through the password command and passwordRequired event. A correct room password can bypass lobby admission in the examined implementation, so test the access policy you intend.

Can I embed this in React?

Yes, using Jitsi's React SDK or this API in your component lifecycle. Dispose the instance on cleanup and avoid creating duplicate meeting frames.

Discussion

    Stuck, or would rather not do this by hand?

    Deploy it in one click

    A private Jitsi server in your own AWS account with SSL, your domain and optional recording, transcription and JWT. Free 15 minute trial.

    Start free trial

    Talk to a Jitsi engineer

    Setup, fixes, branding, recording, scaling. Tell us what is happening and we reply with a plan and a quote.

    Get expert help

    Related

    Recently updated