Matrix vs XMPP

Matrix suits teams that want persistent shared rooms, a rich baseline feature set and Synapse-based scaling, while XMPP suits teams that want a minimal, long-established message-passing protocol. The right pick depends on federation needs, bridges and the operating effort you can carry.

On this page

Matrix or XMPP: when each one fits your messaging plan

If you are choosing a self-hosted messaging standard for a regulated or multi-site organization, Matrix fits best when you need federated rooms that many servers can replicate and when you expect Element clients and a maintained homeserver to be central to the rollout. XMPP fits best when you want a deliberately minimal protocol, mature signalling for real-time services, and a team comfortable extending it through XEPs. The matrix vs xmpp decision is less about which is more modern and more about what your organization must share, with whom, and who will run it. Choose Matrix when cross-organization federation is a requirement and you can plan for it. Synapse, the homeserver developed by Element under AGPL-3.0, is the most widely documented option, and its federation is governed by settings such as federation_domain_whitelist, which you should set to an explicit list of partners or to an empty list if federation is not wanted. Synapse also supports single sign-on through OpenID Connect, SAML2 and CAS, which matters if your identity team already runs a provider. Choose XMPP when your traffic is mostly internal, when you already run Prosody or ejabberd, or when you need the signalling layer that Jitsi Meet uses through Prosody.

The decision turns on four questions. First, federation scope: list the domains and partner organizations that must reach you, and confirm whether each protocol's federation model fits that list with your firewall and DNS plan, including the federation port on 8448 that Synapse uses by default. Second, encryption expectations: confirm with your security and compliance leads which end-to-end encryption behavior and key management they will accept, and verify the current behavior with each vendor's documentation rather than assuming it. Third, bridges to existing chat: the Matrix FAQ notes that a bridge such as purple-matrix lets both protocols coexist, so check which bridges your current platform needs and whether they are maintained. Fourth, operating capacity: Synapse production use recommends PostgreSQL, and upgrades can be hard to roll back because of schema changes, so a team without database and upgrade skills should price that effort before committing.

Which protocol fits which scenario

This table matches common Matrix and XMPP scenarios to the protocol that usually fits better and the condition that makes it so. Read each row as a starting point, then confirm the condition against your own federation partners, identity setup and operations team.

ScenarioBetter fitCondition under which it holds
Federating with partner organizationsMatrixBoth sides run homeservers that accept federation, and you want rooms that keep history and membership state replicated across servers. Confirm the partner's server software and federation policy first.
Single-tenant internal chatEither, leaning Matrix for broader built-in featuresYour users sit on one domain and need no outside federation. XMPP's minimal baseline may suit a small team that wants to add only the extensions it needs, while Matrix ships a broader default feature set.
Bridging to existing networksMatrixThe Matrix FAQ notes that an XMPP bridge such as purple-matrix lets both protocols coexist, so XMPP can still serve as a bridge target. Confirm which bridges exist for your target network and whether they are maintained.
Jitsi-based signallingXMPPJitsi Meet uses the Prosody XMPP server for signalling, so an XMPP stack already fits a Jitsi deployment. Running Matrix next to Jitsi adds a second messaging system to operate.
Teams with limited ops capacityDepends on the workloadA Synapse homeserver expects PostgreSQL in production and can scale with workers and Redis, which adds components. A small XMPP server with minimal baseline may be simpler to keep running, but confirm the effort against the extensions you need.
Need for a broad default feature setMatrixMatrix has a deliberately extensive baseline of functionality, so features such as rooms, history and encryption come with the protocol. Choose XMPP if you prefer to standardize on a minimal core and add extensions deliberately.

How Matrix replicated rooms and XMPP message passing are built

Matrix and XMPP both let people exchange messages across servers, but they model the conversation differently. Matrix keeps a shared, replicated event graph for each room, while XMPP passes messages between endpoints as XML stanzas defined in RFC 6120. The cards below cover what each model means for the servers you run, how state is kept, and how a deployment recovers when something fails.

Matrix as a replicated event graph

The Matrix FAQ describes Matrix as an eventually consistent global JSON database with an HTTP API and pubsub semantics. Each room is a shared history of events that every participating homeserver holds a copy of, so a server that was offline can catch up on the room's history instead of depending on a single relay. Check how your users and compliance team expect message history to be retained and deleted, because copies live on every server that joins the room.

XMPP as message passing

XMPP is specified in IETF RFC 6120, published in March 2011 on the Standards Track, as an XML-based protocol for exchanging structured data in near real time. Messages move between the servers that route them, and the server does not keep a replicated copy of each room's history. Ask what your retention, search and archive requirements need, because those features rely on extensions and your own storage rather than the core protocol.

Synapse as the reference homeserver

Synapse is the most widely documented Matrix homeserver, written in Python and developed by Element under AGPL-3.0. Matrix.org also lists Dendrite, Conduit and its forks, and Element's commercial Synapse Pro as other homeserver implementations. Confirm which implementation your team will operate, since operational guidance, upgrade notes and support differ between them.

Workers with Redis and PostgreSQL

Synapse can run a single main process or scale out with worker processes. The main process and all workers connect to Redis, which relays replication between them, and the generic worker handles client, federation and event traffic. Synapse recommends PostgreSQL for production, and versions 1.143.0 and later require PostgreSQL 14 or newer. Plan for Redis and PostgreSQL as components to back up and monitor, not only as Synapse settings.

Recovery and rollback in Matrix

The Synapse upgrade notes warn that rolling back can be difficult because database schema changes occur between releases. Recovery therefore depends on a tested database backup taken before each upgrade, not on reverting the binaries alone. Ask your team to rehearse restoring PostgreSQL and the media store to a staging host before any production upgrade.

XMPP server choice and extensions

Because the XMPP core is minimal, features such as history, file transfer and presence depend on extensions that servers implement to different degrees. Jitsi Meet shows this in practice, since it uses the Prosody XMPP server for signalling. Before committing, list the extensions your clients need and confirm each candidate server supports them, because this is not something the core RFC guarantees.

How federation and encryption differ in practice

Start by deciding whether your Synapse homeserver should federate at all. Synapse federates on port 8448 by default, and the Synapse federation docs describe delegation, which lets user IDs such as @user:example.com stay on your domain while the server runs on another host reachable on port 443. The server_name setting fixes how users and rooms are identified, so changing it later changes identities, and it should be settled before the first account is created. The federation_domain_whitelist setting limits federation to the domains you list, and an empty list disables federation entirely. The configuration manual also recommends firewalling the federation listener, since the whitelist only governs what Synapse accepts. Restricting federation is a policy choice each organization must make and record.

XMPP server-to-server federation follows the stream model in RFC 6120, which covers connection setup, TLS negotiation and DNS-based discovery of remote servers. The administrative controls for which remote domains may connect belong to the server product you run, so the settings differ between implementations. Confirm the exact access rules, discovery records and certificate requirements in your chosen server's documentation before assuming they map to Synapse's model. If you run Jitsi Meet, the Jitsi self-hosting guide says it uses Prosody for signalling, so a Prosody host may already exist in your estate. Review its federation settings before anyone opens them to other domains, because they may have been left at defaults set for a video deployment.

Encryption is where the comparison depends most on the client and the room configuration. Matrix supports end-to-end encryption in rooms, but whether a given conversation is encrypted, and how users verify each other's devices, depends on the room settings and the client each person uses. XMPP protects traffic in transit through TLS negotiated in the stream, and end-to-end options depend on the extensions a client implements. Confirm for every client you plan to support, including web, desktop and mobile, which encryption features it offers and how key verification works. Then run a test conversation between your actual clients and a federated peer, record the results, and write the policy from those results rather than from vendor descriptions.

Side-by-side capability comparison

This table compares Matrix and XMPP on federation, baseline functionality, implementations, licensing, single sign-on, bridges and Jitsi's use of XMPP. Read each row as a question to confirm against the implementation you plan to run, because XMPP feature support depends on the server and extensions you choose.

CapabilityMatrix (Synapse)XMPP
Protocol modelEventually consistent global JSON database with an HTTP API and pubsub semantics, per the Matrix FAQMessage passing protocol specified in RFC 6120 (March 2011, Standards Track), exchanging XML-based structured data
Baseline functionalityDeliberately extensive baseline, per the Matrix FAQDeliberately minimal baseline, with capabilities added through extensions
Federation defaultSynapse federates on port 8448 by default, with delegation to serve user IDs from another host on port 443Server-to-server federation is part of the core specification; confirm the behavior and defaults of your chosen server
Restricting federationfederation_domain_whitelist limits federation to listed domains; an empty list disables itConfirm with your server how domain allow lists and server-to-server policy are configured
Server implementationsSynapse (Python, AGPL-3.0-or-later, Element), Dendrite (Go), Conduit and its forks, and Element's commercial Synapse ProSeveral independent servers exist; confirm which one supports the extensions and clustering you need
Server licensingSynapse is AGPL-3.0-or-later, with commercial licenses available from ElementVaries by server; confirm the license of the specific XMPP server before adoption
Single sign-onSynapse supports OpenID Connect, SAML2 (via pysaml2) and CASConfirm SSO options with the chosen XMPP server and its authentication modules
Bridgespurple-matrix lets XMPP and Matrix users coexist, per the Matrix FAQ; the Matrix ecosystem lists further bridgespurple-matrix bridges XMPP clients into Matrix rooms, and the bridge is the main coexistence path
Jitsi Meet dependencyNot used by Jitsi MeetJitsi Meet uses the Prosody XMPP server for signalling, per the Jitsi self-hosting guide

Licensing and editions for each option

Synapse is the Python homeserver developed by Element and distributed under AGPL-3.0, with commercial licences also available from Element. The licence question has a recent history that affects how you read older documentation. On December 13, 2023, Element announced that future contributions to Synapse would be licensed under AGPLv3 instead of Apache 2.0, moved the repositories from matrix-org to element-hq on GitHub, began selling AGPL exceptions, and required contributors to sign a CLA. The matrix.org ecosystem page also lists Element's commercial Synapse Pro.

  • Licence today: Synapse is AGPL-3.0, so a modified network-facing deployment carries source obligations to its users. Check your legal team's position on that before you build.
  • Change date: The December 13, 2023 change moved future contributions from Apache 2.0 to AGPLv3, so blog posts and forks from before that date may describe a different licence.
  • Repository location: Current code lives at github.com/element-hq/synapse, so older links to matrix-org repositories may be stale.
  • Commercial licence: Element sells AGPL exceptions, which are relevant if your legal team cannot accept AGPL terms.
  • Synapse Pro: The ecosystem listing names it as Element's commercial variant. Confirm with Element what it includes and what support comes with it.

Confirm with Element whether paid support is bundled with a commercial licence or sold separately, which release branches are covered, and what response commitments are written into the contract.

What drives the running cost of each option

Running a Matrix or XMPP service costs more in people and infrastructure than in licenses, since both protocols are open. The cards below cover the components, skills, upgrade habits and support options that shape the bill, with the questions to put to any implementation partner or vendor before signing.

Database and cache footprint

Synapse recommends PostgreSQL for production, and SQLite is supported. Synapse 1.143.0 and later require PostgreSQL 14 or newer. Workers also depend on Redis, which relays replication between processes. Each of these is a service you must back up, patch, monitor and size. For XMPP, ask which database the chosen server uses and whether clustering needs extra components. Ask a partner to price the database hosting, backup retention and failover design as separate line items.

Worker topology and scaling

Synapse scales by splitting work across worker processes, with the main process and all workers connected through Redis. The generic worker handles client, federation and event traffic. Each added worker adds configuration, reverse proxy routing and monitoring. Ask whether the quote covers a single process at launch and what it takes to add workers later. XMPP deployments usually scale by different components, so compare the number of moving parts for the expected user count rather than the headline feature list.

Media and federation traffic

Media uploads, large room histories and federation with other servers drive bandwidth and storage. Synapse federates on port 8448 by default and can use delegation so user IDs are served on port 443. A federation allowlist through federation_domain_whitelist reduces traffic and exposure, but it must be maintained. Ask for an estimate of media storage growth, the retention policy, and the cost of firewalling the federation listener. Test the same questions against each XMPP server and its file transfer design.

Skills required to operate

Operating a homeserver needs staff who understand PostgreSQL tuning, Redis, reverse proxies, TLS, identity federation and Python or XMPP server internals, depending on the stack. This is usually the largest recurring cost. Ask which of these skills the quote assumes you already have and which it transfers through documentation, handover or training. Compare the number of distinct skill areas each option demands, not just license terms.

Upgrade cadence and rollback risk

The Synapse upgrade notes warn that rolling back can be difficult because database schema changes occur between releases. The same notes say Synapse drops support for Python and PostgreSQL versions once they reach upstream end of life, which forces OS and runtime upgrades on a schedule you do not set. Ask for a written upgrade procedure, a tested restore point before each upgrade, and who performs the upgrade when a runtime is retired. Ask the same of any XMPP server you shortlist.

Paid support and quote scope

Synapse is AGPL-3.0 and Element sells commercial Synapse licenses, while XMPP servers have their own support vendors and community options. Paid support, upgrades and monitoring can come from the vendor, a community partner or an implementation firm. DeployOpen plans, implements and supports self-hosted platforms in your infrastructure under a fixed written scope, with ongoing support available as a retainer. Ask any provider for the support window, response expectations, what is excluded and who holds the on-call duty.

Moving users from XMPP to Matrix or back

This sequence lets a team move people and rooms between XMPP and Matrix without a single cutover day, so both networks can run side by side until each group of users has a working client, an identity path and a verified history plan.

  1. Inventory rooms, accounts and bridges

    The team lists every XMPP account, multi-user chat room, room owner, member list, archive setting and client in use, then does the same for any Matrix homeserver already running. Someone from platform engineering owns the list, and the security lead signs off on which rooms hold regulated data. The step is done when each room has a named owner, a target destination and a decision on whether its history must be kept. Confirm with your XMPP server vendor how its archive is exported, because the Matrix FAQ describes the two protocols as different models and no fact supplied here shows an automatic history import.

  2. Choose a bridge and test coexistence

    Select a bridge such as purple-matrix, which the Matrix FAQ names as a way for XMPP and Matrix to coexist, and deploy it in a non-production environment. The integration engineer maps XMPP JIDs to Matrix IDs, tests one-to-one messages and a room in both directions, and checks how presence, read markers, file attachments and encrypted messages behave. The step is complete when test traffic passes both ways and the team has a written list of features the bridge does not carry across. Ask the bridge maintainers which features they support, since this page does not assert any specific bridge capability.

  3. Map identity and move authentication to SSO

    The identity team connects the Matrix homeserver to the company's directory through a supported single sign-on path, such as an OpenID Connect provider, SAML2 or CAS, as described in the Synapse configuration manual. They decide how existing XMPP passwords are retired, how usernames map to Matrix user IDs, and who can create accounts. The step is done when a test user signs in through the identity provider and the account is provisioned with the correct display name and group. Confirm how the identity provider handles account deprovisioning, because removing a directory entry does not by itself remove existing room membership.

  4. Pilot rooms with a small user group

    The platform team moves a small, named group of users and one or two low-risk rooms to Matrix while the bridge keeps the rest of the organization connected. Users receive written guidance on which room lives where, how to find their new account, and how to report missing messages. The step closes when the pilot group has used the rooms for normal work and the team has logged every gap in message history, file access or notifications. This is the point to decide whether the bridge can stay in place or must be removed on a set date.

  5. Cut over clients and room links

    The team updates client configuration, bookmarks, calendar invitations and runbooks to point to the new homeserver, and sets the bridge to forward only for rooms still in transition. Client support is confirmed for each platform the organization uses, since the chosen clients and their encryption features must match the security policy. The step is complete when every active user can sign in from their normal device, the old room links redirect or are documented, and the help desk has a current script. Do not remove old client access until the support queue shows no open cutover tickets for at least one full working cycle agreed by the team.

  6. Retire old servers and archive records

    Once all rooms and users are confirmed on the target side, the team disables new logins to the old XMPP server, exports the archives required by the retention policy, and stops the bridge. The data owner records where each archive is stored and how it can be read later. The step is done when the old server is shut down or read-only, the archive restore has been tested on a sample set of rooms, and the change record names the person who approved retirement. Note that the Synapse upgrade notes warn that rolling back can be difficult, so a reverse move should be planned with the same care as the forward one.

Where Matrix and XMPP projects usually run long

Matrix projects most often run long at the Synapse database and reverse proxy layer, because the homeserver expects PostgreSQL in production and the reverse proxy must route client traffic and federation correctly before anyone can test a login. Synapse 1.143.0 and later require PostgreSQL 14 or newer, and the upgrade notes warn that rolling back can be difficult because of schema changes between releases. Ask the implementation partner to write down the database version, the backup and restore test, and the upgrade path before the first production user is created. Federation adds a second slip point: delegation DNS, the server_name setting and the choice between port 8448 and delegated port 443 all have to agree, and a mistake there is found only when a remote server fails to join a room.

Single sign-on and bridges are where scope tends to grow. Synapse supports OpenID Connect through oidc_providers, SAML2 through saml2_config and CAS, so the team must decide which identity source is authoritative and confirm the claim mapping with the identity team before rollout. XMPP deployments carry a similar identity question at the server level, but the bridge work is usually larger: each bridge to Slack, Teams or another network needs its own configuration, account mapping and testing, and bridged history rarely matches native history. Client rollout and user training then consume the final weeks, since users must learn new clients, key verification and recovery. DeployOpen scopes these items in writing before work starts, so the agreed deliverables, the responsible party for each integration and the training scope are fixed in the statement of work, not discovered during the project.

Questions buyers ask before choosing Matrix or XMPP

What does a self-hosted Matrix or XMPP deployment cost to run?

Software licensing is often the smallest line, because the main servers are open source. The larger costs are infrastructure, database administration, staff time and support. Synapse is AGPL-3.0, and Element sells commercial licenses for organizations whose legal teams need different terms, so confirm which license applies to your use. Infrastructure cost rises with user count, federation traffic, media storage and whether Synapse is split into workers, which adds Redis. One-time costs include design, identity integration, testing and migration. Recurring costs include hosting, patching, upgrades and any support retainer. DeployOpen does not publish prices, and a quote follows from the written scope. Ask for line items covering build, identity integration, testing, documentation and ongoing support, and confirm which infrastructure you already pay for.

Can our own team run a Matrix or XMPP server without outside help?

It depends on your database, scripting and on-call skills, and on how many components you accept. Synapse supports SQLite, but its documentation recommends PostgreSQL for production, and recent releases require PostgreSQL 14 or newer and Python 3.10 or newer. Scaling with workers adds Redis, which relays replication between processes. Upgrades need planning because rolling back can be difficult after database schema changes. For XMPP, confirm the server's supported database, upgrade path and operating needs with its maintainers before you commit. Ask whether your staff can own upgrades, backups and federation settings for the life of the platform. DeployOpen can plan, implement, harden, back up, upgrade, document and support the platform inside your own infrastructure, and ongoing support is available as a retainer.

How long does a Matrix or XMPP rollout take, and what drives it?

No single duration fits every organization, so treat any timeline as something to confirm against a written scope. The main drivers are the number of components, identity integration, federation policy and whether you need workers, bridges, client rollout and user migration. Synapse can use OpenID Connect, SAML2 or CAS for single sign-on, and each identity integration needs its own testing against your provider. Federation decisions come early, because the server name fixes how users and rooms are identified and changing it later affects every identity. Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Ask any implementation partner to break the timeline into design, build, pilot, cutover and handover phases, and to name what each phase depends on.

Do bridges keep Matrix and XMPP users able to reach each other?

Yes, but only as far as each bridge carries the features you use. The Matrix FAQ says an XMPP bridge such as purple-matrix lets both protocols coexist, because Matrix has an extensive baseline of functionality and XMPP a deliberately minimal one. Bridge coverage varies, so confirm how the bridge handles message delivery, presence, file transfer, encryption and group membership, since these may not map one to one. Check each bridge's maintenance status and license on the Matrix ecosystem list before you depend on it. Bridges add a service to run, monitor, back up and secure, and they need their own identity mapping. Ask the project which features are supported, which are lossy and what happens during an outage. A bridge can carry a transition period while users move at their own pace, but it should not be treated as a permanent integration without testing.

Is Matrix suitable for regulated data in a bank or hospital?

Matrix can be deployed under controls, but suitability depends on your data classification, hosting location and the evidence you can produce, not on the protocol alone. Synapse's federation_domain_whitelist setting restricts federation to listed domains, an empty list disables federation, and the documentation recommends firewalling the federation listener as well. Single sign-on through OIDC, SAML2 or CAS lets you keep authentication in your existing identity system. Confirm encryption behavior, message retention, audit logging and backup with the vendor and in your own tests. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies do that work. Ask your assessor which framework applies before the design is fixed.

Which Matrix homeserver should a production team choose first?

Many production teams start with Synapse, because it is the most widely documented homeserver and is actively developed by Element. Synapse is licensed under AGPL-3.0, and Element also offers commercial licenses and a commercial product called Synapse Pro. Matrix.org also lists Dendrite, Conduit and its Rust forks Continuwuity and Tuwunel, which use different licenses and have different maturity levels, so check each project's current status before deciding. Consider your database and scaling needs. Synapse recommends PostgreSQL for production and scales with workers and Redis. Ask whether you need commercial support, which license terms your legal team accepts and how the homeserver will be upgraded over time. The server name you choose becomes part of every user identity, so settle it before any users are created.

How do we move from Matrix to XMPP, or back, later?

Plan any switch as its own project with a written scope, because the two protocols model users, rooms and message history differently. The Matrix FAQ describes Matrix as an eventually consistent global database with pubsub semantics, and XMPP as a message passing protocol, so history and identity rarely move directly. Start by inventorying users, groups, retained history and the clients each group uses. Decide whether a bridge will carry the transition and for how long. Synapse's documentation warns that rolling back can be difficult because of schema changes, so take a verified backup before each upgrade. Cost rises with user count, history volume, client changes and user retraining. Ask any partner which data can be exported, what history can be kept and how cutover and rollback will be tested.

How DeployOpen helps you choose and implement either platform

DeployOpen is a Chainscore Labs company that plans, implements, customizes, integrates, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside your own infrastructure. For Matrix vs XMPP, we start from your federation, encryption and bridge requirements, then build and document the option you choose in your own cloud accounts, data centers or air-gapped networks.

How we scope

  • Written scope covers which protocol, server implementation and bridges your users need, agreed before work starts.
  • We record federation rules, identity sources, encryption expectations and the clients your users will run.
  • Engagements are fixed-scope, with deliverables and timelines set in writing; ongoing support is available as a retainer.

How we build

  • We install and configure the chosen homeserver or XMPP server inside your own environment, with its database and reverse proxy.
  • We integrate identity providers and bridges, and test federation and encryption behavior against your written requirements.
  • We can run security testing on the deployment, covering applications, APIs and infrastructure, before users are onboarded.

How we hand over

  • You receive documentation of the configuration, hostnames, federation settings, backup routines and upgrade steps.
  • We document the rollback limits for the chosen platform, including database schema changes between releases, so your team knows what can and cannot be reversed.
  • We prepare systems and evidence for compliance assessments, while independent auditors and certification bodies issue any formal reports.

How we support

  • Retainers cover upgrades, ongoing support and continuous testing once your team is live on the platform.
  • We confirm each upgrade against the platform's own release notes and supported database and runtime versions before applying it.
  • Support scope is agreed in writing, so you can see which bridges, identity integrations and client issues are included.

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.