Jitsi and Keycloak SSO integration

Jitsi Meet can restrict room creation to people who sign in through Keycloak, using OpenID Connect tokens, while guests join from the anonymous domain. This page explains the documented method, prerequisites, build sequence and the failure points teams hit.

On this page

How Keycloak SSO limits Jitsi room creation

A self-hosted Jitsi Meet that anyone can use to start a meeting is an open door, and a Keycloak realm your organization already runs is the natural place to close it. The Jitsi handbook method for this uses Prosody token authentication: Prosody checks the signed token in each request against the OpenID Connect certs endpoint of a Keycloak realm, so only users who sign in through Keycloak can create rooms, while everyone else joins later through the anonymous domain once a host has arrived. The handbook treats this JWT token route as the supported approach and marks the older secure domain method, which relies on a shared username and password for room creation, as deprecated for new installations. Keycloak is an open source identity and access management server licensed under Apache 2.0 and supports the OpenID Connect, OAuth 2.0 and SAML 2.0 protocols, so the Jitsi integration rests on a standard protocol rather than custom code.

The decision to make before any configuration is which identities may own rooms and how guests are separated from them. Confirm with your identity team which Keycloak realm and client will represent Jitsi, who holds the realm administrator role, and whether existing groups or roles will gate room creation. Keep the anonymous domain separate from the authenticated domain so guests never receive credentials for the host path. Plan the Prosody settings that point at the certs endpoint and the app identifiers the token must carry, and record who owns the Keycloak client secret and certificate rotation. Expect that a mismatch in the token audience, issuer or client identifier will block room creation for every user at once, so test with one account before you open the configuration to a wider group.

The Keycloak side also carries operational consequences. Keycloak documents its production databases and high availability designs, and a sign-in outage in Keycloak becomes a meeting outage for Jitsi hosts. Ask your Keycloak team which Keycloak release line they run and confirm its upgrade process before you depend on it, since the current release at the time of writing is 26.8.1 according to keycloak.org. Confirm with your Jitsi operator who receives alerts when token validation fails, and agree a test that signs in, creates a room and checks that a guest waits in the lobby until the host joins. Your DeployOpen scope should state these checks in writing so that a change to either system does not silently remove the control.

What you need before configuring Keycloak and Jitsi

Four pieces must be in place before any SSO setting is changed: a working Jitsi Meet base, a trusted certificate, a production-grade Keycloak, and named owners for each side. Missing any one of them tends to surface later as a failed login or a room that never opens.

A working Jitsi Meet base

Install Jitsi Meet on Debian 12 (Bookworm) or newer, or on Ubuntu 24.04 or newer, with OpenJDK 17, or deploy it with the official Docker setup. Confirm the base meeting works with anonymous joins before adding tokens, so any later failure points at authentication rather than the install. Record which method you chose, because the Prosody and config.js locations differ between Debian packages and Docker.

Quick start

A trusted domain certificate

Meeting audio and video depend on HTTPS with a certificate issued for your domain. The Jitsi handbook warns that self-signed certificates cause problems, especially with mobile clients, so a login flow that works in a desktop browser can still fail on phones. Confirm the certificate chain is valid from outside your network before you point Keycloak redirects at the site.

Open firewall ports

Open 80/TCP and 443/TCP for the web app and HTTPS, and 10000/UDP for media through the videobridge. Port 5349/TCP serves as TCP fallback and 3478/UDP for STUN is optional, so decide early whether those paths are needed for your users. Keycloak must also be reachable from the browser on its own hostname, which is a separate firewall rule from the meeting site.

A supported Keycloak release and database

Plan on the current Keycloak release, 26.8.1, and confirm it is the version your organization will standardize on. Production use needs an external database such as PostgreSQL 14 to 18, because the default dev-file database is for development only. Ask who patches Keycloak, how database backups run, and whether high availability is required, since both supported HA designs need a synchronously replicated database.

Keycloak database guide

A named Keycloak realm owner

Assign one administrator who owns the Keycloak realm, its OpenID Connect client for Jitsi, user groups and the rules that decide who may create rooms. This person decides how client secrets and redirect URIs are managed and who approves changes. Without a named owner, realm changes made for other applications can silently break meeting sign-in.

A named Jitsi operator

Assign an operator who owns the Prosody token settings, the jitsi-meet-tokens configuration and the config.js SSO URLs. Those files must stay in step with the Keycloak client, including the app ID, the secret and the redirect path. Agree in writing who approves a change that touches both sides, and who tests the join flow after every Jitsi or Keycloak upgrade.

How a Jitsi sign-in flows through Keycloak

The flow starts in the browser, which opens the Jitsi web app. The config.js tokenAuthUrl sends the user to Keycloak's OpenID Connect auth endpoint with a PKCE code challenge, and Keycloak redirects back to /static/sso.html with a signed token. The browser presents that token to Jitsi, and Prosody verifies its signature against the realm's certs endpoint named in cache_keys_url. Guests on the anonymous domain wait in the lobby until a host arrives. Check that the redirect URI and certs URL match your realm exactly.

Sign-in path for an authenticated host and a guest on the anonymous domain.

Configuration sequence for the handbook Keycloak setup

This sequence connects a self-hosted Jitsi Meet to Keycloak so that only authenticated users can create rooms, while guests join through the anonymous domain once a host arrives. Each step ends with a check that confirms the piece works before the next one depends on it.

  1. Run Keycloak in Docker

    Start a Keycloak container on a host you control, using the Docker approach the Jitsi handbook's authentication guide describes. Put it behind HTTPS with a certificate from a domain your organization owns, because the browser must reach the Keycloak login page and the Jitsi server must reach its certs endpoint. Confirm the admin console loads over HTTPS and that you can sign in as the bootstrap administrator. Plan a permanent admin account and a production database before users depend on the instance, since the default development database is for development only. Ask your identity team to confirm the image tag they will pin.

  2. Create the realm and Jitsi client

    In the Keycloak admin console, create a realm for Jitsi users and add an OpenID Connect client for Jitsi Meet. Set the valid redirect URI to the Jitsi static SSO page on your Jitsi domain, as the handbook shows, and enable PKCE with the S256 code challenge method so the browser flow matches the config.js settings in a later step. Create at least one test user who is allowed to host meetings. Check by opening the client's OpenID Connect endpoint metadata and confirming the auth and certs endpoints are listed for the realm.

  3. Point Prosody at the realm certs endpoint

    Edit the Prosody configuration on the Jitsi server so the conference virtual host uses authentication set to token, with cache_keys_url pointing at the realm's OpenID Connect certs endpoint. Prosody uses this endpoint to fetch the public keys that verify token signatures. Restart Prosody and check its log for errors about fetching keys or parsing the URL. A reachable certs endpoint from the Jitsi server is required, so confirm network access from that host before you blame the configuration.

  4. Install jitsi-meet-tokens and verify the MUC

    Install the jitsi-meet-tokens package, which sets app_id, app_secret and authentication for token use in the Prosody configuration and enables token_verification on the conference MUC. Review the generated settings so the app identifier and secret match what your Keycloak integration expects, and store the secret in your normal secrets handling rather than in a shared file. Restart the Jitsi services. Check the Prosody configuration for the token_verification setting on the conference component, then open a room without a token and confirm the server refuses to create it.

  5. Set the SSO URLs in config.js

    Update the Jitsi web configuration so tokenAuthUrl points at the realm's OpenID Connect authorization endpoint, with the PKCE code challenge and a redirect to the static sso.html page. Set tokenLogoutUrl so signing out of Jitsi also ends the Keycloak session, and set tokenAuthInline as the handbook describes. Clear the browser cache and load the Jitsi page in a private window. Check that the login button sends you to the Keycloak sign-in page and returns you to Jitsi after authentication.

  6. Enable wait-for-host with persistent lobby

    Enable the wait_for_host module in the Prosody configuration together with persistent_lobby, as the handbook guide does for this setup. With this combination, an authenticated user creates the room, and other participants who use the anonymous domain wait in the lobby until a host arrives. Restart Prosody and the Jitsi services. Check that a guest opening the room before the host sees a waiting state rather than entering the meeting, and that the meeting opens for guests once the authenticated host joins.

  7. Confirm room access end to end

    Run a final test with three accounts: an authenticated host, an unauthenticated guest and a user without host rights if your realm has one. Confirm that only the authenticated host can create the room, that the guest waits until the host arrives, and that the logout URL ends the Keycloak session as expected. Record the results and the versions of Keycloak and Jitsi you tested so the configuration can be repeated after upgrades. Ask your DeployOpen or internal team to confirm any behavior that differs from the handbook for your Jitsi release.

How the Keycloak realm, client and Jitsi roles map

The Keycloak side defines who the identity provider is and what it asserts about each user. In the handbook's approach, Keycloak runs in Docker and exposes an OpenID Connect realm that Jitsi trusts for token validation. The realm is the boundary for users, keys and clients, so it should be named and scoped deliberately before any Jitsi settings are copied in.

  • Realm: Create a dedicated realm for meeting access rather than reusing a realm that holds unrelated applications, so token signing keys and user populations stay separate.
  • Client: Register a Jitsi client with the OpenID Connect protocol and the client type your browser flow requires. Confirm with the handbook's Keycloak steps which client settings it expects.
  • Redirect URIs: Allow only the exact callback path served by your Jitsi domain, including /static/sso.html. Wildcards widen the set of places a token can be returned to.
  • PKCE: Require the PKCE code challenge on the client, matching what config.js sends. Confirm the exact method value against the handbook before you enable it.
  • Protocol mappers: Make sure the claims Jitsi reads, such as the user's name and the moderator indicator, are present in the issued token.

Before handing off, confirm the realm's issuer URL and the client ID exactly as they will appear in Jitsi configuration.

Which settings must match between Keycloak and Jitsi

This table maps each Keycloak object to the Jitsi setting it feeds and the failure that appears when the two sides diverge. Read it as a checklist to run before the first test login, since most SSO faults trace back to one mismatched value. Confirm exact key names against the handbook version you deploy.

Keycloak objectJitsi setting it feedsFailure if they diverge
RealmProsody cache_keys_url, which points at the realm's OpenID Connect certs endpointProsody cannot fetch the signing keys, so token checks fail and guests or hosts are refused entry
OIDC client IDapp_id in the Prosody token configuration from the jitsi-meet-tokens packageTokens minted for one client are rejected by Prosody, and room creation silently fails for authenticated users
OIDC client secretapp_secret in the Prosody token configurationToken signature or validation errors appear in Prosody logs, and users see join failures without a clear message
Client redirect URIThe /static/sso.html path that config.js sends the browser back to after loginKeycloak rejects the login redirect, so users cannot complete sign-in and never receive a token
Auth endpointconfig.js tokenAuthUrl, which carries the PKCE code challengeLogin opens the wrong page or fails PKCE checks, and the host never reaches the room as an authenticated user
Logout URLconfig.js tokenLogoutUrlUsers remain signed in to Keycloak after leaving Jitsi, or the logout step returns an error page
Anonymous domainGuest join path used with wait_for_host and persistent_lobby, so guests arrive only after a hostGuests are sent to the authenticated flow or cannot enter a room whose host has not yet arrived

Hardening the Keycloak and Jitsi token path

Token authentication connects two systems that each need their own hardening: the Jitsi hosts that serve the meeting and the Keycloak realm that issues sign-in tokens. The cards below cover the transport, secret, client, database, logout and guest-access decisions that determine whether room creation stays limited to authenticated hosts. Each one is a checkpoint to confirm before users depend on the integration.

HTTPS on both hosts

Serve the Jitsi web app and the Keycloak realm over HTTPS with certificates issued for the domain names users actually open. The Jitsi handbook says a proper domain certificate is necessary for working audio and video and warns that self-signed certificates cause problems, especially on mobile clients. Check that the token redirect flow, the Prosody key fetch and the browser sign-in all use the same trusted hostnames, and that certificate renewal is part of the operations runbook. Mixed hostnames are a common cause of failed sign-in.

Jitsi authentication guide

Keeping app_secret out of version control

The jitsi-meet-tokens package writes app_id and app_secret into the Prosody configuration, and the secret is what allows Jitsi to trust tokens it verifies. Store the value in a secrets manager or a root-only file on the Jitsi host, not in a repository, a shared configuration template or a chat thread. Rotate it when someone with access leaves, and confirm that backups of the host configuration are encrypted and access-restricted, since a copied secret lets anyone mint valid room tokens.

Limiting Keycloak client redirect URIs

The Keycloak client used for the Jitsi sign-in flow should list only the exact callback URLs the handbook setup uses, including the /static/sso.html redirect on your Jitsi domain. Avoid wildcard redirect URIs and open web origins, because a permissive redirect list lets an attacker who controls another page receive authorization responses. Review the client's redirect and web origin settings after every realm change, and confirm that the PKCE setting used by config.js is enforced for this client.

Production database for Keycloak

Keycloak's development-file database is for development only, so a token path that users depend on should run on one of the supported production databases, such as PostgreSQL in a version Keycloak lists as supported. Plan database backups and restore tests for the realm, clients and user data, because losing the realm breaks every host's sign-in at once. Confirm the Keycloak release and database version against the current compatibility documentation before any upgrade.

Supported range
PostgreSQL 14 to 18
Keycloak database guide

Token logout behavior

The config.js settings tokenLogoutUrl and tokenAuthInline control what happens when a host leaves a session, and they only clear the Jitsi side unless the Keycloak session is ended too. Test the full cycle on a shared workstation: sign in, create a room, sign out of Jitsi, then confirm whether a new visit reuses the Keycloak session. Shorten session lifetimes for hosts who share devices, and document the expected behavior so support staff do not treat a still-active Keycloak session as a Jitsi fault.

Separate anonymous domain for guests

The handbook recommends a separate anonymous domain for guests, which lets authenticated users create rooms while others join after a host arrives through the wait-for-host and persistent lobby setup. Keep the authenticated domain off public links and do not share its room URLs with guests. Test that a guest cannot open a room before the host joins, and that the anonymous domain never accepts tokens meant for hosts. SSO settings do not change media protection: DTLS-SRTP still encrypts audio and video on the network, so these controls govern who can open a room, not how the media is encrypted.

Jitsi token authentication

Why Jitsi rejects Keycloak tokens

This table lists the failures that most often stop Keycloak-issued tokens from working with Jitsi Meet, with the likely cause and the first fix for each. Read it when a room refuses a signed-in host or when guests get stuck, and check the Keycloak client, Prosody and config.js settings in the order the table lists them.

SymptomLikely causeFix
Redirect error after Keycloak sign-inThe redirect URI in the Keycloak client does not match the Jitsi /static/sso.html URL, including scheme, host and pathAdd the exact Jitsi sso.html URL as a valid redirect URI on the client, then retry sign-in in a fresh browser session
Host token rejected, Prosody logs show key fetch errorsProsody cannot reach the realm's OpenID Connect certs endpoint set in cache_keys_urlConfirm from the Jitsi host that the certs URL resolves and returns JSON, then fix routing, DNS or firewall rules between the hosts
Browser or mobile clients fail TLS to Keycloak or JitsiA self-signed certificate on the Jitsi or Keycloak host, which the handbook warns causes audio, video and mobile problemsInstall a certificate from a trusted authority for each host name, or add the internal CA to every client and to the Prosody host trust store
Token accepted by Keycloak but room refuses the userToken audience or app_id does not match the app_id and app_secret set by jitsi-meet-tokens in ProsodyCompare the aud and iss claims in the token with the Prosody values, correct the Keycloak client or Prosody setting, and restart Prosody
Guests wait in the lobby and never enterThe wait_for_host module or persistent_lobby is missing, so rooms do not open for guests until an authenticated host arrivesEnable wait_for_host with persistent_lobby as the handbook guide describes, then confirm a guest joins only after the host connects
Sign-in sends users to the wrong realm or logs them out of the wrong sessionconfig.js tokenAuthUrl or tokenLogoutUrl points at another realm or a stale host nameSet both URLs to the intended realm's OpenID Connect endpoints, reload the web config and test sign-in and sign-out for each realm

Keeping the integration working through Keycloak and Jitsi upgrades

Treat the Keycloak realm, the Jitsi client and the Prosody token settings as one integration that must be retested every time either side changes. Keycloak now plans four minor releases a year, and the project says breaking changes in a minor release will be opt-in. That lowers the risk of a surprise, but it does not remove the need for a check. Before each Keycloak upgrade, read the upgrading guide, list any changed defaults that touch the OpenID Connect client used by Jitsi, and confirm which opt-in changes you intend to enable. After the upgrade, sign in as a room creator, confirm the PKCE redirect to /static/sso.html still completes, and confirm that a guest on the anonymous domain can still join after a host arrives.

Database schema changes are the upgrade step most likely to take longer than planned. Keycloak migrates its schema automatically at startup by default. For a small realm that is usually acceptable, but for a large deployment the upgrading guide suggests applying the SQL manually so a DBA can review and schedule it. Decide which path you will use before the upgrade window, and take a tested database backup first. If Keycloak runs on Kubernetes through the Keycloak Operator, keep the operator on manual approval mode, which the Operator documentation strongly recommends, so that Keycloak versions change only when your team approves them. Confirm the Keycloak version your Jitsi client was tested against before approving the change.

Jitsi side changes also need retesting. Token settings in the Prosody configuration, the app_id and app_secret values from the jitsi-meet-tokens setup, the cache_keys_url and the tokenAuthUrl, tokenLogoutUrl and tokenAuthInline entries in config.js can all be affected by a Jitsi package or Docker upgrade. Check the handbook release notes for changed file locations before you upgrade, and keep a short test script that covers host sign-in, wait-for-host behavior and sign-out. Record the Keycloak and Jitsi versions you tested together, so the next person knows which combination was last verified.

Questions teams ask before configuring Jitsi SSO with Keycloak

How much effort does Jitsi SSO with Keycloak take?

The effort depends mainly on how much Keycloak work already exists and how many moving parts you add. The integration touches a realm, a client, Prosody token settings, the wait-for-host module and the config.js SSO URLs, so each of those is a configuration task that needs testing. Effort rises with the number of realms and clients, with the amount of Keycloak configuration that is undocumented or hand-built, and with certificate work, because working audio and video requires HTTPS with a proper domain certificate. Ask for the effort split by task in any written scope, and confirm it against your own environment before committing to a schedule.

Can our internal team set this up using the Jitsi handbook?

Yes, a team with Linux, Keycloak and Prosody experience can follow the handbook, which runs Keycloak in Docker and configures Prosody with authentication = "token" and a cache_keys_url pointing at the realm's OpenID Connect certs endpoint. The harder part is what the handbook does not decide for you: which realm structure fits your organization, how users and roles map to moderators, how the anonymous guest domain is handled, and how the setup is tested and maintained. Teams without a Keycloak operator or without a test environment often find the verification and upgrade work takes longer than the initial configuration.

What access and inputs does the work need from our side?

Plan to provide administrator access to Keycloak, including the ability to create a realm and a client, and host access to the Jitsi servers, including Prosody, the web configuration and config.js. You also need a domain name you control and a valid certificate for it, since self-signed certificates cause problems, especially with mobile clients. Add a test plan covering who can create rooms, how guests join from the anonymous domain, how logout behaves and what happens when no host has arrived. Confirm who in your organization approves changes to the identity provider, because those changes affect every meeting.

How long will the integration take?

The time depends on your environment, and the figure belongs in the written scope rather than in a general estimate. Duration is driven by the number of realms and clients, the state of your existing Keycloak deployment and its high availability design, the certificate and DNS work, and the number of test cases you require before go-live. Ask for the schedule to list each dependency and the person responsible for it, so delays in access or certificates are visible early.

What ongoing work does this integration create?

Two things recur. Certificates must be renewed before they expire, because expired certificates break audio and video and the sign-in flow. Jitsi and Keycloak also need upgrades: Keycloak plans four minor releases a year and says breaking changes in minor releases are opt-in, and the Keycloak Operator documentation recommends manual approval for operator updates to avoid unintended upgrades. Each upgrade should be retested against the room creation, guest and logout paths. Ask any partner whether upgrades and continuous testing sit inside a retainer or a separate scope.

Is Keycloak itself highly available for Jitsi sign-in?

Not automatically. Keycloak documents three high availability architectures, and both supported designs need a synchronously replicated database. If Keycloak is down, authenticated users cannot create rooms, so the availability target for the identity provider should be set alongside the Jitsi requirements. Confirm your database choice against Keycloak's supported production databases and plan for the failure behavior of the whole chain, not only the Jitsi servers.

When is a partner worth it compared with an internal build?

A partner is usually worth considering when the identity design involves several realms, existing enterprise identity sources, strict audit or access requirements, or a deadline that your team cannot staff without pulling people from other work. An internal build suits a single realm, a small set of clients and a team that already runs Keycloak and Prosody. Either way, ask for the written scope to name deliverables, test cases and handover material. DeployOpen implements, hardens, documents and supports self-hosted open-source platforms in your own infrastructure, and most engagements are fixed-scope with a quote that follows from that scope.

How DeployOpen scopes and delivers the Jitsi and Keycloak integration

DeployOpen plans, implements, hardens, documents and supports self-hosted Jitsi Meet inside your own infrastructure, including the Keycloak sign-in path described above. The work covers the Keycloak realm and client, the Prosody token settings, the wait-for-host behavior with its persistent lobby, and the config.js SSO URLs, along with the operating context around them: the Keycloak database, high availability design, upgrade approach and the Jitsi hosts that sit behind the sign-in flow. Engagements are fixed-scope. Before any work starts, the scope, deliverables, acceptance checks and timelines are agreed in writing, so you know what you are buying and how completion will be judged. A quote follows from that written scope, and it is the document to compare against an internal estimate.

Ask any partner, including us, to make the scope explicit on a few points that drive cost and risk: which Keycloak deployment model you run and who operates it, whether the Keycloak database and its high availability design are in or out of scope, which Jitsi hosts and domains receive the token configuration, and how guest access through the anonymous domain will be handled. Confirm who owns the operator update approval process if Keycloak runs on Kubernetes, and who signs off on the realm and client settings. Ongoing support, version upgrades and recurring checks can be covered by a retainer after the initial delivery, which is usually the better fit when a Keycloak release or Jitsi release needs to be tested against your existing SSO settings.

Because the SSO path decides who can create meetings, it is also a good candidate for security testing. DeployOpen runs application and infrastructure security testing that can cover the token flow, redirect and logout handling, and the Keycloak administrative settings, with findings, fixes and a retest. DeployOpen is an independent implementation and security firm. It is not an official partner, reseller or certified provider of Jitsi, 8x8 or Keycloak, and it does not issue audit reports or certifications. Where your compliance program needs independent assurance, that comes from the auditor or certification body you choose, and DeployOpen prepares the systems and evidence for them.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.