ESS Community on a development machine
ESS Community on your machine, with a user signed in to Element Web and Element Admin. A curl request signs the user in through Matrix Authentication Service, then the same user signs in to Element Web and Element Admin in a browser.
This guide runs Element Server Suite (ESS) Community in a disposable Kubernetes cluster on your own machine, then lets you create a user and sign in with it. The ESS Community primer explains what ESS installs behind the scenes.
This guide uses k3d, which runs K3s in Docker, so the same steps work on Linux and macOS. ESS’s own integration tests use the same setup.
1. Install the tools
This step installs the four command-line tools the guide uses, at the versions it was written against.
| Tool | Version | Install instructions |
|---|---|---|
| k3d | 5.9.0 | k3d installation |
| kubectl | 1.36.6 | Install kubectl |
| Helm | 4.3.2 | Installing Helm |
| k9s | 0.51.0 | k9s installation |
2. Create a cluster that answers on 127.0.0.1:443
This step creates a one-node K3s cluster in Docker. Its ingress controller, the Traefik that K3s ships, answers on ports 80 and 443 of 127.0.0.1.
Create a working directory for the files the guide writes, and run every command from it:
mkdir -p ~/ess-try
cd ~/ess-try
ESS gives Synapse, Matrix Authentication Service (MAS), Element Web, Element Admin and the server name a hostname each, and the chart writes each one into the configuration as https:// and the bare hostname, with no port: Synapse’s public_baseurl, MAS’s issuer, Element Web’s homeserver URL and the .well-known files. Signing in moves the browser between these hostnames, so each has to answer on port 443 over HTTPS:
kubectl port-forwardto a single service would load that one page, but the redirects to the other hostnames would fail.- Forwarding to a high port, such as 8443, breaks every URL the chart generates, because none of them carries a port.
So this cluster does what the chart’s own test cluster does: ports 80 and 443 on 127.0.0.1 go to Traefik, and every hostname sits under ess.localhost. Names under localhost are reserved for the loopback address, and Chromium-based browsers resolve them without asking DNS. Nothing is reachable from other machines on your network. Rootless Docker can’t bind ports below 1024 without extra configuration.
Save the cluster configuration as ess-k3d.yaml. The embedded file is the Traefik configuration from the ESS README; K3s applies it when it starts:
apiVersion: k3d.io/v1alpha5
kind: Simple
metadata:
name: my-cluster
servers: 1
agents: 0
image: rancher/k3s:v1.36.6-k3s1
ports:
- port: 127.0.0.1:80:80
- port: 127.0.0.1:443:443
files:
- source: |
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: traefik
namespace: kube-system
spec:
valuesContent: |-
ports:
web:
forwardedHeaders:
trustedIPs:
- "10.42.0.0/16"
- "2001:db8:42::/56"
http:
encodedCharacters:
allowEncodedHash: true
allowEncodedSlash: true
websecure:
forwardedHeaders:
trustedIPs:
- "10.42.0.0/16"
- "2001:db8:42::/56"
http:
encodedCharacters:
allowEncodedHash: true
allowEncodedSlash: true
destination: /var/lib/rancher/k3s/server/manifests/traefik-config.yaml
nodeFilters:
- server:*
Create the cluster. k3d adds it to your kubeconfig as the context k3d-my-cluster and switches to it (k3d config file reference):
k3d cluster create --config ess-k3d.yaml
kubectl get nodes
kubectl get nodes lists one node, k3d-my-cluster-server-0, with the status Ready.
3. Deploy ESS Community
This step deploys ESS Community 26.11.4, the latest release, with the chart’s defaults and local hostnames.
Save the values as ess-values.yaml. The hostnames are those of the chart’s example values:
serverName: ess.localhost
synapse:
ingress:
host: synapse.ess.localhost
matrixAuthenticationService:
ingress:
host: mas.ess.localhost
elementWeb:
ingress:
host: element.ess.localhost
elementAdmin:
ingress:
host: admin.ess.localhost
matrixRTC:
ingress:
host: mrtc.ess.localhost
The server name is the part of every Matrix ID after the colon, as in @alice:ess.localhost, and can’t be changed later without resetting the database. That’s fine here, because the whole deployment is disposable. No other server can reach a name under localhost, so this homeserver can’t federate.
Install the chart (ESS installation). The first run pulls every image, so the command allows Helm 15 minutes rather than its default of 5:
kubectl create namespace ess
helm upgrade --install --namespace ess ess oci://ghcr.io/element-hq/ess-helm/matrix-stack --version 26.11.4 -f ess-values.yaml --wait --timeout 15m
When Helm finishes, it prints the chart’s notes, with the addresses of Element Web, Element Admin and MAS’s account pages.
4. See what the chart deployed
This step lists what one values file of six hostnames produced. To browse it interactively, run k9s -n ess and quit with :q. To list it:
kubectl get deployments,statefulsets,jobs,ingresses,persistentvolumeclaims --namespace ess
The ESS Community primer explains what each component does and how they connect.
The chart also generated every credential the components share into one Secret, ess-generated: database passwords, Synapse’s signing key and macaroon secret, the secret Synapse and MAS share, MAS’s encryption and signing keys, and the MatrixRTC keys. To list them, with the size of each but not its value:
kubectl describe secret ess-generated --namespace ess
To see the values themselves, each decoded from the base64 Kubernetes stores it in:
kubectl get secret ess-generated --namespace ess -o go-template='{{range $key, $value := .data}}{{$key}}:{{"\n"}}{{$value | base64decode}}{{"\n\n"}}{{end}}'
A Secret’s values are only base64-encoded, so anyone who can read it can read every credential. That’s fine in a cluster you’ll delete at the end of this guide, and nothing outside it holds a copy. For a deployment you keep, the ESS maintenance guide explains how to back them up.
5. Create a user
This step creates alice, an administrator, with a random password. ESS Community doesn’t allow registration by default, and the documented way to create a user is MAS’s command-line tool, mas-cli manage register-user, run inside the MAS pod.
export ESS_PASSWORD="$(openssl rand -hex 16)"
echo "$ESS_PASSWORD"
kubectl exec --namespace ess deploy/ess-matrix-authentication-service -- mas-cli manage register-user --yes alice --password "$ESS_PASSWORD" --admin
Keep the password for step 7. --admin lets alice into Element Admin, which turns non-admin users away.
6. Sign in over HTTP
This step proves the outcome without a browser, and it’s the check CI runs. The values give no certificate for the hostnames, so Traefik serves its own self-signed one for all of them: --insecure accepts it for these requests only, and --resolve sends each name to 127.0.0.1 without relying on how your system resolves names under localhost.
First, fetch the client discovery file that Matrix clients read from the server name:
curl --fail --insecure --resolve ess.localhost:443:127.0.0.1 https://ess.localhost/.well-known/matrix/client
The JSON names https://synapse.ess.localhost as the homeserver’s base_url, and https://mrtc.ess.localhost as the Element Call backend.
Then sign alice in with her password through the Matrix login API. The request goes to Synapse’s hostname, and the Ingress hands it to MAS’s compatibility layer, which checks the password:
curl --fail --insecure --resolve synapse.ess.localhost:443:127.0.0.1 -H "Content-Type: application/json" -d "{\"type\": \"m.login.password\", \"identifier\": {\"type\": \"m.id.user\", \"user\": \"alice\"}, \"password\": \"$ESS_PASSWORD\"}" https://synapse.ess.localhost/_matrix/client/v3/login | jq -e 'select(.user_id == "@alice:ess.localhost")'
The response is JSON with "user_id" set to @alice:ess.localhost, an access_token and a device_id. jq prints it, and fails unless the user is alice. With a wrong password, the server answers with an error and curl fails instead.
7. Sign in through Element Web, then Element Admin
This step proves the same thing in a browser, following every redirect between the hostnames.
The browser warns that each hostname’s certificate isn’t trusted, because it’s Traefik’s self-signed one. Element Web and Element Admin call the server name, Synapse and MAS in the background, where the browser can’t show that warning, so accept it for those three first. Open each of these, accept the warning and close the tab; the page behind it doesn’t matter:
Then sign in to Element Web. This is the flow the chart’s own browser test follows:
- Open https://element.ess.localhost, accept the warning and select Continue.
- The browser moves to
mas.ess.localhost. Enteraliceand the password from step 5, then select Continue. - MAS asks you to confirm with Continue to Element. Select Continue.
- The browser returns to
element.ess.localhost, signed in as@alice:ess.localhost.
Now the admin console, following the chart’s Element Admin test:
- Open https://admin.ess.localhost, accept the warning and select Get started.
- Sign in on MAS as alice again, and confirm with Continue on Continue to Element Admin.
- Element Admin opens on its dashboard, titled Dashboard • ess.localhost • Element Admin.
If Element Web or Element Admin says it can’t reach the server, open the three addresses above again and accept their warnings, then reload.
Calls aren’t part of this proof. The MatrixRTC backend is deployed, but its SFU listens on node ports 30001 and 30002, which this cluster doesn’t map. The MatrixRTC troubleshooting guide also describes what its authorisation service needs to call back through the ingress.
Clean up
Delete the cluster. This removes everything in it, including the database and the generated secrets, and removes the k3d-my-cluster context from your kubeconfig (k3d kubeconfig handling):
k3d cluster delete my-cluster
rm -rf ~/ess-try
The tools from step 1 stay installed.
Going further
- ESS Community for homelabs: the next step, with real hostnames and certificates
- The ESS Community README, with advanced setup, maintenance and troubleshooting
- Matrix Authentication Service documentation