Running Matrix in an air-gapped network

A Matrix homeserver can run with no internet access if federation, packages, container images and calling infrastructure are planned for the isolated network from the start. This page explains the decisions, build sequence and limits to confirm.

On this page

Air-gapped Matrix deployment: when teams need it and what it changes

A regulated or classified environment that cannot reach the internet can still run a Matrix homeserver. Synapse can run isolated if federation is turned off or restricted and every container image, package and rule set is mirrored inside the boundary. The practical work is less about the server itself and more about replacing every dependency that normally comes from the public internet. Federation changes first: with federation_domain_whitelist set to an empty list, Synapse stops federating entirely, and the Synapse documentation recommends firewalling the federation listener as well, which matters on port 8448. If you need rooms shared with a known set of internal servers, list only those domains and confirm the behavior in your own test network before you rely on it.

Isolation also changes what the platform stops getting for free. There is no public federation, so users can only reach other servers you run or approve. Calls need a TURN service inside the network, since you cannot rely on a hosted one for one-to-one calls. Container images, operating system packages and Synapse releases must come from a internal registry and package mirror, and each artifact needs a checksum or signature check before it crosses the boundary. Upgrades stop being automatic: each Synapse release must be staged, read in full against the Synapse upgrade notes, and tested before it is carried in. Ask your team which mirror, signing and transfer process they will own, because those decide how fast you can patch.

For the commercial route, Element publishes three Element Server Suite editions: a free AGPL Community edition, a Pro edition and a Sovereign edition for air-gapped deployments, according to the Element pricing page. Confirm with Element which components, support terms and update channels each edition includes before you assume the Sovereign edition fits your accreditation or procurement rules. Ask Element and your own compliance team to confirm the answers in writing, and treat the edition choice as a scoping decision that affects who is paid for support, how updates reach you, and what you must mirror.

Isolation options and when each one fits

This table compares three ways to isolate a Matrix homeserver: closed federation, an internal-only federation set, and a single server with federation disabled. Read each row to see what users can reach, what your team must mirror, and what the option costs to run. The main takeaway is that every step toward more isolation reduces reach across organizations but adds less federation maintenance.

OptionWhat users can reachWhat the team must mirrorDNS and certificate needsOperational cost
Closed federation (federation_domain_whitelist set to your own domains)Users on your listed Synapse servers only, including any partner servers you add to the listContainer images and packages for every homeserver in the set, plus Element Web and any call servicesInternal DNS for each server name and a certificate trusted by every server and client in the setModerate: each added server needs its own upgrades, keys and mirrored updates
Internal-only federation set (listed internal domains, federation listener firewalled to those hosts)Users on a fixed group of internal homeservers, such as separate business units or sitesSame artifacts as the closed option, with the firewall rules and host list kept under change controlInternal DNS and internal certificates, with the federation port (8448 by default) reachable only between listed hostsHigher than a single server: cross-host access rules, replication testing and coordinated upgrades
Single server with federation disabled (empty federation_domain_whitelist)Local accounts and rooms on one homeserver onlyImage or package set for one Synapse host, its database, Element Web and any call or mail componentsOne internal server name and one certificate, with no federation listener exposedLowest: one upgrade path, one backup set, and no cross-server trust to manage
Public federation with outbound access controls (outside an isolated network)Users on any federating server reachable from your networkUsually nothing beyond normal updates, because the network must reach the internetPublic DNS, delegation and certificates for the federation endpointDepends on the network path and monitoring, not on Synapse alone

What must be mirrored into the isolated network

An isolated Matrix deployment only works if every artifact it needs is fetched once, checked, and carried across the boundary as a set. The six items below cover container images, operating system and runtime packages, the Synapse release itself, bridges and identity providers, calling services, and security rule sets, each with its own fetch, verify and transfer path.

Container images and the ESS chart

List every image the chosen deployment pulls, including the Synapse image, PostgreSQL, Redis if workers are used, the reverse proxy, and any ESS Helm chart images if you deploy through the chart. Pull them on a connected staging host, pin each to a digest rather than a floating tag, and record the list alongside the chart version. Confirm with your vendor which images the chart references by default, since the internal registry must serve every one of them under the names the manifests expect.

OS, Python and PostgreSQL packages

Mirror the operating system repositories your servers use, plus the Python and PostgreSQL packages that match your Synapse release. Synapse 1.143.0 and later require PostgreSQL 14 or newer, and 1.142.0 and later require Python 3.10 or newer, so the mirror must carry those versions and their dependencies. Check signatures on each package set before import and confirm that the mirror is current enough to receive security fixes during the life of the deployment.

PostgreSQL floor
14+

The chosen Synapse release

Choose one Synapse release deliberately. The latest listed release in the supplied facts is v1.163.0, published October 14, 2026, but the version you carry should be the one your upgrade notes have been read against. Download the release artifacts from the element-hq GitHub releases page on the connected side, record checksums, and import them to the isolated side. Because rollback can be hard after schema changes, keep the previous release artifact in the mirror as well.

Synapse releases

Bridge and identity provider images

Any bridge you plan to run, such as those for Slack, IRC, WhatsApp, Telegram, Signal or email, and any identity component such as Matrix Authentication Service, its upstream provider, or a bridge like Dex, needs its own image set. Bridges often pull additional runtime dependencies at start, so test each one with network egress blocked before you rely on it. Ask each vendor whether the image is fully self-contained and which external endpoints it contacts on first run.

TURN and calling services

One-to-one calls on a self-hosted homeserver rely on a TURN server, and group calls rely on the LiveKit and authorization services behind Element Call. Mirror their images and configuration templates, then confirm that the TURN server can be reached only from the internal address space and can relay media between internal clients. Plan certificates for these services from your internal certificate authority, since public certificate issuance will not be available to the isolated network.

Security rule sets and scanner data

Mirror the signature, rule and vulnerability data your monitoring and scanning tools use, along with the scanner binaries. Without an offline feed, vulnerability checks on the Matrix hosts go stale quickly, so decide how often updates will cross the boundary and who approves each transfer. Record a checksum and source for every rule set, and keep an import log so that the security team can show what was loaded, when, and from which connected host.

How artifacts and traffic cross the isolated boundary

The diagram starts in an outside staging zone, where packages and container images are pulled and checked before they are copied to transfer media or a data diode. Once inside, the internal registry and package mirror serve the Synapse homeserver, which uses PostgreSQL and optionally Redis. The internal TURN server handles calls within the boundary. The federation listener is reachable only from servers named in the federation_domain_whitelist, and it should also be firewalled. Check that every hand-off is logged and that nothing inside reaches out to the internet.

Artifacts move one way across the boundary, while federation traffic is limited to listed peers.

Build sequence for an isolated Matrix homeserver

This sequence takes a Matrix homeserver from policy decisions to a verified offline service, with each stage producing an artifact the next stage depends on. It keeps the federation boundary, server name and mirrored software fixed before anything is installed, so the finished system can be reviewed as a closed unit.

  1. Decide the federation policy first

    The security or architecture owner decides whether the homeserver will federate with no other servers, or only with a named internal set of Matrix servers on your own network. Record the decision, the list of permitted domains and who approves changes to that list. This is done before installation because the choice affects the federation listener, the whitelist and the firewall rules later. Done means a signed-off policy document that names every permitted server domain, or states that federation is disabled.

  2. Set the permanent server name

    Choose the server_name that will appear in every user ID and room ID, for example the domain users will see after the colon. Confirm with your own DNS team that the name will resolve only on your internal network, and record where Synapse, MAS and Element Web will live. The server name cannot be changed later without re-identifying users and rooms, so treat this as a one-way decision. Done means a written server name and a DNS plan that your internal resolvers answer without public lookups.

  3. Build the mirror on a staging side

    On a connected staging network, the platform team collects the container images, operating system packages and Python or PostgreSQL packages that the deployment needs, pinned to the exact versions under review. Keep the staging host separate from the production network and record each artifact's name, version and source. Confirm the mirror is complete by installing from it on a clean staging host with no other repositories configured. Done means a complete, version-pinned transfer set and an inventory listing every item in it.

  4. Verify checksums and signatures before transfer

    Before any artifact crosses into the isolated network, the security team checks each package and image against the publisher's published checksums and signatures, and rejects anything that does not match. Record the verification result per artifact and retain the signed inventory with the transfer media. This is the control point for software integrity and authenticity under your supply chain procedures, including any NERC CIP-013-2 obligations if they apply. Done means a verification log in which every artifact has a passed result, and a hash manifest that travels with the media.

  5. Load the internal registry and package repository

    Import the verified artifacts into the internal container registry and the internal package repository, then point the production hosts at those internal sources only. Remove or disable any default public repositories on the isolated hosts so that a missing package fails visibly rather than reaching out. Confirm by pulling each image and installing each package from an isolated host and checking that DNS and outbound connections to public addresses fail. Done means every required image and package installs from internal sources alone.

  6. Install PostgreSQL and Synapse

    The platform team installs PostgreSQL first, since Synapse recommends it for production and recent Synapse releases require PostgreSQL 14 or newer, then creates the Synapse database with the locale your Synapse documentation specifies. Install the Synapse build from the internal repository or registry, generate its configuration and signing keys, and start the service with the server name chosen earlier. Check the Synapse version against the upgrade notes for its Python and PostgreSQL floors before starting. Done means Synapse starts cleanly, connects to PostgreSQL and reports its version on the internal address.

  7. Configure the whitelist and firewall

    Apply the federation policy from the first step: set federation_domain_whitelist to the permitted internal domains, or to an empty list if federation is disabled. The Synapse documentation recommends also firewalling the federation listener, so restrict the federation port to the approved internal peers at the network layer. Record each rule and the change owner. Confirm from a host outside the allowed set that federation requests are refused, and from an allowed peer that they succeed. Done means matching configuration and firewall rules, with both a refused and an accepted test result on file.

  8. Deploy internal TURN and verify with no outbound connections

    Deploy a TURN service inside the network so one-to-one calls can connect between clients without public relays, then point Synapse and the clients at it. Finally, run the acceptance tests with outbound access blocked at the boundary: log in, create a room, send a message, and upload and fetch media. Capture the firewall logs and confirm no connection leaves the network. Done means all four user tests pass and the boundary logs show no outbound traffic during the test window.

Running calls and TURN on an internal network

One-to-one calls on a self-hosted Matrix server need a TURN service that clients inside the network can reach. Clients behind NAT often cannot connect to each other directly, so the call media is relayed through TURN. In an air-gapped network, the TURN host must be an internal machine with an address your clients resolve and route to. Public TURN hosts, including any that a default configuration or a public tutorial might point to, will not be reachable from inside the boundary, so calls fail silently or stall at connection setup. Decide the TURN hostname, the ports and the shared credential method before you configure Synapse, and confirm the exact TURN settings and the client-side configuration each one requires in the Synapse configuration manual and the ESS documentation.

Group calls through Element Call depend on more than TURN. Element Call relies on a LiveKit media service and an authorization service, and both must be deployed inside your network as well, since neither can fall back to an external host. Plan the internal DNS names, TLS certificates from your internal certificate authority, and the trust store that clients and the call services use, because a certificate chain that a browser or desktop client does not trust will stop calls even when the network path is open. Confirm which of these components ESS deploys for you, which you must supply yourself, and which ports and media ranges must be open between clients, LiveKit and TURN. Test a one-to-one call and a group call from a client on each network segment you intend to support before you declare the service ready.

Test calls with the same mirrored images and packages you use for the rest of the stack, and record the versions of Synapse, ESS, LiveKit, the authorization service and the TURN server in your change log. Because call components are updated on their own schedules, a version change in one can break calls that worked before, so treat them as part of your patch process. Ask your vendor or implementation partner to document the exact prerequisites, configuration keys and firewall rules for your chosen topology, and keep that document with the evidence you keep for the isolated boundary.

How Element's commercial editions support isolated networks

ESS Community is the free edition of Element Server Suite, licensed under AGPL. Element positions it for non-professional deployments and evaluations, so it is a poor basis for a regulated production network without a commercial agreement. It is useful for testing the architecture, Helm values and network layout in an isolated lab before any procurement decision is made.

  • Intended use: Element describes Community for non-professional deployments and evaluations, which sets the boundary for production use.
  • License obligations: AGPL terms apply to modified code that users interact with over a network, so review them with your legal team before changes are made.
  • Support: Confirm with Element what support, if any, applies to Community deployments in an isolated network.
  • Update delivery: Ask how images and charts reach a disconnected cluster and whether updates are published on a schedule you can mirror.
  • Lab value: Use a Community install to rehearse the mirrored-image and internal TURN steps before committing to a paid edition.

Before relying on Community for any isolated environment, confirm its permitted use in writing with Element.

Security and operations risks in a closed network

A closed Matrix deployment removes the internet as a source of updates, keys and fixes, so every risk below comes from something your team must carry across the boundary or maintain inside it. The cards cover patching, rollback, package trust, exposed interfaces, device and key hygiene, and recovery.

Delayed security patches

An internal mirror only helps if it is refreshed on a schedule that matches the risk you accept. Synapse releases, container images and OS packages each move at their own pace, and the gap between upstream and your mirror is the window where known flaws stay open. Record the upstream release you run, the release you are waiting to adopt, and who approves each import. Ask your Element contact or the Synapse release page what severity guidance applies to each release. Confirm the refresh cadence before go-live, not after the first incident.

Synapse releases

Rollback after schema changes

The Synapse upgrade notes warn that rolling back can be difficult because database schema changes ship between releases. In a closed network you cannot simply pull an older image from the internet, so the mirror must keep the previous image and a tested database backup taken before each upgrade. Read every set of upgrade notes between your current and target versions, not only the latest one. Rehearse the restore path in a staging environment that mirrors the isolated network.

Synapse upgrade notes

Verifying packages crossing the boundary

Every container image, Helm chart, Python wheel and OS package carried into the network is new trusted code. Verify publisher signatures or published checksums where the project provides them, record the hash of each artifact, and keep an import log that names who approved it. NERC CIP-013-2 expects supply chain procurement processes to address software integrity and authenticity for vendor software and patches, so utilities should map that control to this workflow. Other sectors can apply the same discipline without the regulatory label.

CIP-013-2 text

Admin API and replication exposure

Synapse exposes its admin API under /_synapse/admin and replication listeners for workers, and both must stay off any network segment that users or unapproved hosts can reach. Federation is already off or limited in a closed network, but the federation listener on port 8448 should still be firewalled, as the Synapse documentation recommends. Confirm which listeners your reverse proxy forwards, and test from a user subnet that admin and replication ports do not answer. Document who holds admin tokens and how they are rotated.

Synapse configuration manual

Stale devices and key handling

Closed networks often keep devices, sessions and signing keys long after staff leave or hardware is reissued. Set a policy for deactivating accounts and removing stale devices, and decide how the server signing key and any backed-up room keys are generated, stored and recovered. Keep the signing key out of general backups that unrelated teams can read. Ask your identity provider team how deprovisioning reaches Matrix, because a disabled upstream account does not automatically end existing sessions unless your setup is designed for it.

Offline backup and restore

A PostgreSQL database that cannot reach external storage needs its own backup target inside the network, with restores tested on a schedule. Back up the database, the media store and the configuration and signing keys together, and record the Synapse version each backup belongs to, since a restore onto a different release can fail. Check that backups are readable without the vendor's online services and that the restore runbook can be followed by someone who did not write it. Confirm recovery time and recovery point targets with the business owners before the system is accepted.

Questions buyers ask before hiring help with an air-gapped Matrix build

Can our team build an air-gapped Matrix deployment without outside help?

Yes, if you already run Linux, Kubernetes or Docker, PostgreSQL and a private registry inside the isolated network, and you have someone who can own the Synapse upgrade cycle. The hard parts are rarely the first install. They are building a complete artifact list (container images, Helm charts, Debian packages, Python dependencies, Synapse and MAS releases), proving each one is what the vendor published, and repeating that process on every update. Ask whether your team has staffed that work before, and whether it can be done during a change window without an outside reviewer. If not, a partner can plan and build it, but you still own the environment and the sign-off.

What makes an air-gapped Matrix project larger or smaller?

Effort is driven mostly by four factors. The first is the number of artifacts to mirror, which grows with each enabled component, such as Synapse workers, Redis, MAS, Element Web, and any bridges or call services. The second is federation policy: a server with federation disabled is simpler than one that federates with an approved internal set of servers, which needs its own allow-list, firewall rules and testing. The third is calling, because TURN and any group-call services need internal network paths, certificates and media testing. The fourth is identity integration and the approval process for moving files across the boundary. Ask any bidder to list these factors in the written scope with a count for each.

What do we need to provide for an air-gapped Matrix engagement?

Expect to provide a staging network with temporary internet access for building the artifact bundle, named owners for DNS, certificates, identity, PostgreSQL and the security approval of transfers, and change windows for the cutover and each later upgrade. You will also need a decision on the permanent server name before any user is created, because changing it later is disruptive. Ask the partner to list each dependency, who on your side owns it, and what access they need, in writing, before work starts. DeployOpen agrees scope, deliverables and timelines in writing before work begins, so these inputs should appear there.

How long does an air-gapped Matrix build take?

Duration depends on scope, not on a single standard timeline. A small build with federation off, a few components and existing PostgreSQL and identity services takes less time than a build with worker scaling, calling, internal federation and a mirror process for future upgrades. The time your own staff spend on approvals and change windows can matter as much as the technical work. DeployOpen agrees timelines in writing as part of the fixed-scope quote, so ask for the milestones, the staging and approval steps, and the acceptance tests that close the work.

Do we need Element's commercial editions to run Matrix offline?

Not necessarily. Synapse is open source under AGPL-3.0-or-later, and Matrix.org lists other homeserver implementations, so an isolated deployment can be built from the open-source components. Element's commercial offerings change what you get, not whether you can run Matrix offline. Element Server Suite has a free AGPL Community edition, a Pro edition and a Sovereign edition for air-gapped deployments, and Element's pricing page describes these tiers. Confirm with Element which edition includes the support, packaging, identity and auditing features your compliance team expects, and check the license terms for each component before you bring it into the isolated network.

What does an ongoing mirror update process involve?

A mirror update is a repeatable cycle: pick the new Synapse, MAS, Element and chart versions, read every upgrade note between your current and target release, rebuild the artifact bundle in the staging network, check its contents, scan it, move it across the boundary through your approval process, mirror it to the internal registry and package repositories, then upgrade in a change window with a tested restore point. Synapse upgrade notes warn that rolling back can be difficult because of database schema changes, so the restore plan matters more than usual. Ask for the cycle, its frequency, who approves each transfer, and whether a retainer covers it. Retainers for ongoing support and upgrades are available from DeployOpen.

How do we verify that transferred packages are authentic?

Record the source, version and checksum of every artifact at the point it leaves the connected staging network, and verify those values again after it enters the isolated network. Where the vendor publishes signatures or checksums, check them against the publisher's own release pages, not a copy. This is the kind of supply chain control that frameworks such as NERC CIP-013-2 ask utilities to address for vendor software and patches, and similar expectations appear in other regulated sectors. Ask your compliance lead which control IDs apply to you, and ask any partner to show how the transfer record is kept as evidence. DeployOpen prepares controls and evidence for assessments, but independent auditors issue the assessment results.

How DeployOpen scopes and delivers isolated Matrix deployments

DeployOpen plans, builds, hardens and documents self-hosted open-source platforms inside the client's own infrastructure, including networks with no internet access. For an air-gapped Matrix homeserver, the work starts with a written decision on federation, image and package transfer, TURN and the commercial edition question, then moves through a tested build and a handover the client's own team can run.

How we scope

  • Engagements are fixed-scope, with scope and deliverables agreed in writing before work starts.
  • Scope records the federation decision: disabled, or limited to named internal servers.
  • Scope lists every image, package and bridge that must cross the isolation boundary.
  • Scope confirms which Synapse, MAS and Element components are in or out for the network.

How we build

  • We stage container images, packages and dependencies from a controlled staging network.
  • We set up an internal registry and package mirror, then test installs with no outbound access.
  • We configure internal TURN for one-to-one and group calls and verify media paths.
  • We apply SSO, access control, audit logging and email settings for the internal user base.

How we hand over

  • Handover includes configuration, network diagrams, and a record of each transferred artifact.
  • We document the procedure for importing new releases and verifying their integrity before import.
  • We provide runbooks for backups, restores and federation changes inside the isolated network.
  • Your team receives a walkthrough and a checklist for upgrade planning with release notes.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers.
  • Retainers can cover staged upgrade transfers and review of each Synapse upgrade note.
  • Security testing of the deployed service can be scheduled after handover and after major changes.
  • Compliance evidence, such as configuration records and access logs, is prepared for your assessors.

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.