Matrix for GDPR message retention and erasure: what the platform covers
A controller running a self-hosted Synapse homeserver needs to limit how long chat data is kept and to respond to erasure requests. Synapse retention policies help with the storage limitation principle in Article 5(1)(e) and the default-settings duty in Article 25(2), and the erase flag on account deactivation supports the erasure duty in Article 17. Federation, room history and the rule that Synapse never deletes the last message in a room limit what can actually be removed, so the platform covers less than a simple reading of its settings suggests. DeployOpen plans and configures these controls and prepares the evidence for them. DeployOpen does not issue audit reports or certifications, and the GDPR requires no certificate: the controller remains responsible for compliance.
The first decision is the retention model. A server-wide default policy with a max_lifetime value is the stable option. Per-room m.room.retention policies are experimental, and without either policy no message in a room is ever purged. Confirm with your legal and privacy team which categories of chat data have a defined purpose and period, because the platform applies one lifetime value or a room-level value and cannot reason about purpose. Expect that expired events stop being served to clients at once but may remain in the database until the next purge job runs, and that state events are outside retention. Document these facts in your records of processing so the configured period and the stated period match. The Synapse message retention policies page is the reference to check against your Synapse version.
Erasure on account deactivation is narrower than many requesters expect. The user admin API can mark a user as GDPR-erased with erase: true, after which their messages stay visible to users who were in the room when they were sent and are hidden from users who join later. Plan a written position for this residual visibility, agree it with your data protection officer, and tell requesters what happens to messages in rooms hosted on other servers. Federated copies on remote homeservers are outside your control, which matters for Article 17(2). Confirm your retention and erasure procedure against the current version of the Synapse user admin API before you promise anything in a privacy notice.
Mapping GDPR retention and erasure duties to Synapse settings
This table maps each GDPR duty in scope to the Synapse setting, admin API call or operational step that supports it, and says what the setting does not cover. Read it as a checklist of what Synapse can and cannot do on its own, with the gaps that need a policy, a process or a decision from your team.
| GDPR duty | Synapse mechanism | What it does not cover |
|---|---|---|
| Article 5(1)(e) storage limitation | Server-wide retention policy with max_lifetime under retention in homeserver.yaml, which is stable | Without a retention policy, no message in a room is ever purged, so the setting must be set deliberately |
| Article 25(2) default period of storage | Set a default max_lifetime for the whole server, then add per-room policies only where a shorter or longer period is justified | Per-room m.room.retention policies are experimental, so confirm support in your Synapse release before relying on them |
| Article 17(1) erasure on ground of no longer necessary data | Retention purges messages after max_lifetime; the purge job removes expired events from the database | Expired events are hidden from clients immediately but may remain in the database until the next purge job runs |
| Article 17(1) erasure on request or withdrawal of consent | Deactivate account admin API with erase: true, which marks the user as GDPR-erased | Messages stay visible to users who were in the room when they were sent; new joiners cannot see them |
| Article 17(2) notification of copies | No automatic notification in Synapse; the controller must take reasonable steps with other controllers | Federated servers and bridges hold their own copies, so document how requests reach them |
| State events | Retention does not apply to state events such as membership and room settings | Personal data in state events needs a separate handling decision |
| Last message in a room | Synapse never deletes the last message in a room, even when it has expired | Plan a manual process for rooms that must be emptied, and record the decision |
| Evidence for an assessor | Retention settings in homeserver.yaml, admin API logs and purge job records | Confirm your own retention schedule and erasure procedure with your privacy team |
How Synapse retention and erasure actually remove data
Synapse does not delete chat history on its own. Message retention follows MSC1763, and the server-wide default policy with max_lifetime is the stable mechanism that sets a ceiling on how long messages are kept. Per-room m.room.retention policies are still experimental. Without either policy, no message in a room is ever purged, so a deployment that never configures retention is, in storage terms, keeping everything indefinitely. Before go-live, the controller should write down a retention period for each category of chat data, set it in the configuration, and confirm with its own environment that the setting applies to the rooms it expects. Retention also has limits to plan around: it does not apply to state events, and Synapse never deletes the last message in a room.
Retention works in two steps. When an event expires, Synapse stops serving it to clients immediately, but the row can remain in the database until the next purge job removes it. A reader who needs proof that data is gone should therefore check both the client-facing behavior and the database after a purge cycle, and should confirm the purge job interval and any backup retention with their own operations team. The same caution applies to erasure. The deactivate account admin API, when called with erase: true, marks the user as GDPR-erased. Their messages stay visible to users who were in the room when those messages were sent, and they are hidden from users who join later. That behavior may suit a legitimate need to keep conversation context intact, but it is not full deletion of the content. Before using this option, the controller should decide whether that visibility matches its erasure policy under Article 17, and document the reasoning, since the answer depends on what the chat is used for and who must still see it.
Evidence a Synapse retention and erasure setup produces
A retention and erasure setup is only as defensible as the records behind it. The cards below list the artifacts a compliance or privacy team should be able to pull at any point, from the configuration that sets retention to the notices sent to other controllers. Together they show what the homeserver was configured to do, what it actually did, and who decided it.
Retention configuration under version control
The server-wide retention policy lives in homeserver.yaml, and any per-room policies are stored as room state. Keep the file in a version-controlled repository so every change to max_lifetime, the purge interval or the allowed room scope has an author, a date and a reason. Check that the repository history matches what runs on the production host, because a retention value changed by hand on the server is evidence of nothing. Confirm which policy values are stable in your Synapse release and which depend on experimental features.
Purge job logs
Synapse runs the purge job that removes expired events, and its log output shows when a purge ran and what it processed. Retain these logs with the same rigor as application logs, since they are the main proof that expired messages were removed on schedule. Note that expired events stop being served to clients before the purge job deletes them, so a log entry, not a client view, is the record to rely on. Ask your team how long these logs are kept and whether they are shipped off the host.
Admin API requests and responses
Each erasure should be executed through the deactivate account admin API with erase: true, and the request and response should be saved against the data subject request that triggered it. Record the user ID, the operator who ran the call, the time, and the response status. Without this pairing, you can show that an erasure happened but not which request it answered. Store the captured data in a system that operators cannot silently edit.
Deactivation and erasure records
Keep a register that links each data subject request to the Matrix user ID, the date it was received, the date the erasure was completed, and the outcome. Record the limits that applied to that erasure, such as messages that remain visible to users who were in the room when they were sent. This register is where you show that the response to a request was timely and that the remaining visibility was known and explained. Review the register regularly for requests that stalled.
Retention decisions per room type
Retention periods are a business and legal choice, not a Synapse default. Write down, for each room category such as support channels, project rooms or incident rooms, the period chosen, the purpose it serves, and the reason it is no longer than necessary. Signed decision records make the storage limitation position reviewable and show that the period was set with the principle in mind rather than left at the server default. Revisit each decision when the purpose of the room changes.
Notices to other controllers under Article 17(2)
When chat content was made public or copied to other controllers, Article 17(2) requires reasonable steps to inform them of the erasure request. Keep the notices sent, the recipients, the dates and any replies, and note where a bridge or a federated server holds copies you cannot delete. Be explicit that this evidence supports a compliance assessment, and that independent auditors or supervisory authorities judge whether the steps were adequate. DeployOpen prepares these records but does not issue audit reports or certifications.
GDPR textConfiguring retention and erasure in order
This sequence sets the homeserver identity and federation boundary first, then applies retention periods, tests purge behavior and defines an erasure procedure, so each control rests on a verified foundation and leaves evidence an assessor can review.
Fix server name and federation policy
The platform engineer sets server_name in the Synapse configuration before any user or room is created, because user IDs and room IDs embed this value and it cannot be changed later without rebuilding identities. Decide whether federation stays on, is limited through federation_domain_whitelist, or is disabled with an empty list, and firewall the federation listener as the configuration manual recommends. Done when the running configuration shows the chosen server_name and federation setting, and a test account cannot reach a domain outside the approved list.
Confirm a supported Synapse release
The platform team checks that the Synapse version in use is current enough for its platform floors, including the PostgreSQL and Python minimums in the upgrade notes, and reads every set of upgrade notes between the current and target release. Record the version and the upgrade notes reviewed, because the notes warn that rolling back can be difficult after schema changes. Confirm the target release against the GitHub releases page before deployment. Done when the change record names the version and the notes reviewed.
Decide retention periods by room category
The data protection lead and the business owners classify rooms by purpose, such as support queues, project channels or executive discussions, and assign a retention period to each category based on the purpose limitation and storage limitation analysis under Article 5(1)(e) and Article 25(2). Record the rationale for each period and any legal hold exceptions. Confirm with counsel which obligations apply to your sector before fixing the periods. Done when a signed retention schedule lists each category, its period and its owner.
Set the server-wide retention default
The Synapse administrator sets the server-wide retention policy with a max_lifetime value in the configuration, which is the stable form of the MSC1763 policy. Without a default or a per-room policy, Synapse never purges messages in a room, so this step is required for storage limitation. Note that retention does not apply to state events and that Synapse never deletes the last message in a room, and record these limits in the schedule. Done when the configuration file holds the agreed default and a restart confirms it loaded without errors.
Test purge behavior in a non-production room
The administrator creates a test room on a staging homeserver with the same configuration, posts messages with known timestamps and runs the purge job once the retention period has passed. Verify that expired events stop appearing to clients immediately, while confirming that rows may remain in the database until the next purge job removes them. Confirm the last message in the room survives. Done when a written test record shows the observed behavior matches the retention schedule.
Define the erasure procedure
The identity administrator documents the erasure workflow for a data subject request or an account closure, using the user admin API deactivate account endpoint with erase: true, and assigns who may run it and who approves it. Explain to the requester that erased messages remain visible to users who were in the room when they were sent but are hidden from users who joined later. Confirm the admin token is scoped to this role. Done when the written procedure names the approver, the command or API call and the expected result.
Document federation and room history limits
The compliance lead records where erasure and retention cannot reach: copies held by remote homeservers that joined your rooms, earlier history already replicated to federated servers, and any bridged platforms. Note the GDPR Article 17(2) duty to inform other controllers where data was made public, and decide how your team will handle those requests. Confirm with your legal team whether your federation policy changes this analysis. Done when the limits appear in the record of processing with an accepted residual risk owner.
Record each step as evidence
The compliance lead collects the configuration excerpts, test records, signed retention schedule, erasure procedure, upgrade notes review and federation limits into one evidence folder, with dates and owners. Schedule a periodic review of the schedule and the configuration, and retain the records for independent auditors, who will assess them, since the GDPR itself requires no certificate. Done when an assessor can trace each control from the schedule to the configuration and to a test result.
How a retention purge and an erasure request flow through Synapse
Two paths start at Synapse but end in different places. A retention policy hands expired events to the purge job, which removes them from the database, while clients stop receiving them as soon as they expire. An erasure request calls the deactivate account admin API with erase: true, which hides the user's messages from anyone who joins later but leaves earlier copies visible to members already in the room. The federation boundary is where Synapse's control ends: remote homeservers keep their own copies, so check what each remote server holds before you promise erasure.
Retention purge and erasure paths through Synapse, with the federation boundary marked.
Questions buyers ask about Matrix GDPR retention and erasure
What does a Matrix retention and erasure engagement cost, and what drives the price?
The cost depends on the written scope, which is agreed before work starts. The main drivers are how many rooms and retention categories you need, whether federation is enabled and how far erasure must reach into rooms shared with other servers, how backups are handled and retained, and how many systems such as bridges, SSO or logging hold copies of chat data. Engagements are fixed-scope, so the quote follows from a written list of deliverables. Ask for the one-time items (configuration, verification, runbooks) listed separately from recurring items such as retainer support or upgrades. DeployOpen does not publish a price list.
How long does it take to configure retention and erasure on Synapse?
The duration depends on the scope you agree in writing, including the number of retention categories, the size of the existing message history and how many environments need testing before production. Timelines are set in that written scope and are not guaranteed in advance. Ask the provider to break the schedule into decision points, such as retention sign-off, a staging test of purge behavior and a review of erasure results, so you can see where your own legal and data protection reviews fit.
What must our team provide before a retention project can start?
Your team needs to supply the decisions that no implementer can make for you. These are the retention period for each category of chat data, a data inventory that lists which rooms, user groups and media hold personal data, and the rules for when an account is erased. Your legal or data protection team must review those decisions against your processing purposes and any sector rules. You also need named owners for approvals, access to a staging homeserver, and a clear view of which backups must follow the same deletion rules.
Can our own team configure Synapse retention and erasure using the Synapse docs?
Yes, a competent operations team can read the Synapse message retention and user admin API documentation and apply the settings themselves. The hard part is not the configuration keys but the decisions behind them and the testing. Retention does not touch state events, expired events can remain in the database until the next purge job, and the last message in a room is never deleted. Federated rooms keep copies on other servers that you do not control. If your team lacks time to test these edge cases in staging, a fixed-scope engagement can cover that verification work.
Does configuring Matrix retention make us GDPR compliant?
No. The GDPR does not issue certificates for software, and no configuration makes an organization compliant on its own. Compliance is the controller's responsibility, which means your organization must decide the lawful basis, retention periods, data subject request handling and transfer assessments. DeployOpen prepares systems, settings and evidence for your compliance review, but it does not issue audit reports, attestations or certifications. Independent auditors and supervisory authorities make those judgments.
What should a quote for this work include?
A useful quote lists the scope in writing: the homeserver versions and environments covered, the retention categories and the rooms or spaces each one applies to, whether federation is enabled and how it is restricted, the erasure procedure for deactivated accounts, backup handling, and the test cases used to verify purge and erasure behavior. It should name the deliverables, such as configuration, runbooks, a verification report and handover, and state what the client must provide and approve. Ask for separate pricing for one-time work and any recurring retainer for upgrades, and confirm how changes to scope are documented and priced.
How does federation limit what erasure can achieve in Matrix?
Erasure on the local homeserver does not remove copies held by other servers. The Synapse user admin API can mark a user as GDPR-erased, after which their messages remain visible to users who were in the room when they were sent but are hidden from users who join later. Rooms shared with remote servers therefore keep copies you cannot delete. Engineers should confirm this behavior in their Synapse version, decide whether federation is needed for the data in question, and document the residual exposure in the record of processing so the controller can explain it.
How DeployOpen scopes and delivers Matrix retention and erasure work
DeployOpen plans and builds the retention and erasure setup for a self-hosted Synapse homeserver inside infrastructure you control. We start from your processing purposes and the rooms your teams use, then configure, test and document the controls so your privacy and security reviewers can check how chat data is kept and erased.
How we scope
- Engagements are fixed-scope, with the retention periods, erasure procedure and federation boundaries agreed in writing before work starts.
- We map which rooms, data types and purposes need different retention periods, and record the lawful basis reviewed by your privacy team.
- The written scope states which Synapse settings, admin API procedures and runbooks are in scope, and which federation or room history limits remain open.
How we build
- We configure the server-wide retention policy and confirm how the purge job behaves on your Synapse version before any data is removed.
- We test account deactivation with GDPR erasure on a staging homeserver, checking what remains visible to members who were in each room.
- We run security testing on the admin API and access paths that perform erasure, so only authorized operators can trigger it.
How we hand over
- You receive the configuration, an erasure runbook and a record of test results that your compliance and security teams can review.
- The documentation states plainly what erasure does not reach, including copies on federated servers and history already seen by room members.
- We walk your operators through the procedure so they can run retention checks and erasure requests without DeployOpen involved.
How we support
- Ongoing support, Synapse upgrades and continuous testing are available as retainers after handover.
- Upgrade notes are read against the retention and erasure configuration before each planned Synapse upgrade, with the test set rerun.
- Retainer scope, response arrangements and review cadence are agreed in writing, and DeployOpen prepares evidence but does not issue audit reports or certifications.

