ESS Community primer
What ESS Community runs, what talks to what and what has to be reachable. The components, connections, ports and data stores of a default install.
Element Server Suite Community (ESS Community) is Element’s open-source distribution of a Matrix deployment: a homeserver, sign-in, the web and admin clients and a backend for calls, installed on Kubernetes from one Helm chart. It’s released under the AGPLv3 and tailored to small and mid-sized, non-commercial deployments. Element only provides support for its commercial counterpart, ESS Pro.
This page describes it as installed from the ess-helm chart with its default values. Hostnames follow the README’s examples, with example.com as the server name.
ESS Community installs nine components by default
By default ESS Community installs the components below. Each can be turned off or replaced in the chart’s values (README, architecture):
| Component | What it does |
|---|---|
| Synapse | The homeserver: client API, federation and media, in one process, with all its worker types off |
| Matrix Authentication Service (MAS) | Accounts, sign-in and sessions, over OAuth 2.0 and OpenID Connect |
| HAProxy | Routes Matrix traffic to Synapse, and serves the .well-known files that tell clients and other homeservers where Synapse and the call backend are |
| Element Web | The web client, as static files |
| Element Admin | The admin console, a single-page app |
| MatrixRTC authorisation service | Element Call’s backend: checks a caller’s identity and room membership, then issues a LiveKit token |
| LiveKit SFU | Forwards call audio and video |
| PostgreSQL | One server, with a database each for Synapse and MAS |
| Valkey | In-memory cache for the MatrixRTC components, and pub/sub for Synapse workers |
Helm hook jobs run around each install and upgrade: they generate credentials, check Synapse’s configuration and refuse value changes that could corrupt data (installation state). Synapse workers, Hookshot and TURN over TLS for calls are off by default.
The chart includes no ingress controller and no certificates. It creates an Ingress per hostname for a controller you provide, such as K3s’s bundled Traefik, and asks cert-manager for certificates if you name an issuer (certificates).
Everything from outside arrives on port 443 except call media
Arrows point from the side that opens the connection; Valkey and the jobs aren’t shown:
Inside the cluster, Synapse checks every access token with MAS, and MAS provisions users through Synapse’s admin API with a shared secret. The MatrixRTC backend is two components: the authorisation service checks room membership with Synapse, which forwards call requests to it in turn, and the SFU, which carries the call media, tells the authorisation service when participants join and leave. MAS and the authorisation service reach Synapse through HAProxy; Synapse reaches them directly.
Each hostname needs a DNS record pointing to the ingress (ports):
| Hostname | What it serves | Reached by |
|---|---|---|
example.com | /.well-known/matrix/client, naming the Synapse and call hostnames, and /.well-known/matrix/server, which answers matrix.example.com:443 | Clients and other homeservers |
matrix.example.com | Client and federation APIs and media, through HAProxy to Synapse. Login, logout and token refresh go to MAS | Clients and other homeservers |
account.example.com | MAS’s sign-in pages and OAuth 2.0 endpoints | Clients |
chat.example.com, admin.example.com | Element Web and Element Admin | Browsers |
mrtc.example.com | Call tokens, and WebSocket signalling to the SFU | Clients in a call, including users of other homeservers, who can join calls held here though not start them |
Open the client hostnames on the internet or only on your network, depending on where your users are; federation needs example.com and matrix.example.com reachable from every homeserver you federate with. Call media goes straight to the SFU, on ports of its own.
Both admin APIs are reachable from outside. The Synapse hostname routes all of /_synapse to Synapse, admin API included, and MAS serves its admin API on its hostname, because Element Admin calls both from the browser. Synapse’s documentation recommends hiding its admin API, many of whose calls need a server administrator’s token. MAS’s documentation considers its admin API safe to expose, behind the urn:mas:admin scope.
By default, the deployment also reaches outside your infrastructure: Synapse federates with other homeservers, asks matrix.org for their signing keys, fetches URL previews and sends notifications to push gateways; the SFU asks Google’s STUN servers for its public IP address; Element Web, in users’ browsers, loads location-sharing maps and sends bug reports to Element; and the cluster pulls images from oci.element.io, docker.io and ghcr.io.
State lives in two databases, a media volume and one Secret
| Where | What’s in it |
|---|---|
Database synapse | User profiles, room state, messages and other metadata. Encrypted rooms hide content but not most metadata |
Database matrixauthenticationservice | All of MAS’s state, such as accounts and sessions (MAS) |
Volume ess-postgres-data, 10 GiB | Both databases, with the bundled PostgreSQL |
Volume ess-synapse-media, 10 GiB | Uploads, up to 100 MB each, and files cached from other homeservers |
Secret ess-generated | Every credential the values don’t provide: database passwords, Synapse’s signing key, MAS’s encryption secret and signing keys, and the secrets the components share (job arguments) |
ConfigMap ess-deployment-markers | Installation markers |
Valkey has no volume and its persistence is off. The volumes, the Secret and the ConfigMap all survive helm uninstall (installation state).
- Backups are yours. The maintenance guide lists what to keep: a database dump, the values files, the Secret, the ConfigMap and the media volume. ESS Community for homelabs restores them.
- Two secrets can’t be regenerated. A reinstall can’t bring back Synapse’s signing key, which signs its events and federation requests, or MAS’s encryption secret, without which the cookies and database fields it encrypted are lost. Any credential can come from the values or an existing Secret instead (generated secrets). Kubernetes stores Secrets unencrypted in etcd by default, so encryption at rest depends on your cluster.
- The bundled PostgreSQL is for getting started. The README recommends a dedicated server.
Sources
- ess-helm 26.11.0: README, architecture, advanced setup, maintenance, values; and the chart rendered with its default example values
- Synapse 1.164 configuration and admin API
- MAS: homeserver setup, database, configuration and admin API
- MatrixRTC authorisation service (lk-jwt-service) 0.9.0
- Element Admin
- Kubernetes Secrets
- On this site: ESS Community for homelabs