Matrix for NIS2 secured emergency communications

A self-hosted Matrix homeserver can support the NIS2 Article 21(2)(j) measure for secured voice, video and text communications, including a fallback channel that survives an incident. It does not make an entity compliant on its own, and the gaps need to be planned for.

On this page

How Matrix helps meet NIS2 Article 21(2)(j) secured communications

If your organization is an essential or important entity under NIS2, a self-hosted Matrix homeserver can support the secured communications part of Article 21(2)(j), but it cannot satisfy the measure on its own. Article 21(2)(j) asks for multi-factor or continuous authentication solutions where appropriate, secured voice, video and text communications, and secured emergency communication systems within the entity. Matrix covers the messaging and some of the calling elements, while identity, device management, call infrastructure and the emergency procedure remain your responsibility. NIS2 is a directive that sets outcomes and creates no certificate of compliance. National competent authorities check compliance through inspections, security audits, scans and information requests, so you need evidence that your setup meets the outcome.

Break the measure into its three parts and assign each one a component. For authentication, Synapse can delegate sign-in to an upstream provider through oidc_providers, or you can run the Matrix Authentication Service with an identity provider that enforces multi-factor sign-in. Confirm which factors your identity provider enforces and whether the setup satisfies the "where appropriate" test for each user group. For secured text and voice, confirm that end-to-end encryption is on by default for the rooms you use, that federation is limited to partners you have approved, and that calls run through a TURN server and call services you operate. For emergency communication systems, decide which rooms, accounts and contact paths form the channel and who can use them when the main identity or network path is unavailable.

Be clear with your auditors that the Matrix server is one control within a wider risk-management program covered by Article 21. Document the scope, the owners and the tests that show the channel works, including a periodic check that users can reach the emergency rooms from outside the corporate network. National transposition laws may add detail, so confirm with your competent authority which evidence they expect. The NIS2 Technical Implementation Guidance from ENISA gives non-binding examples of evidence that you can use as a starting point.

Mapping Article 21(2)(j) to Synapse, MAS and ESS settings

This table maps each part of NIS2 Article 21(2)(j) to the Synapse, MAS and Element Server Suite settings that address it, with the configuration each one needs. Read it as a starting checklist for evidence, and confirm each setting against the documentation for the versions you deploy.

Article 21(2)(j) elementMatrix capability to configureConfiguration to plan and evidence
Multi-factor or continuous authentication, where appropriateSingle sign-on through an identity provider, with MFA enforced at the providerSynapse oidc_providers or saml2_config, or MAS with an upstream OpenID Connect provider such as Keycloak, Microsoft Entra ID or Authentik; confirm that MFA policy lives at the upstream provider
Multi-factor authentication for SAML-only estatesMAS does not support SAML directlyPlan a bridge such as Dex in front of MAS, and confirm which factors the bridge and SAML identity provider enforce
Secured text communicationsEncrypted rooms and transport security on every client connectionEnforce TLS at the reverse proxy for client and federation traffic; confirm default encryption behavior for new rooms against your policy
Secured voice and video communicationsCalls through Element Call, which depends on TURN for one-to-one calls and on LiveKit and the authorization services for group callsSet up TURN, LiveKit and the Synapse prerequisites as described in the Matrix voice and video calls group before testing call paths
Secured emergency communication within the entityRooms for crisis teams on a homeserver that keeps identity and history inside your infrastructureLimit federation with federation_domain_whitelist, or disable it with an empty list, and firewall the federation listener
Fallback channel that survives an incidentSeparate homeserver, network path and identity dependency for emergency useConfirm whether the fallback depends on the primary identity provider, DNS or storage, and document a tested login path
Operational evidence and change controlUpgrade notes, backups and admin access logsRecord Synapse release, PostgreSQL and Python floors, backup restore tests and admin API access reviews for assessors

Designing a fallback channel that survives an incident

The emergency channel must not depend only on the primary Matrix deployment. If the homeserver, its database, the identity provider used for sign-in, the network path or the cloud region fails, a fallback that shares any of those components will fail with it. The design question is therefore which dependencies the fallback can avoid. Map each layer of the primary system (DNS and delegation, reverse proxy, Synapse and its workers, PostgreSQL, Redis, media storage, the upstream identity provider behind Matrix Authentication Service, and the hosting account) and mark which ones the fallback shares. Where a layer is shared, decide whether that sharing is acceptable for the incident types your NIS2 risk assessment covers, and record the decision.

A practical pattern is a second homeserver in separate infrastructure, such as a different cloud account or a data center you control, with its own database and its own TLS and DNS path. A warm standby that is restored from backups on a schedule is cheaper to run but takes longer to become usable, so ask your partner or team to state the restore time they have tested rather than the one they expect. Keep break-glass accounts local to the fallback, protected by hardware-backed credentials held by named officers, and confirm that they can sign in when the primary identity provider is unreachable. Keep an out-of-band contact list (phone numbers, a signed-out copy of room membership and a runbook) stored outside both Matrix systems.

Do not plan around a quick Synapse rollback. The Synapse upgrade notes warn that reverting can be difficult because database schema changes accumulate between releases, so a bad upgrade may force a restore from backup rather than a downgrade. Treat each upgrade as one-way, take a database backup before starting, and test the restore procedure on the fallback at the same version the primary runs. Confirm with your Synapse vendor or partner which upgrade notes apply to your version, and make the fallback's Synapse version a planned step rather than an automatic copy of whatever the primary is running at the moment of failure.

Evidence to keep for NIS2 supervisors and auditors

A competent authority or assessor will ask to see how the Matrix setup is configured, who changed it, and whether it was tested. The cards below cover the records that connect the secured communications measure to the running homeserver. NIS2 creates no certificate of compliance, so these records support an inspection rather than replace one.

Configuration under version control

Keep homeserver.yaml, MAS configuration, reverse proxy and TURN settings in a Git repository with reviewed commits. Each change should name its author, reviewer and the reason, so an inspector can see when federation_domain_whitelist or registration settings changed. Check that secrets stay out of the repository and that the deployed configuration matches the committed version. Store the repository in infrastructure the organization controls.

Synapse configuration manual

SSO and MFA settings from the identity provider

Export the identity provider configuration that Matrix Authentication Service or Synapse relies on, including the upstream OpenID Connect client settings and the MFA policy applied to the Matrix client. Record which groups may sign in and how accounts are disabled when staff leave. Ask the identity team to confirm that MFA enforcement is applied at the provider, since the homeserver only inherits it. Keep dated screenshots or exports for each review period.

MAS upstream providers

Federation and registration settings

Document the federation policy in force on each date, including whether federation is disabled, limited to a listed set of domains, and whether the federation listener is firewalled. Show that open registration is off and that account creation goes through the identity provider. Pair each setting with a test result from outside the network showing that unlisted servers cannot reach the homeserver. Re-run the test after every change.

TURN and call configuration records

Emergency coordination depends on voice and video working when the main systems are stressed. Record the TURN server version, its listening ports, credential lifetime and the Synapse settings that point clients to it. Keep the test results from one-to-one and group calls on the networks staff will actually use, including a mobile connection. Note which call services are hosted in your infrastructure and which depend on an external provider.

Backup and restore test records

A backup is only evidence once a restore has been performed. Keep dated records of PostgreSQL backups, media store copies and the restore exercise, including the time taken, the Synapse version used for the test and the people who checked the result. Synapse upgrade notes warn that rolling back can be difficult because of schema changes, so record the restore tests against each release you run. Store test records where the continuity plan can reach them during an incident.

Upgrade notes reviewed per release

For every Synapse and MAS release you deploy, keep a dated review of the upgrade notes, the platform floors that apply (such as PostgreSQL and Python minimums) and the decision taken. Synapse drops support for Python and PostgreSQL versions once they reach upstream end of life, so record when those floors will bite. Name the engineer who prepared the review and the approver who accepted the upgrade. Retain these notes alongside the patch record for the same period.

Admin API access logs and sign-off

Keep reverse proxy and Synapse logs that show which administrator called the admin API, when, and from which address. Restrict access to the admin endpoints and review the logs on a set schedule, with the reviewer named in the record. Assign one accountable owner for the evidence pack who signs off each quarter, and state that the sign-off is an internal control record rather than an audit opinion. Ask an independent assessor to test the pack before it is relied on in a supervisory request.

Configuration sequence for a NIS2-aligned Matrix deployment

This sequence turns a self-hosted Matrix homeserver into a secured communications service with controlled federation, central sign-in, working calls and a fallback path, with each step closed by a check the team can record as evidence.

  1. Fix server name and delegation first

    The platform team sets the server_name value in the Synapse configuration and decides how clients and federation peers reach the server. Matrix user IDs such as @user:example.com are derived from server_name, so changing it after users exist is disruptive and should be treated as a one-time decision. Delegation, if used, is configured so that the identifier domain can be served from a separate host on port 443 while federation traffic uses port 8448 by default. The step is complete when the team has a written naming plan, the DNS and well-known records resolve from outside and inside the network, and a test client can reach the server by its public name.

  2. Deploy PostgreSQL and the homeserver

    The platform team installs PostgreSQL and the chosen homeserver, normally Synapse for the most documented route, and points Synapse at the database. Synapse recommends PostgreSQL for production, and the upgrade notes set minimum database and Python versions that must be confirmed against the release being installed. Database credentials, the media store and the listener set are configured now, and the homeserver is kept off any public listener that does not need one. The step is complete when the server starts cleanly, a local account can send a message and the database backup target is known.

  3. Set the federation policy

    The security owner and the platform team decide whether the homeserver federates at all. Synapse disables federation when federation_domain_whitelist is an empty list, and it restricts federation to listed domains when the list is populated. Each partner domain added to the list should be approved in writing and recorded with its purpose. The federation listener is also firewalled to the approved peers, as the Synapse documentation recommends. The step is complete when a test from an unlisted domain is refused and the approved list is stored under change control.

  4. Connect single sign-on through OIDC

    The identity team connects users to an OpenID Connect provider. For new deployments, Matrix Authentication Service is the route the project describes for OIDC-based authentication, with upstream providers such as Keycloak, Microsoft Entra ID, Google or Authentik. Synapse can also use oidc_providers directly, and SAML or CAS are available in Synapse, although MAS does not support SAML directly and recommends a bridge such as Dex. Local password registration is turned off so that every human account has a single authoritative identity. The step is complete when a new user signs in through the provider and no local sign-up path remains open.

  5. Enforce multi-factor authentication at the identity provider

    The identity team configures multi-factor authentication on the upstream provider, not inside Matrix, so that the same control applies to every service that uses that identity. NIS2 Article 21(2)(j) asks for multi-factor or continuous authentication solutions where appropriate, so the team records which method applies to which user group and how exceptions are approved. Administrator and service accounts are covered by stronger or separate controls. The step is complete when a sign-in test without the second factor fails and the policy export is kept as evidence.

  6. Configure TURN and Element Call for voice and video

    The platform team sets up a TURN service so that one-to-one calls work across restrictive networks, then deploys the call components that Element Call needs, including the LiveKit and authorization services and the Synapse prerequisites. Voice and video are part of the secured communications measure, so the team tests calls from inside the office, from a remote network and across a federated peer if federation is enabled. The step is complete when a call connects in each test path and the call services are listed in the system inventory.

  7. Build and test the fallback server

    The continuity team deploys a second communications path that does not depend on the primary homeserver or its identity provider, so that staff can still coordinate during an incident. Options include a separately hosted homeserver on different infrastructure, with its own accounts, or a non-Matrix channel listed in the emergency plan. The team defines who can switch to it, which contacts are preloaded and how accounts are kept current. Failover is rehearsed by taking the primary offline and confirming that the named groups can reach each other. The step is complete when the rehearsal result, the switch-over decision owner and the account refresh schedule are written down.

  8. Document and test backups and restores

    The operations team defines what is backed up: the PostgreSQL database, the media store, signing keys and configuration files. Restores are then performed into a separate environment and checked for user login, room history and media access. Because database schema changes between Synapse releases can make rollback difficult, backups must be taken before each upgrade. The step is complete when a restore has succeeded on a recorded date, the restore time observed is noted in the runbook, and the backup owner has signed the procedure.

  9. Set a supported-version upgrade routine

    The platform team agrees a routine in which every Synapse release is read against its upgrade notes before it is applied in staging. The team confirms that the installed Python and PostgreSQL versions still meet the floors stated in those notes, and that they are within upstream support, because Synapse drops support for versions past upstream end of life. Each upgrade is logged with the version, the notes reviewed and the test results. The step is complete when the first routine upgrade has been run in staging, a rollback point exists and the routine is included in the change calendar.

Choosing between Synapse, ESS and a partner-run deployment

Running Synapse directly on infrastructure you control gives the most direct ownership of configuration, logs and data location. Your team installs the homeserver, chooses PostgreSQL and Redis, sets the server name, and writes the reverse proxy and federation rules. Synapse is distributed under AGPL-3.0, so the software itself carries no license fee, but the work of operating it is paid for in staff time and in whatever support contract you buy separately.

  • Skills required: Staff must understand Python service management, PostgreSQL administration, reverse proxies and worker scaling if load grows.
  • Upgrade effort: Your team reads each set of upgrade notes, applies database changes and handles rollback limits, which the upgrade notes describe as difficult after schema changes.
  • Platform floors: Recent releases require PostgreSQL 14 or newer and Python 3.10 or newer, so OS and database lifecycles must be planned with the homeserver.
  • Evidence ownership: Your team holds configuration, logs and runbooks directly, which simplifies showing controls to a competent authority.
  • Incident availability: Support depends on your own on-call rota, so a fallback channel must be tested independently.

Before choosing this route, confirm whether your team can sustain upgrades on a fixed schedule and who is accountable when an upgrade fails during an incident.

Questions buyers ask about NIS2 and self-hosted Matrix

Does a self-hosted Matrix server meet NIS2 on its own?

No. NIS2 does not certify products or servers, and a Matrix homeserver is one component of the measures an entity must run. Article 21(2)(j) asks, where appropriate, for secured voice, video and text communications and secured emergency communication systems, but the wider Article 21 risk-management duties still apply. National competent authorities oversee compliance through inspections, security audits, security scans, information requests and administrative fines (Articles 32 to 34 of Directive (EU) 2022/2555). Ask your national competent authority or legal counsel how your transposition law applies to your entity, and use the ENISA technical implementation guidance to map evidence for your own controls.

How much effort does a NIS2 emergency Matrix deployment take?

Effort depends mostly on the number of users, whether you need federation, how many calls you run, and how much identity and logging integration is required. The main work items are the server name and delegation design, PostgreSQL, a reverse proxy, identity via OIDC, SAML or CAS, call infrastructure, backups, and a tested fallback channel. Each item adds design, build and test work, and each recurs as upgrades arrive. No supplied source gives a person-day figure, so ask any vendor to break its quote into these items with stated assumptions for user count and integrations.

How long does a secured Matrix rollout typically take?

The timeline is set by the scope you agree in writing, your change approval process, and the readiness of your identity provider and infrastructure. Identity integration, network exposure decisions and testing of the fallback channel usually take longer than the install itself. Matrix server software also moves quickly: Synapse v1.163.0 was published October 14, 2026, and Synapse 1.143.0 and later require PostgreSQL 14 or newer, so confirm the release line and platform floors at the start. Ask for milestones, acceptance tests and a dated plan in the statement of work.

What does our own team need to provide?

Your team typically provides infrastructure access, DNS and TLS certificate control, an identity provider with admin rights, decisions on the server name and federation policy, and named owners for on-call, backups and user lifecycle. Security and compliance staff should define which messages count as emergency communications, who receives them and how the fallback channel is used. Your staff also needs to approve the test plan and sign off on retention and access settings. List these responsibilities in the quote so gaps are visible before work starts.

Can our internal team deploy and run Matrix without outside help?

A capable platform team can deploy Synapse, but the work requires skills across PostgreSQL, reverse proxies, identity federation, Redis-based scaling if you need it, and security testing. The Synapse upgrade notes warn that rolling back can be difficult because of database schema changes, so the upgrade process needs discipline and tested backups. Decide which parts you will own long term, and whether you need a fixed-scope build, a retainer for upgrades and testing, or both. DeployOpen implements and supports self-hosted platforms in your own infrastructure, and most engagements are fixed-scope with written deliverables.

What should a Matrix implementation quote include?

A useful quote lists the scope in writing, including components, integrations, environments and exclusions. It should state deliverables such as configuration, runbooks, backup and restore tests, and a documented fallback channel test. It should separate one-time build work from recurring items such as upgrades, monitoring, patching and retesting. Ask how the vendor handles Synapse releases, platform floors and database migrations, what acceptance criteria apply, and what happens if identity or network dependencies slip. DeployOpen does not publish a price list, so the quote follows from the written scope.

Which parts of the setup drive ongoing cost?

The recurring costs are upgrades, staff time for on-call and user administration, infrastructure for the server, database, media and call services, and periodic security testing. Costs rise with user count, federation traffic, call load and the number of integrations. Commercial options such as Element's Synapse Pro or Element Server Suite carry license terms that you should review directly with Element. Ask the vendor to separate infrastructure costs you pay to providers from services you pay to the implementer, and to state how each recurs.

Does the fallback channel also need data protection review?

Yes. If the server holds personal data and runs in a cloud or is operated by a provider outside the EEA, transfer rules under GDPR Chapter V may apply, and remote access from a third country counts as a transfer under EDPB Guidelines 05/2021. Federation can also send messages to other servers, so the federation policy should be decided with your data protection officer. Confirm these points with your data protection officer and counsel before you choose hosting and federation settings.

How DeployOpen scopes and delivers NIS2 communications work

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure. For Matrix used as secured communications and an emergency fallback channel, the work starts with a written scope that names the systems, identity sources, networks and evidence the client's compliance team needs.

How we scope

  • Agree in writing which entities, sites, staff groups and partner organizations the Matrix service must reach during normal operation and during an incident.
  • Map the Article 21(2)(j) requirement against your own risk assessment, with your compliance team confirming which controls apply to your entity.
  • Confirm the Synapse, Matrix Authentication Service and client versions to be deployed, checking current upstream release and platform requirements at the time of scoping.

How we build

  • Deploy the homeserver, database, reverse proxy and identity integration in infrastructure you control, separating the fallback path from the primary environment.
  • Configure federation, registration, admin access and multi-factor or single sign-on settings according to the agreed scope, and test each setting before handover.
  • Test the fallback channel under simulated loss of the primary identity provider, network segment or cloud region, recording what works and what does not.

How we hand over

  • Deliver configuration records, runbooks for account lifecycle, backup and restore, and a documented upgrade procedure that reads each release's upgrade notes.
  • Provide evidence packs that map configuration, logs and test results to the controls your assessors will ask about, without claiming any audit outcome.
  • Walk your operations and security staff through incident activation, emergency account access and the steps for returning to the primary service.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the initial handover, with the scope of each period agreed in writing.
  • Retest the fallback channel and emergency procedures after upgrades, identity changes or significant configuration changes, and report the findings and fixes.
  • Keep documentation current with each change so your team can show the state of the service to national competent authorities or auditors on request.

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.