Skip to main content

Matrix Homeservers

A homeserver holds your account and the rooms you take part in, and exchanges events with other homeservers (federation).

What a homeserver does​

  • Stores accounts and handles login, or hands login to an auth service such as MAS.
  • Stores room history for rooms its users are in.
  • Federates with other homeservers over the server-server API.
  • Stores and serves media (uploads, thumbnails, cached remote media).
  • Relays encryption data. End-to-end encryption happens in clients; the server stores device keys, key backups and encrypted events, but cannot read encrypted messages.

Use a public homeserver​

If you only need an account, sign up on an existing server. Registration policies change often. These were checked on 2026-10-18:

HomeserverSign-up
matrix.orgThrough account.matrix.org (MAS). Run by the Matrix.org Foundation
tchncs.deThrough its MAS at auth.matrix.tchncs.de. Hosted in Germany

For more choices, see the community list at servers.joinmatrix.org. Larger servers see more of your metadata (who talks to whom, when), so a smaller server you trust can be a better choice for privacy.

Run your own​

ImplementationLanguageStatus (2026-10-18)Good for
SynapsePython + RustActive, maintained by ElementMost deployments; full feature set (MAS, workers, Element Call)
ConduitRustActive, betaSmall servers with low resource use
tuwunel / continuwuityRustActive forks of the archived conduwuitSmall to medium servers with low resource use
DendriteGoMaintenance mode (security fixes only), betaExisting deployments only

See the server comparison for features, migration paths and which to pick.

Ways to deploy​

ApproachNotes
Docker ComposeSynapse, PostgreSQL and a reverse proxy; you manage each part
matrix-docker-ansible-deployAnsible playbook covering Synapse or the Rust servers, plus clients, bridges, MAS and Element Call
ESS CommunityElement's Helm chart for Kubernetes/K3s: Synapse, MAS, Element Web, Element Admin and the MatrixRTC backend. AGPL-3.0, aimed at non-commercial use with up to 100 users. Latest 26.10.2 (2026-10-16)
Debian/Ubuntu packages or pipSee Synapse
ESS Community signing keys (CVE-2026-24044)

ESS Community charts before 25.12.2 generated weak Synapse signing keys that would let an attacker impersonate the server (GHSA-qwcj-h6m8-vp6q, published 2026-02-12, critical). If you installed ESS Community before then, upgrade to 25.12.2 or later and follow the advisory's key rotation steps.

The modern Matrix stack​

A current homeserver deployment that works well with Element X usually includes:

PieceWhat it does
Simplified Sliding Sync (MSC4186)Fast sync that Element X requires. Native in Synapse since 1.114 and in Conduit and its forks; no separate proxy any more
Matrix Authentication Service (MAS)OAuth 2.0 / OIDC login, registration and sessions for Synapse. matrix.org has used it since April 2025
MatrixRTC: Element Call, LiveKit and lk-jwt-serviceGroup voice and video calls. Uses a LiveKit SFU instead of TURN
coturnOnly for legacy 1:1 WebRTC calls (and Jitsi)

Hardware​

These are rough starting points, not benchmarks. Memory depends far more on the size of the rooms your users join than on the number of users.

Server sizeSynapseConduit family
Personal or family2 GB RAM, 2 cores512 MB–1 GB RAM, 1 core
Community of a few hundred4–8 GB RAM, 4 cores, SSD2–4 GB RAM, 2 cores, SSD
LargerSynapse with workers; size from measurementsCheck the project's guidance

Synapse's docs ask for at least 1 GB of free RAM to join large public rooms. ESS Community's quick setup asks for at least 2 CPUs and 2 GB of RAM.

Domain setup​

Pick your server name first. It is the part after the colon in user IDs (@alice:example.com) and cannot be changed later. Usually you use the bare domain as the server name and run the server on a subdomain:

example.com          → server name, serves the .well-known files
matrix.example.com → the homeserver itself (behind a reverse proxy on 443)

Well-known delegation​

Serve two small JSON files from https://example.com/.well-known/matrix/.

The server file tells other homeservers where to connect. With it pointing at port 443, you do not need to open port 8448:

https://example.com/.well-known/matrix/server
{
"m.server": "matrix.example.com:443"
}

The client file tells clients where the client-server API is:

https://example.com/.well-known/matrix/client
{
"m.homeserver": {
"base_url": "https://matrix.example.com"
}
}

Serve both as application/json. Serve the client file with Access-Control-Allow-Origin: * so web clients can read it (spec v1.19, client-server API, "Web browser clients"). Synapse can serve the server file itself with serve_server_wellknown: true if example.com is routed to it.

SRV records

The spec still allows SRV delegation through _matrix-fed._tcp.example.com; the older _matrix._tcp form is deprecated. With SRV delegation the target must present a TLS certificate for example.com, not for matrix.example.com, which makes it harder to set up. The spec encourages .well-known instead (spec v1.19, server-server API, "Resolving server names").

Ports​

PortNeeded for
443Client API, and federation when delegated with .well-known
8448Federation only if you do not delegate to 443
3478, 5349 (UDP/TCP), 49152–65535 (UDP)coturn, only for legacy 1:1 calls
LiveKit portsElement Call (see the LiveKit and Element Call docs)

Test federation with the Matrix Federation Tester.

Security basics​

  • Keep registration closed, or require registration tokens or a CAPTCHA. Open registration attracts spam accounts.
  • Do not expose admin APIs (/_synapse/admin, Dendrite's /_dendrite/admin) through the reverse proxy.
  • Bind homeserver ports to 127.0.0.1 and let only the reverse proxy reach them.
  • Back up the database, media and the server's signing key.
  • Update promptly when security releases come out, but read the upgrade notes first instead of updating unattended.

Next steps​


Continue: Synapse | Conduit | Dendrite