Auditing encrypted Matrix rooms for compliance

Encrypted Matrix rooms keep message content from the homeserver, so compliance teams must choose where auditable copies come from. This page explains the options, trade-offs and the work involved.

On this page

Auditing encrypted Matrix rooms for compliance starts with where the records come from

A regulated firm that runs Matrix must keep records of staff communications and supervise them, but once rooms are end-to-end encrypted, the homeserver cannot read message content. The homeserver holds ciphertext, so audit evidence has to come from a client, a compliance component or a bridge. That single choice shapes the rest of the design: which events are captured, where they are stored, who can read them, and how long the copies must be kept. Decide it before you pick clients or write retention rules, because a design that assumes server-side archiving of message text will not work in encrypted rooms.

Start by listing the duty types your legal and compliance teams have in scope, such as record-keeping, supervision of staff messages, or the ability to produce communications on request. Keep that list in general terms and have counsel map each duty to the regulatory text. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not interpret the regulation, and it does not issue audit reports or attestations. Independent auditors and the relevant regulators make those determinations, so the reader should confirm the requirements directly with their own counsel and assessors.

Then ask three questions of each candidate source. Does it see plaintext messages, or only metadata such as room membership, timestamps and event types? Who controls the keys or the device that decrypts? And what happens when a user loses a device or leaves the organization? Each answer determines whether the evidence is complete, whether it is accurate, and who must be involved in an access request. Write these answers down as part of the scope, and confirm with your Matrix and compliance vendors how each candidate component handles them in your version and configuration.

Three ways to capture auditable copies of encrypted chat

A server-side archive copies the events the homeserver already stores. In an encrypted room, the message content in those events is ciphertext, so the archive holds payloads the operator cannot read on its own. A reviewer sees the structure of the conversation and must obtain keys from somewhere else before message text becomes visible.

  • What it captures: event envelopes, sender, room, timestamps and the encrypted content of each event.
  • Who holds keys: the users' own devices hold the message keys. The homeserver and the archive hold none of them, unless a user has created a server-side key backup, which is encrypted with a recovery key the server does not hold.
  • What the reviewer can read: room-level metadata for every conversation, and message text only after decryption with keys obtained from a device or a backup that the user or an authorized process unlocks.
  • Operational points: how the archive treats redactions and edits, whether raw events can be exported in a usable form, and how long copies persist.

Confirm with your records owner whether an archive of unreadable content meets your record-keeping duty, and whether the archive has a documented way to supply readable content to a regulator within the required time.

Which audit approach fits which compliance duty

This table compares three ways to keep a record of Matrix conversations: server-side archiving, Element's commercial in-room auditing (to be confirmed with Element), and a custom bridge or bot that decrypts content. Read each row against the duty you must meet, because the approaches differ most in what they capture and whose devices hold the keys.

AspectServer-side archivingElement in-room auditing (confirm first)Custom bridge or bot that decrypts
What is capturedEvents the homeserver stores, which for encrypted rooms is ciphertext plus metadata such as sender, room and timingPlaintext of messages in encrypted rooms, as the vendor's auditing feature defines it (confirm scope, retention and export format)Whatever the bot is joined to decrypt, limited to rooms where it holds the session keys
Where keys liveNot on the server; the homeserver cannot decrypt Megolm sessions for archived messagesConfirm with Element whether auditing components hold keys or receive decrypted copies, and where they runOn the bot's own device, which must be verified and trusted by the room members
Effect on user privacyLowest content exposure; users see metadata retention but message bodies stay unreadable to the archiveHigher exposure of message content by design; users and works councils should be told before rolloutHigh exposure, since any compromise of the bot exposes every decrypted room it joins
Operational loadStorage growth and retention jobs; decryption tooling is not needed, so day-to-day effort stays lowDepends on licence, deployment and integration with ESS; confirm support, upgrades and admin effort in writingOngoing work on bot code, key handling, device verification, upgrades and monitoring for every room it joins
Compliance duty it helps meetRecord-keeping for metadata and for unencrypted rooms; does not prove message content was supervisedSupervision or record-keeping of message content where policy requires it, subject to your legal reviewSpecific supervision workflows that need content, if you can justify the access in your policy and records
Evidence an assessor will ask forRetention settings, archive access logs, and documented decisions on what is excludedConfiguration, access policy, export samples and the licence terms that cover the featureBot design, key custody records, access reviews, change history and the approval for decryption
Main failure pointStaff assume the archive holds readable messages and cannot produce them when askedAuditing is enabled for some rooms but not others, leaving gaps in coverageKeys are copied, shared or left on an unmanaged host, creating an unaccountable access path
What to confirmRetention and deletion behavior for ciphertext and metadata in your Synapse versionWith Element: feature name, licence tier, where data is processed, key location, export format and support termsWho approves decryption, how keys are rotated and revoked, and whether the bot needs MSC4190 support under MAS

How to set up an encrypted-room audit design

This sequence turns a record-keeping or supervision requirement into a documented design for encrypted Matrix rooms, with a chosen capture method, a tested deployment and an evidence trail an assessor can follow. It runs before any production rollout.

  1. Map which chats fall under obligations

    Compliance and legal leads list the chat types in scope, such as client conversations, trading or advisory channels, support queues and internal groups, and name the rule or policy that applies to each. Platform engineers record which rooms exist today, who creates them and whether they are encrypted. The output is a scope register that names each room class, its obligation and its owner. You know this step is done when every room class has a named obligation and a sign-off from the compliance owner.

  2. Decide the encryption default for each room class

    Using the scope register, the team decides which room classes must be encrypted and which may stay unencrypted, then records the reason. Encryption by default for new rooms is configured separately, and the sibling topic on turning on encryption by default for Synapse rooms explains the options and their effect on bots, bridges and public rooms. The output is a room policy table linking each class to an encryption setting. You know this step is done when the table is approved and every room class has a stated setting.

  3. Select the capture method

    Compare the two routes the design can take. Server-side archiving can only capture unencrypted content and metadata, because the homeserver never holds the keys for encrypted messages. In-room auditing from a commercial component, such as Element's offering, works inside the client or room and must be confirmed against the scope register. Ask the vendor in writing which content, metadata and retention behavior it covers, where captured data is stored and who can read it. The output is a written decision record. You know this step is done when a reviewer can explain why the chosen route meets each obligation and where its limits lie.

  4. Deploy the chosen component in your infrastructure

    Platform engineers install the selected capture component on infrastructure you control, alongside the homeserver and its database. They configure storage location, access roles, retention settings and network paths, and keep audit data separate from ordinary application logs. If the design depends on identity, Matrix Authentication Service and SSO configuration are covered in the identity topics and should be completed first. The output is a running deployment with a documented configuration. You know this step is done when the component starts cleanly, its settings match the decision record and its admin access is limited to named roles.

  5. Test with staff accounts and a sample room

    Create a sample encrypted room and a few staff accounts that represent the roles in scope. Send messages from each account, including a message from a new device, a message after a key rotation and a message in a room where a member has left. Check what the capture component records, what the homeserver stores and what a reviewer can actually read. Record every gap, such as missing events, unreadable content or delayed capture. The output is a test report with pass or fail results. You know this step is done when every scenario in the register has a recorded result and each gap has an owner and a fix.

  6. Document the evidence trail

    Write a short procedure that explains how a reviewer requests records, who approves access, how exports are produced and how their integrity is protected. Map each step to the obligation it supports, and keep the wording plain enough for an assessor or regulator's reviewer to follow. Include what the design cannot show, such as content of messages that the capture method does not reach. The output is an evidence runbook and a limitations statement. You know this step is done when a staff member who did not build the design can produce a sample export by following the runbook alone.

  7. Review the design with compliance and counsel

    Compliance, legal and security leads review the scope register, decision record, test report and runbook together. They confirm that the design matches each obligation and that the stated limits are acceptable to the people who own the risk. Any open gap is either fixed, accepted in writing or routed to a change request. Independent auditors or regulators make their own determinations, so the review produces readiness evidence, not a certification. You know this step is done when each open item has a written decision and the design is approved for production use.

How messages reach an audit store in each design

The diagram starts at the sender's client, which encrypts each message before it leaves the device. The homeserver stores only ciphertext, so a server-side archive receives unreadable data. Plaintext first exists inside the client, where an in-room audit component can read it, and inside a bridge or bot that holds the keys. Check where each branch decrypts, who holds the keys, and whether the audit copy is made before or after the message is encrypted.

Each audit design decrypts at a different point, and only some hold plaintext.

Security and key-custody risks in audit designs

An audit design for encrypted Matrix rooms creates new stores of readable data and new access paths. The cards below cover the risks that follow from that design choice, and each one has a check you can run before records are collected.

Decrypted copies become a high-value store

Any audit capture that decrypts messages creates a second, readable copy of conversations that the end-to-end encryption was meant to protect. This copy usually sits in a log, export or review database with weaker controls than the original rooms. Ask where the decrypted output is written, who can query it, and whether it is encrypted at rest with its own key.

Audit keys need control and logging

The key material that lets an audit tool read history is the most sensitive secret in the design. It should live in a managed secrets store with named custodians, rotation and an access log that records each use. Confirm that no one can export or copy the key without a second approval and an entry in the log.

Reviewer access needs limits and regular review

Reviewers should see only the rooms, time ranges and users their supervision role covers. Grant access through named roles in your identity provider, not shared accounts, and remove it when a reviewer changes roles. Schedule a recurring access review that compares the reviewer list with current HR and supervision records.

Retention rules must match policy

Record-keeping duties set how long audit records must exist, and data protection rules set how long chat content may be kept. The audit store needs its own retention schedule, and deletion must be tested so that expired records are removed on time. Write the retention period into policy first, then configure it, rather than letting storage defaults decide.

Device loss can make history unreadable

If a user loses every device and has no key backup, the encrypted history in their rooms may become unreadable, including for the audit. Planning for this means server-side key backup, recovery keys held by the user, and a help desk process that verifies identity before any recovery step. Test the recovery path with a lost-device scenario before you rely on it.

Audit tooling needs hardening and patching

The bot, export service or review interface that handles decrypted content is an application like any other and needs the same controls. Keep its packages and container images patched, restrict its network exposure, and include it in your vulnerability scans and penetration tests. Ask the vendor or integrator for its update process and the list of components it depends on.

Questions teams ask before auditing encrypted Matrix rooms

Can server-side archiving read encrypted Matrix messages?

No. In an end-to-end encrypted Matrix room, the homeserver stores and relays ciphertext. Message content is encrypted on the sender's device with keys that the server never receives, so a server-side archive holds encrypted events it cannot decrypt. The server still sees metadata such as room membership, timestamps, event types and which devices exist, so an archive built on the server can prove that communication happened and when, but not what was said. Plan for that gap before choosing an approach, because a regulator asking for message content will not accept metadata as a substitute.

What drives the cost and effort of an encrypted room audit design?

The main drivers are the number of rooms and room types, how many people hold supervision duties, whether bridges or bots join encrypted rooms, and how many identity systems feed the homeserver. Each additional source of records, such as a separate archive, a bridge or a client export tool, adds design and testing work. Cost is mostly one-time design, configuration and testing, plus recurring review as the homeserver, clients and policies change. Ask any provider for a written scope that lists the room inventory assumed, the record types captured, the retention rules applied, and what the client must supply.

How long does an encrypted room audit deployment take?

No duration has been established for this work, so none should be assumed. Timing depends on the scope agreed in writing, including how many rooms and policies are in play, whether the homeserver already runs in production, and how quickly the client's policy owners make decisions. Ask for a timeline with named milestones, client dependencies and a retest or review step, and confirm whether the schedule covers a pilot before wider rollout.

What does the client need to provide for this work?

The work depends on decisions that only the client can make. Expect to provide named policy owners who define record-keeping and supervision rules, a room inventory that lists which rooms exist, their purpose and their members, and decisions on identity and device management, such as which SSO provider signs users in and how device verification is handled. Also name who will receive and act on audit access, and who approves retention periods. Missing decisions in these areas are the most common reason an audit design stalls.

Can our internal team design and run encrypted room auditing without a partner?

Often yes, if the team already runs Synapse or a comparable homeserver and has the policy owners engaged. The skills needed are homeserver administration, identity integration, logging and retention design, and a clear understanding of what the chosen approach can and cannot capture. Teams without that background usually need external help for the design and for testing that the records answer the questions regulators and internal reviewers ask. Compare the internal effort with a written, fixed scope from a partner, and weigh who will maintain the design after handover.

Does DeployOpen's work count as a compliance audit or certification?

No. DeployOpen plans, implements, tests and documents the controls and evidence that a compliance assessment examines, but it does not issue audit reports, attestations or certifications. Those come from independent auditors, assessors or certification bodies that the organization or its regulator recognizes. Ask your assessor early which evidence they expect to see, and agree the format of that evidence before the design is finalized so it can be produced without rework.

Which records should an encrypted room audit capture?

Engineers usually start by separating the record types. Membership changes, room creation, device and key verification status, and retention settings can often be captured from the server and identity logs, while message content must come from a point where it is still decrypted, such as an approved client, a bridge or a commercial in-room auditing feature. Confirm with the vendor and the policy owners which of these your chosen product supports, and test a sample room end to end before relying on it for supervision duties.

What a scoped audit-design engagement covers

A scoped audit-design engagement covers the decisions this page describes, carried through to a working setup in the client's own infrastructure. DeployOpen plans and implements the chosen capture approach, whether that is a compliance-controlled client or bot, a server-side archive of rooms the organization owns, or a combination, and it prepares the configuration and evidence that the compliance team and external assessors will ask for. That usually means the room and retention policy as written configuration, the access model for who may read captured records and under what approval, the logging of those reads, and a description of which rooms and users fall inside the capture boundary. Where the setup relies on a commercial Element product for in-room auditing, the engagement records which features are in use and confirms their licensing with Element before anything is promised to a regulator.

Testing comes before handover. DeployOpen tests the setup against the scope written for the engagement: that the capture path works in encrypted and unencrypted rooms, that the boundary matches the policy, that archived content is retained and retrievable, and that access to captured records is restricted and logged. The findings, fixes and retest results form part of the deliverables. Engagements are fixed-scope, so the scope, deliverables, the systems covered and the acceptance checks are agreed in writing before work starts. Quotes follow from that written scope. Ask for the quote to list each system, each capture path, each test and each document handed over, and to say which items are one-time and which need recurring support, such as keeping the capture component current with Matrix releases.

How DeployOpen scopes and supports Matrix audit designs

DeployOpen plans, implements and documents self-hosted open-source platforms inside your own infrastructure, including the Matrix homeserver and the controls around it. For encrypted rooms, we scope which records your compliance team can actually obtain, build the retention and export path you choose, and hand over evidence your auditors can review.

How we scope

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • We confirm which rooms, user groups and retention periods your record-keeping duties apply to.
  • We document which message content, metadata and device data the server holds, and which it cannot read.

How we build

  • We configure the server-side retention, export and access settings that your chosen audit design requires.
  • We test whether approved compliance access works in encrypted rooms before any staff rely on it.
  • We set access control, audit logging and admin permissions so reviews of archived data are themselves recorded.

How we hand over

  • You receive written documentation of the audit design, data flows, roles and the decisions behind them.
  • Runbooks cover staff onboarding, key recovery requests, export procedures and review of archived records.
  • We prepare control descriptions and evidence for your compliance team, without issuing any audit opinion.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers for the Matrix estate.
  • We retest audit and export paths after Synapse, client or bridge upgrades change how data is stored.
  • We review new rooms, bridges and bots against the audit design so coverage does not silently shrink.

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.