Which open-source alternative to Microsoft Teams chat fits your situation
If you are facing a Teams renewal, a Microsoft 365 suite change that no longer includes Teams, or a residency rule that rules out a multi-tenant cloud chat service, Mattermost is the most direct self-hosted replacement for the chat workload, Rocket.Chat fits teams that need on-premises, air-gapped or sovereign deployment with a commercial option, and Matrix with Element suits organizations that want federated, interoperable messaging across institutions. Before choosing, confirm which part of Teams you actually depend on, because a chat replacement covers messaging only. Teams is a broader suite that also bundles meetings, calling, file collaboration in SharePoint and OneDrive, and app integrations, and none of the three chat platforms replaces those on its own.
Microsoft introduced Microsoft 365 and Office 365 suites without Teams outside the EEA and Switzerland, effective April 1, 2024, and also offered a standalone Teams license. Existing suites that include Teams are no longer sold to new subscribers worldwide. For a renewal, this means the decision is no longer only about whether to keep Teams inside a bundle, but whether to buy Teams separately, keep a suite that includes it, or move messaging elsewhere. Check the current terms with your Microsoft account team and your reseller, and ask which SKU your tenant holds, which products are bundled with it, and what the renewal date and true-up terms are. Those answers decide how much of your current spend is actually attributable to chat.
Map each Teams function to the platform that will carry it. Ask which channels, private chats, guest access and retention policies your teams rely on, and whether any compliance process depends on Teams message data. Those requirements will decide whether Mattermost Team Edition, which is aimed at teams under 250 users that do not need single sign-on, is enough, or whether you need a paid tier with SSO, directory sync and compliance export. For regulated environments, also confirm whether Rocket.Chat's on-premises, air-gapped or sovereign options, or Element Server Suite's Sovereign edition, match your deployment constraints. Every one of these checks should be written into the scope before a migration starts.
Mattermost, Rocket.Chat or Matrix: which self-hosted chat fits your teams
Each option below replaces Teams chat with software your team runs in its own infrastructure, but the licenses, free tiers and paid features differ enough to change the answer. Read each card against your user count, your need for single sign-on and compliance export, and whether you must run in an air-gapped network. The license terms matter as much as the feature list.
Mattermost Team Edition
Mattermost Team Edition is free, open source, self-hosted and MIT-licensed as compiled by Mattermost, and it targets teams under 250 users that do not need single sign-on. It fits a smaller group that wants Teams-style channels and direct messages on servers it controls. The trade-off is that SSO, AD/LDAP sync, clustering and compliance export sit in paid tiers, so confirm your identity and retention requirements before you choose it. Also check that the source code license, which is AGPL v3.0 for the server, fits your internal distribution practices.
Mattermost paid tiers
Mattermost Entry is the free tier of the commercial build and caps channel message history at 10,000 messages, with no compliance features or high availability. Professional, Enterprise and Enterprise Advanced add SSO, AD/LDAP sync, clustering and compliance export. Ask the vendor which tier includes the features you need before you budget, and ask how the commercial license interacts with the AGPL terms on the server code. Plan for the recurring license cost alongside your own hosting and administration effort.
Rocket.Chat Starter and paid plans
Rocket.Chat code outside its enterprise directories is MIT-licensed, while code under the ee directories uses Rocket.Chat's enterprise license. A free self-managed Starter workspace suits evaluation and small teams, and the Commercial, Government and Defense plans support on-premises, air-gapped and sovereign deployments. Check which features you need sit in the MIT portion and which sit in the enterprise portion, because that split determines what you can run without a license. Ask for the written terms covering support and air-gapped deployment.
Matrix with Element Server Suite
Matrix is an open protocol, and Element Server Suite packages Synapse, the Matrix server, with Element Call. The Community edition is AGPL-licensed, the Pro edition adds Synapse Pro, and the Sovereign edition targets air-gapped deployments. Element relicensed Synapse and Dendrite from Apache 2.0 to AGPLv3 in November 2023, so review how AGPL obligations apply if you modify the server and offer it to users over a network. Matrix suits federated or cross-organization messaging, but expect more operational work than the other two options.
How each Teams chat capability maps to open-source options
This table maps the chat capabilities most organizations rely on in Teams to Mattermost, Rocket.Chat and Matrix with Element. Read each row for the option that covers the capability, the tier or component that may add cost, and what to confirm in your own environment before committing.
| Capability | Open-source options and gaps | What to confirm |
|---|---|---|
| Channels and team structure | Mattermost and Rocket.Chat both provide public and private channels. Matrix rooms cover similar ground but organize differently, so team structure needs a mapping exercise. | Confirm the channel count, naming conventions and whether channels map to Teams teams or to Slack-style workspaces. |
| 1:1 and group chat | All three options support direct and group messaging. Matrix federates these conversations across servers, which Mattermost and Rocket.Chat do not do by default. | Test group size limits and message history on each candidate with a representative user group. |
| Threads | Mattermost and Rocket.Chat support threaded replies. Matrix threading depends on the client and server versions in use. | Verify thread behavior in the client your users will run, including mobile apps. |
| File sharing | All three options handle file uploads. Storage location, size limits and malware scanning depend on the deployment and any added scanning component. | Confirm maximum file size, storage backend and whether antivirus integration is available in your chosen edition. |
| Guest access | Mattermost guest accounts and Rocket.Chat guest users exist, but external collaboration patterns differ from Teams guest access. Matrix federation supports external users without a shared tenant. | Confirm guest permissions, expiry controls and whether guests can be restricted per channel. |
| SSO and directory sync | Mattermost SSO, AD/LDAP sync and clustering are in paid Professional, Enterprise and Enterprise Advanced plans. Rocket.Chat enterprise features sit under its enterprise license. Element offers SSO through its server suite editions. | Confirm which identity protocols you need and whether the free edition meets your sign-in requirement. |
| Compliance export and retention | Mattermost compliance export is a paid feature. Mattermost Entry caps channel message history at 10,000 messages and has no compliance features. Rocket.Chat and Element retention and export depend on edition and configuration. | Confirm retention rules, legal hold needs and export formats with each vendor before procurement. |
| Admin controls | Mattermost Team Edition, Rocket.Chat Starter and Element Community each provide basic administration. Advanced policy, audit and high availability features generally sit in paid editions. | Map each required admin control to a specific edition in writing before relying on it. |
| Meetings, calling and video | Not covered by chat replacement. Teams meetings, calling and recordings need a separate option if you require them, such as a dedicated conferencing platform. | Decide early whether meetings and calling are in scope for this migration or handled separately. |
How to extract Teams message history through the Microsoft Graph Export APIs
The Microsoft Teams Export APIs in Microsoft Graph are the supported way to pull message history out of Teams before you move to an open-source chat platform. They export 1:1 chats, group chats, meeting messages and channel messages, and they also return links to meeting recordings and transcripts. The calls run under application permissions that a Microsoft 365 administrator must approve for your tenant, so the first task is to agree with the admin which permissions the export job will hold and who keeps the credentials after the project ends. Confirm the exact permission names and current API behavior in the Microsoft Learn guide to the Teams Export APIs before you write any code, because the documentation is the authority for scope.
The most important constraint is licensing. The export requires that each user whose content you want has an active Teams license at the time of export. If a license has lapsed, reassigned or been removed during the Teams unbundling, that user's messages may not come back through the API. Build an inventory of users, their license status and their departure dates, and run the export while those licenses are still active. Treat a licensing change as a deadline, not a reminder. Ask your Microsoft account team or licensing partner to confirm which of your current agreements still include Teams, since the April 1, 2024 changes described in Microsoft's licensing news affect which suites carry Teams.
Before you start, confirm three things in your own tenant. First, review the retention policies for Teams chats and channel messages, because content already deleted under a retention rule will not be exported. Second, identify any legal holds, which may require you to preserve and export specific mailboxes or conversations under documented procedures agreed with your legal and records teams. Third, decide where the exported data will sit and who can read it, since message history is sensitive and usually contains personal data. Record the decisions and the export scope in writing, then validate a sample export against what users see in Teams before you load anything into Mattermost, Rocket.Chat or Matrix.
What you give up when you leave Teams and the usual workarounds
Moving off Teams removes more than chat. Meetings, document co-authoring, identity, bots, compliance tooling and vendor support each have to be replaced or rebuilt, and each has its own workaround and its own set of questions to answer before a migration starts.
Meetings, calling and video
Teams bundles voice, video and screen sharing with chat. A self-hosted chat platform does not, so you need a separate conferencing layer. Matrix users may look at Element Call, which Element includes in its free Community edition of Element Server Suite. Jitsi-style options are another route. Confirm whether the conferencing tool supports your required participant counts, PSTN dial-in if you need phone access, recording, and whether it runs inside your network.
Microsoft 365 document co-authoring
Real-time co-authoring in Word, Excel and PowerPoint is tied to Microsoft 365 files in OneDrive and SharePoint. Once chat moves, users lose the inline document experience they rely on. Common workarounds are a self-hosted office suite with collaborative editing, or keeping Microsoft 365 for documents while moving chat. Confirm which editing features your users need, where files must be stored, and how links and permissions behave after the move.
Entra ID native integration
Teams sign-in, group membership and conditional access are built on Microsoft Entra ID. Open-source platforms authenticate through standards such as OIDC or SAML, usually via a broker such as Keycloak that federates to Entra. Confirm which claims and group attributes your platform needs, how provisioning and deprovisioning will run, and whether conditional access policies still apply to the new chat service.
Teams apps, bots and connectors
Teams apps, bots and connectors that post into channels or read data from business systems will not run on an open-source chat server without rework. Mattermost and Rocket.Chat each have their own integration and webhook models, so every app must be rebuilt, replaced or retired. Inventory every app and bot your users depend on, and confirm which ones have an equivalent in the target platform before you schedule cutover.
Purview-style compliance tooling
Microsoft Purview provides retention policies, legal hold, eDiscovery and audit logging across Teams content. Open-source chat platforms offer retention and export features of varying depth, and some of the most useful compliance functions sit in paid tiers. Mattermost, for example, places compliance export in its paid plans. Confirm which retention rules, legal hold capabilities, audit logs and export formats your legal and records teams require, and who will run eDiscovery requests.
Enterprise support and SLAs
Microsoft offers contractual support and service commitments for Teams under its Microsoft 365 agreements. Open-source platforms are supported by their community, by the vendor's commercial tiers, or by an implementation partner under a separate written agreement. Decide which level of response time, escalation path and security patch commitment your organization requires, then confirm in writing what each vendor and partner will provide, and what it costs to keep that coverage running after go-live.
Moving off Teams chat in seven phases
This sequence moves Teams conversations to a self-hosted platform in a controlled order, so history is exported while licenses are still active and users switch in stages rather than all at once. It ends with a documented cutover and a closed Teams access path.
Inventory teams, channels, guests and integrations
Your Teams administrators and channel owners list every team, standard and private channel, shared channel, guest account, meeting series and connected app or bot. Record which channels hold regulated records, which have external guests, and which automations post into them. The working output is a spreadsheet with an owner, a data classification and a keep, migrate or retire decision for each item. Ask your Microsoft 365 administrator to confirm which users hold active Teams licenses, because the export step depends on it. The inventory is done when the business owners have signed off on every row.
Export Teams history while licenses are active
Using admin-approved application permissions, the export runs through the Microsoft Teams Export APIs in Microsoft Graph, which cover 1:1, group, meeting and channel messages and meeting recording and transcript links. Because the APIs require an active Teams license on each exported user, this step must finish before any license is removed or reassigned. Your Microsoft 365 administrator grants the permissions, and your engineers write the export jobs and store the output in an access-controlled location. Confirm the scope and retention terms with your compliance team first. The step closes when every in-scope user's export is stored, checksummed and logged.
Map users, channels and retention rules
Build a mapping from Entra ID identities to accounts on the target platform, and from each Teams team and channel to a target channel or team with the same access model. Decide how private channels, guests and meeting artifacts translate, and set retention and deletion policies on the new platform to match the classifications from the inventory. Your identity team confirms how single sign-on or directory sync will be configured, and your compliance lead signs off on the retention schedule. Note that Mattermost Team Edition is aimed at teams under 250 users without single sign-on, so identity requirements may point to a different edition. This phase is complete when the mapping file and retention policy are approved in writing.
Rebuild integrations and bots
Teams apps, connectors, workflow bots and webhooks do not carry over to a self-hosted chat platform. Your developers list each integration from the inventory, decide whether to replace it with a native integration, a webhook or a custom bot, and rebuild it against the target platform's APIs. Test each rebuilt automation in the pilot environment with test data before any production channel uses it. Plan for business owners to accept gaps where a feature has no equivalent. The phase is done when every retained integration has a tested replacement and a named owner.
Run a pilot group
A small group of volunteer users from a few teams moves to the new platform first, with the mapped channels, rebuilt integrations and retention rules in place. Your support lead gives them a short onboarding guide and a named escalation path, and your security team reviews access logs, authentication events and admin actions during the pilot. Track problems in a single issue list with severity and owner. The pilot ends when the open issues are either fixed or accepted by the business owner, and the security review has no unresolved high-risk findings.
Run the parallel period and cut over
Teams and the new platform run side by side for a period agreed in the plan, with each team told which system holds the authoritative record for its channels. Your administrators then move the remaining teams in waves, freeze posting in Teams for each migrated channel, and point users, bots and documentation at the new location. Keep the Teams export archive available to compliance throughout. The cutover for each wave is complete when the freeze is applied, the new channel is confirmed live, and the business owner has confirmed access.
Decommission Teams access and exports
After the final wave, your administrators remove Teams licenses and app permissions that are no longer needed, revoke the Graph export application, and disable Teams for users who have moved. Verify and record that the export archive is complete, access-controlled and kept under the retention schedule. Update the configuration inventory, access reviews and any compliance evidence that referenced Teams. This step is done when the revocations are logged, the archive has been verified and the Teams-related items on the inventory are closed.
Which open-source chat option fits your residency, cost or customization need
When the main driver is keeping message content inside a specific country, region or data center, the usual fit is a self-hosted server you run in your own cloud account or facility. Mattermost and Rocket.Chat both install on infrastructure you control, and Matrix with Element Server Suite can be deployed the same way, so the residency decision becomes a question of where you host, not which vendor you buy from.
- Hosting location: Confirm which regions your cloud provider or data center can offer, and whether backups, search indexes and logs stay in the same jurisdiction.
- Vendor access paths: Ask each vendor whether support sessions, telemetry or license checks send data outside your environment.
- Federation: Matrix can federate with other servers, so decide whether message traffic may leave your boundary at all.
- Teams data during migration: Exporting from Teams through the Microsoft Graph export APIs moves data into a new store, so the export pipeline needs the same residency controls.
- Editions and features: Check that the edition you need for residency-sensitive features is licensed for your deployment model.
Before choosing, ask which jurisdictions your legal team accepts for stored messages, backups and support access, and document the answer for your assessors.
When licensing cost is the main pressure, the open-source core is free to download and run, so the spend moves to infrastructure, administration and support. Mattermost Team Edition is free and self-hosted, and Rocket.Chat offers a free self-managed Starter workspace for evaluation and small teams. Paid tiers add features such as single sign-on, compliance export or high availability, so the cost comparison depends on which features you actually need.
- Free tier limits: Mattermost Entry caps channel message history at 10,000 messages and omits compliance features and high availability, so check whether that cap is acceptable.
- Team size: Mattermost Team Edition targets teams under 250 users that do not need single sign-on, so larger or SSO-dependent groups will need a paid edition.
- Recurring costs: Hosting, storage, backups, patching and staff time recur every month or year, while migration and setup are largely one-time.
- Support contracts: Ask whether a vendor support subscription, a partner retainer or in-house staff will cover upgrades and incidents.
- Quote inputs: Request a written scope listing users, retention period, integrations, authentication method and hosting model before comparing totals.
Ask each vendor for a price list for the exact features you need, and compare it with your own infrastructure and staffing estimate for the same period.
When the chat product must connect to internal systems, custom workflows or specific authentication, the open-source options differ in how far they can be extended and how much of that extension is free. Mattermost and Rocket.Chat both expose integration points for bots and webhooks, and Matrix offers a protocol-level model that suits bridges to other systems. Customization is where you should expect the most engineering effort, so scope it before you commit.
- Integrations: Confirm which integrations your current Teams setup relies on, because some Slack integrations and similar connectors do not migrate automatically.
- Code licensing: Mattermost source is AGPL v3.0 or commercial, and Rocket.Chat code under its ee directories uses an enterprise license, so modifications may carry obligations.
- Identity: Confirm how each option integrates with your directory, and which features sit behind paid editions.
- Client apps: Check whether you need custom mobile or desktop clients, and who will maintain them.
- Bridges: Matrix bridges can connect to other chat networks, but each bridge needs its own operation and security review.
Write down the three integrations you cannot lose, then ask each vendor which edition supports them and under what license terms your changes would be distributed.
In banking, healthcare, public sector and critical infrastructure, the chat platform becomes part of the evidence set that auditors review. Self-hosting gives you control over configuration, logs and access, but it does not make the platform compliant by itself. Independent auditors assess the controls against the frameworks your organization follows, and the platform is one component inside that assessment.
- Retention and export: Confirm how the platform retains messages, supports legal hold and exports records for review.
- Access control: Verify single sign-on, directory sync and role separation, which may require paid editions.
- Audit logging: Check what events are logged, where logs go and how long they are kept.
- Compliance features: Mattermost places compliance export in paid tiers, so confirm which features your edition includes.
- Assessment scope: Ask your assessor which controls they will test and what evidence they expect from the chat system.
DeployOpen can prepare systems, configurations and evidence for an assessment, but it does not issue audit reports or certifications. Ask your independent auditor to confirm the controls before you rely on any of them.
When the network has no connection to the public internet, the choice narrows to products that run entirely inside the disconnected environment and do not depend on cloud licensing checks. Rocket.Chat lists on-premises and air-gapped deployments among its commercial plans, and Element Server Suite includes a Sovereign edition for air-gapped deployments. Mattermost is self-hosted, but confirm the edition and update process before assuming it fits an isolated network.
- Offline updates: Plan how packages, container images and security patches reach the isolated network through an approved transfer process.
- Licensing: Confirm whether the license requires periodic online validation, and how it is handled offline.
- Dependencies: Map every external dependency, such as push notification services, email relays, identity providers and time sources.
- Federation: Matrix federation assumes network reachability, so decide whether the air-gapped instance stays isolated.
- Media and files: Check how file attachments and voice or video calls work without outbound connections.
Ask each vendor to confirm in writing which air-gapped packages, update methods and license checks apply to your network before you choose.
Questions buyers ask before replacing Microsoft Teams chat
What drives the cost of replacing Teams chat with open-source software?
The software license is usually the smallest line item, because the main open-source options are free to download and run. The recurring costs are the infrastructure that hosts the platform, the staff or partner time to operate and patch it, and any paid edition you choose for features such as single sign-on, directory sync or compliance export. The one-time costs are planning, integration with your identity provider, data export and import, and user onboarding. Cost rises with user count, the number of retained message years, the number of regions you run, and how many integrations you rebuild. Ask any quote to list each of these components separately so you can compare them with your current Teams licensing.
How long does a Teams chat migration take?
The duration depends mainly on the size of the history you must keep, the number of teams and channels, how many users need single sign-on and directory sync, and whether you have a tested export pipeline. Teams exports run through Microsoft Graph and depend on tenant and permission setup before any data moves, so approval cycles can set the pace. Migration into Mattermost or Rocket.Chat also depends on the import path and on how much cleanup the exported data needs. Pilot one team end to end first, then measure export and import time before you commit to a schedule. Ask any proposal for a timeline built from your message volume and identity setup, not a generic estimate.
What do Microsoft 365 admins need to approve for an export?
The Teams Export APIs in Microsoft Graph use application permissions that a Microsoft 365 administrator must grant and approve. Plan for a named service account or app registration, a documented scope that limits which teams and users are exported, and a review of who can read the exported content afterward. Your security team should confirm where the export files are stored, how long they are kept, and how they are deleted. Admins also need to confirm the export does not depend on Teams licenses that will lapse during the project, since Microsoft's documentation states that the exported users need an active Teams license. Confirm each permission and retention step with your Microsoft 365 administrators before work begins.
Can an internal team migrate Teams chat without outside help?
An internal team can do it if it has people who know Microsoft Graph, Linux server administration, identity integration and the target platform's import tools. The hard parts are rarely the software installation. They are mapping users and channels, verifying exported messages, handling attachments, setting retention, hardening the server, and running backups and upgrades on a schedule. Mattermost and Rocket.Chat both document Slack import paths, but Teams data needs its own transformation work before either tool can load it. Assess your team's skills against each step, and compare the cost of the internal time with a fixed-scope engagement from DeployOpen, which plans, implements, hardens and documents self-hosted platforms in your own infrastructure.
How far back can Teams message history be exported?
The Teams Export APIs export 1:1, group, meeting and channel messages, along with meeting recording and transcript links, so the practical limit is what your tenant still holds and what your retention policies allow. Microsoft's documentation describes the export requirements rather than a fixed look-back window, so confirm the exact retention behavior for your tenant with Microsoft before setting a target. Only users with an active Teams license can be exported through this route. Former employees or unlicensed accounts may need a separate review of your retention and legal hold settings. Document the cutoff date you choose and the reason for it.
What does not move when you replace Teams chat?
Several Teams features depend on Microsoft services and will not carry over as-is. Meeting recordings and transcripts can be exported as links, but the meeting experience, calendar integration, app tabs, bots and connectors built on Microsoft 365 need replacements or rebuilding. On the open-source side, Mattermost's documented Slack import excludes integrations, custom emoji images, user groups and Slack Connect channels, and similar gaps should be expected for Teams content. Plan an inventory of every app, bot and workflow that touches Teams, then decide per item whether to rebuild, retire or keep it in Microsoft 365.
Do open-source license terms allow our intended use?
License terms differ by platform and by edition, so check them before you commit. Mattermost source code is available under AGPL v3.0 or a commercial license from Mattermost, Inc., while its Team Edition is described as MIT-licensed as compiled by Mattermost. Rocket.Chat code outside its enterprise directories is MIT-licensed, and code under the ee directories uses its enterprise license. Element relicensed Synapse and Dendrite to AGPLv3 on November 6, 2023, and offers commercial licenses from Element. AGPL obligations can apply when you modify and offer the software over a network, so have your legal team review your plans. Confirm the terms with each vendor and with your counsel rather than relying on this summary.
How DeployOpen scopes and hands over a Teams chat replacement
DeployOpen works from a written scope. Before any work starts, the scope, deliverables and timelines for a Teams chat replacement are agreed in writing, so the client knows what will be built, what will be handed over and what is excluded. For this kind of project, the scope usually has to settle which platform is in play (Mattermost, Rocket.Chat or Matrix with Element), which users and channels are in the first wave, how the Teams Export APIs will be used to pull message history, and who on the client side approves the admin-level Microsoft Graph permissions. Those decisions shape the rest of the engagement, so they belong in the scope document rather than in later conversations.
DeployOpen plans, implements, integrates, hardens, backs up and documents the self-hosted platform inside the client's own infrastructure, whether that is the client's cloud account, a data center or an air-gapped network. In practice that covers the deployment, identity and access integration, retention and backup settings, network controls and the runbooks the client's operations team will use after handover. Because the platform runs in the client's environment, the client keeps control of the hosts, the data and the credentials. Ask the provider to name in the scope which components they will configure and which the client's team will own, and to confirm how the handover is evidenced.
Ongoing support, upgrades and continuous testing are available as a retainer, and DeployOpen does not publish a price list. A quote follows from the written scope, so the inputs that drive cost are the number of platforms and environments, the depth of hardening, the volume and format of history to migrate, and the support level after go-live. When you request a quote, ask for each of these as a separate line item, and confirm whether ongoing support is priced separately from the implementation. DeployOpen is not an official partner, reseller or certified provider of Mattermost, Rocket.Chat, Element or Microsoft, and the scope should say so plainly.

