Using your organization's domain for openDesk Matrix IDs: when the change is worth making
Set a custom Matrix domain when your users should appear as @name:your-organization-domain in Element instead of under the default openDesk host. In Matrix, the server name is the part after the colon in every user ID and room ID, so it is the identity that other people and servers see. In Synapse, the homeserver that Matrix settings in openDesk build on, this value is controlled by the server_name setting. The openDesk deployment passes a value through MATRIX_DOMAIN, but you must confirm in the deployment docs for your release exactly what that variable changes, including whether it affects only user IDs or also room addresses and the delegation files. Identity, security review and federation planning teams should all sign off on the value before any account is created.
The server name is hard to change once users and rooms exist. Each account and room is created with the name embedded in its identifier, so renaming the server later does not rewrite the IDs already issued, and members, invitations and bookmarks keep pointing at the old domain. Plan any change as a migration with its own test window and its own communication to users. Also confirm that your organization controls the chosen domain and can publish the .well-known delegation records, because without them other servers and clients may not find the homeserver under the new name. Ask ZenDiS or check your openDesk release notes whether a supported migration path exists for your version before you commit.
Three teams should settle this together before any account exists. The identity team confirms which attribute builds the local part of each ID, because users will see that scheme every time they start a chat. The security team reviews federation alongside the domain: Synapse's federation_domain_whitelist setting can limit federation to listed domains, an empty list disables it, and the Synapse docs recommend firewalling the federation listener as well. Federation planning then tests whether other servers can reach the new name on the expected ports, using the Synapse federation documentation as the reference for delegation and port 8448. Write the decision down, then retest IDs and delegation before users arrive.
Choosing the Matrix domain, delegation and federation settings
This table compares the domain, delegation and federation choices for openDesk Matrix IDs, with the effect each option has on users, other servers and your DNS setup. Read each row as two questions: when the option fits, and what you must confirm before you change MATRIX_DOMAIN or the federation settings. The main takeaway is that the domain in user IDs is hard to change later, so settle it before the first accounts and rooms are created.
| Option | When it fits | What it changes | What to confirm first |
|---|---|---|---|
| Keep the default domain | Evaluation, or a deployment where users accept IDs on the default domain | User IDs stay on the default domain, so they do not show your organization's name | Whether staff accept the default domain in IDs and whether a later change is planned |
| Set MATRIX_DOMAIN to your domain | Users should see IDs on your domain that match their email and other services | IDs move to your domain, and other servers must resolve that domain to reach the homeserver | That your team controls the domain and DNS, and the exact MATRIX_DOMAIN value for your environment |
| Dedicated host with .well-known delegation | Your domain already runs a website or mail, and chat should run on its own hostname | Your domain serves .well-known files that point clients and servers to the chat host on port 443 | The chat hostname, certificate coverage, and that the web server on your domain can serve the .well-known files |
| Apex domain | Your domain has no other web service, and the homeserver can answer on the bare name | The homeserver answers on the bare domain, so delegation files are not needed for the name | That no other web or mail service uses the apex, and that port 8448 federation traffic can reach the server |
| Federation open | Staff must talk with partner and other organizations' Matrix servers without a fixed list | Any remote homeserver can exchange messages with your users and the rooms they join | That accepting traffic from unknown servers matches your data handling and approval rules |
| Federation restricted with federation_domain_whitelist | Collaboration is limited to named partner domains that your organization has agreed to work with | Only listed domains can federate, and all other servers are refused until the list changes | The exact domains to list, who approves additions, and whether the federation listener is firewalled too |
| Federation disabled with an empty list | Chat should stay inside the organization and no outside server is needed | No external servers can reach your users, and users cannot join rooms hosted on other servers | Whether external contacts, bridges or shared rooms need chat access, and which users depend on them |
How openDesk Matrix IDs and .well-known delegation work together
The server name in a Matrix ID and the host that answers network requests are separate settings, and this section depends on keeping them apart. In Synapse, server_name fixes how users and rooms are identified: an account appears as @user:example.com, and that domain is written into every user and room identifier the server creates. In an openDesk deployment, the value you set as MATRIX_DOMAIN is the domain chat IDs use, so it is the first value to settle. Delegation is what lets that identity be served from elsewhere. Requests for the domain are redirected to the host that actually runs Synapse, reached on port 443, so the organization's domain can front a chat service running on a different host name.
Two different lookups follow from this split. A user's client starts from the domain in the Matrix ID and requests /.well-known/matrix/client over HTTPS, which returns the base URL of the homeserver, so users never type a server address. A remote Synapse server does the equivalent for federation: it requests /.well-known/matrix/server on the domain, and if that file names a host and port, it connects there. Without delegation, it connects to the server name on port 8448, the default federation port. Confirm the exact lookup order and fallback behavior in the Synapse federation documentation before you publish the files, because the DNS, certificate and firewall steps depend on which host answers.
The server name should not be changed casually after launch. Existing accounts and rooms keep the identifiers they were created with, so changing server_name does not rename them, and the result is a mix of old and new identities that users and other servers must both handle. Synapse's upgrade notes also warn that rolling back can be difficult because of database schema changes, which makes a server name change hard to undo. Before go-live, confirm that server_name, the client well-known file, the server well-known file and the federation listener all describe the same deployment, and record the final values in your change plan so later operators do not have to reconstruct them.
Discovery and federation requests reach Synapse along two separate paths
The diagram starts with a client or remote server that asks the organization domain for its .well-known delegation. The organization domain returns the delegated host, and the client then sends normal traffic on port 443 through the cluster ingress to the Synapse listener. The shaded cluster marks the trust boundary between the public internet and the ingress. Federation takes a separate branch: remote servers connect on port 8448 to the federation listener, which passes traffic only for domains on the allow list. When federation_domain_whitelist is set to an empty list, federation requests are refused at that point. Check each hop separately: the delegation response, the port 8448 route, and the refused path after any change to that setting.
Client discovery and federation requests take separate paths into Synapse through the cluster ingress.
Setting MATRIX_DOMAIN and publishing delegation step by step
This sequence moves the domain in Matrix user IDs from the current value to your organization's domain. Each change is checked before the next one begins, so a missing DNS record or a blocked script is found before users notice. The result is a deployment where new IDs use your domain and clients find the homeserver through it.
Confirm the domain and DNS ownership
Decide which organization domain will appear in Matrix IDs, then confirm that your team controls its DNS zone and can publish files on its web server. Ask the openDesk deployment documentation for the release in use how existing accounts and rooms are affected by a domain change, since that answer decides whether this is a fresh setting or a migration. Done when a DNS lookup returns records in a zone you manage and the domain owner has approved the change window in writing.
Set MATRIX_DOMAIN for the target environment
In the configuration for the environment you are changing, set
MATRIX_DOMAINto the chosen domain. Keep the value identical wherever the same users must share IDs, and commit the change to version control so it is reviewed like any other configuration change. Check the expected format of the variable against the openDesk deployment documentation for your release. Done when the rendered configuration for that environment shows the new domain and no other environment has picked it up.Deploy the change with Helmfile
Run the Helmfile deployment for that environment so the Matrix components render with the new domain. Watch the rollout until the Matrix workloads report ready, then read their logs for errors about a server name or domain mismatch. Done when the rollout completes cleanly and the homeserver answers a basic client request under the new name, which you can check with an HTTPS request to the client endpoint.
Publish the well-known delegation files
Publish the .well-known delegation files on the organization domain. The contents must match the openDesk deployment documentation for your release exactly, because clients and other servers read these files programmatically. The team that runs the organization web server usually owns this step, so agree on file locations and the deployment path before the change. Done when both files are in place on the web server that answers for the organization domain and that team has logged the change.
Serve the files over HTTPS
Serve both files over HTTPS with a certificate that clients trust, and check that no redirect moves the well-known path to another address. Confirm that the content type and body match the openDesk documentation. Fetch each file from a machine outside your internal network and compare the response with the expected contents. Done when both fetches return a successful response with the expected body over HTTPS.
Update the Content Security Policy for Element
Add the Content Security Policy directives that the openDesk documentation describes for the Element clients, so browsers can reach the new domain and the homeserver host. Apply them through the same configuration path as your other changes so a later deployment does not overwrite them. Load the Element web client in a browser and check the developer console for blocked requests. Done when login loads with no CSP violations in the console.
Verify DNS, well-known files and login
Run three checks in order and record each output. First, look up the organization domain and the host it delegates to in DNS. Second, fetch each well-known file over HTTPS from outside your network. Third, log in to the Element web client with a test account. Done when the DNS records point where the delegation files say, both files return the expected contents, and the login succeeds.
Create a room to confirm the new ID
Log in as a test user, create a room, and check that the room and your user ID carry the organization domain. An illustrative ID would look like
@test.user:your-domain.example, where the part after the colon matchesMATRIX_DOMAIN. Send a message from a second test account on another client to confirm the room works end to end. Done when both IDs show the new domain and the message arrives. Federation with other servers is tested after these checks pass and needs its own test plan.
Testing openDesk Matrix IDs and federation after the change
Start by confirming that new Matrix IDs carry the organization's domain. After the change, check the server name in a new user's ID: create a test account and confirm that the ID ends in the value set as MATRIX_DOMAIN, with the local part matching the username. Then fetch the delegation file from a machine outside the cluster, for example with curl https://<your-domain>/.well-known/matrix/server, and confirm that the JSON points clients and servers to the chat hostname on port 443. Ask your deployment team which accounts were created before the change, since their IDs were issued under the previous domain and support staff need to know how those users appear. Synapse uses server_name to fix how users and rooms are identified, so an ID that looks correct in the interface can still resolve incorrectly for other servers if the delegation is wrong.
Next, run a federation test against a second Matrix server that your organization is allowed to federate with. Agree the test server and test accounts with its operator in advance, then have that operator invite a test account on your side into a room on theirs, and send a message back. Run the test from a network outside the cluster. Testing from inside the cluster does not prove external reachability, because in-cluster traffic skips the public DNS record, the external load balancer, the edge firewall and the NAT rules that a remote server will actually hit. Confirm that the federation listener on port 8448 is reachable where the delegation directs traffic, and firewall that listener so only approved sources can connect, as the Synapse documentation on federation describes.
Last, confirm that federation behaves as the policy says. If your policy is a restricted list of partners, a test account on a server outside that list should fail to invite or join rooms on your server, and the agreed partner should succeed. If your policy is no federation, remote users should be unable to reach your rooms at all. Synapse's federation_domain_whitelist setting restricts federation to listed domains, and an empty list disables it, so test both the allowed and blocked cases with the same accounts and record each result. Treat the configuration setting and the network firewall rule as two separate controls, because a passing result from one does not show the other works. Confirm with your openDesk deployment team how this setting is exposed in your environment, since the sources for this topic do not confirm the configuration path.
Security risks of a custom Matrix domain
Changing the domain behind Matrix IDs moves routing, trust and configuration at the same time. The six risks below share one root cause: the domain in user IDs, the host that answers delegation requests and the web client settings must all agree before federation is tested. Check each control before you announce the new IDs to users.
Delegation file and DNS mistakes
A wrong delegation file or DNS record can send other servers and clients to a host that does not run your homeserver. Synapse can serve @user:example.com from another host on port 443 through delegation, so one typo in the well-known response misroutes every federation request for your domain. Before go-live, fetch the delegation response from outside your network, confirm it points to the Synapse federation endpoint, and confirm the DNS records resolve to the ingress you expect.
Synapse federation docsFederation listener left open
Synapse federates on port 8448 by default, so the federation listener is reachable unless you restrict it. The federation_domain_whitelist setting limits federation to listed domains, and an empty list disables federation. The configuration manual also recommends firewalling the federation listener, so test the network path from a host outside your partner list as well as checking the setting.
Content Security Policy widening
A Content Security Policy tells the browser which scripts, frames, images and connections the web client may load. Moving to a new domain often means editing that header, and one broad wildcard or added external source quietly widens what the client can load. Export the policy before and after the change, list every origin it allows, and record the owner and purpose of each origin before launch.
openDesk security docsHTTPS and certificates for well-known
Client discovery and delegation both rely on the .well-known files being served over HTTPS with a certificate that clients trust. An expired certificate, a certificate issued for the old name or a redirect to a plain HTTP host can break federation or send clients to an unexpected server. Confirm the issuer, the name on the certificate and renewal monitoring for the new domain, since openDesk expects cert-manager in the cluster.
Rollback after schema changes
The Synapse upgrade notes warn that rolling back can be difficult because database schema changes occur between releases. If you change the domain and upgrade Synapse in the same window, reverting the domain may not restore a working server on the old schema. Take a database backup and record the Synapse version before the change, then agree in writing what a rollback means, who decides it and how long a restore will take.
Synapse upgrade notesAdmin access after the change
Changing server_name changes how users and rooms are identified, so administrator accounts, room permissions and admin tooling need review against the new domain. List every account with server administration rights before and after the change, end sessions that belong to old identities and confirm which operators can reach admin APIs. Element AdminBot and Admin Console are openDesk Enterprise features, so Community operators run these checks without those tools.
Questions buyers ask about openDesk Matrix domains
How much effort does a custom Matrix domain take, and what drives it?
The effort depends on how many clusters and domains are involved, how much DNS and certificate work you already control, and whether any users or rooms exist yet. The setting itself is a configuration change, but it fixes how users and rooms are identified, so most of the work is planning, verification and sign-off. Ask for a quote built on a written scope that covers these drivers:
- DNS zones and records your team can edit directly
- Certificates for each name that serves Matrix traffic
- Web hosting for the delegation file on your domain
- SSO mapping, if chat IDs must match existing sign-ins
- Whether federation stays on and needs outside testing
Most engagements are fixed-scope, so the quote follows from the agreed scope and deliverables.
Can our internal team switch chat IDs to our domain alone?
A team that already runs openDesk on Kubernetes can often make the change itself, provided it controls DNS, certificates and the web server that hosts the delegation file. The harder part is verification, because other servers and your own clients see the change from outside your network. Teams new to Kubernetes or Matrix operations often want outside help with the configuration, the test plan and the rollback plan. Whichever path you choose, run the change in a staging environment that matches production, and name who approves DNS edits before anyone makes them. DeployOpen plans, implements, documents and supports self-hosted open-source platforms in your infrastructure, so it can carry the full change or support your staff on the steps they choose.
What must our organization provide for a Matrix domain change?
Four things must come from your organization: DNS control for the domain, certificates for the names that serve Matrix traffic, web hosting that serves the delegation file on your domain, and an identity owner for SSO. DNS and certificate requests often pass through a network or security team, so start them early and name the approver in writing. The delegation file must be reachable on your domain at the .well-known path, so confirm who runs that web server and how it is changed. For SSO, openDesk supports OIDC-based federation with an external identity provider, matching users by username or another attribute such as mailPrimaryAddress. Name one owner who decides the matching attribute, approves test accounts and signs off on access. Confirm the exact file contents and hostnames in the deployment documentation for your release.
Can we reverse the Matrix domain change after users already exist?
Once users and rooms exist, reversing the domain is a migration project that needs its own plan. The domain is part of every user and room identifier, so moving back changes IDs that people and integrations already use, and room history needs a defined path. Synapse's upgrade notes warn that rolling back can be difficult because of database schema changes between releases, so take a tested database backup and restore plan before any domain change. Ask the team to write the reversal steps, the notice to users and the list of integrations to update, then test those steps in staging. Confirm the exact steps against your release and the upstream upgrade notes before work begins.
When should federation testing happen during a Matrix domain change?
Run federation tests after the new DNS records and delegation file resolve, and before users are told to rely on the new IDs. Synapse federates on port 8448 by default, and delegation lets an illustrative user ID such as @user:example.com be served from another host on port 443, so test both paths from outside your network. During testing, federation_domain_whitelist can limit federation to listed domains, and an empty list disables federation. The Synapse federation documentation also recommends firewalling the federation listener. Repeat the tests after any DNS, certificate or ingress change, because each can break delegation without touching chat itself. If your policy allows it, keep federation off until the test plan passes.
Is changing the Matrix domain a Community or Enterprise question?
The domain change is a planning question for any edition, while support level is where Community and Enterprise differ. The Community Edition is supported only by the community on openCode, with no SLA. ZenDiS recommends openDesk Enterprise Edition for production. It uses the same open-source core licenses, adds closed-source modules and an Enterprise-only registry and license file, and includes SLA-backed 2nd and 3rd level support and patches. Enterprise-only chat administration tools include Element AdminBot and GroupSync, which only the Enterprise edition provides. Ask whether the domain change, the federation tests and later patches fall under the support you buy, and confirm which edition your deployment runs before work starts.
Limits to confirm in your environment before you change the domain
Each limit below changes what the domain switch can break, so confirm it against the openDesk release you actually run. The vendor and openDesk documentation set the baseline for each item, while your platform, DNS and federation partner teams own the answers. Record the result of each check before you schedule the change.
MATRIX_DOMAIN behavior for existing users
Confirm exactly how whether existing accounts keep their current IDs when MATRIX_DOMAIN changes in the openDesk release you run. Synapse's server_name setting fixes how users and rooms are identified, so a change of name needs a plan for identities and rooms created under the old one. Ask the openDesk team to answer in writing, then test with a sample user and room on a non-production copy before you touch production.
Well-known files on your domain
Delegation requires your organization to publish discovery files at the exact well-known path on its own domain over HTTPS, so the team that runs that web server must agree to serve them. Confirm they can publish the files at that path and that no other rule on the host intercepts the request. Synapse can serve user IDs such as @user:example.com from another host on port 443, but federation otherwise uses port 8448 by default, so plan DNS and firewall rules for both. Check that your certificate process covers the host that serves these files.
Synapse federation docsContent Security Policy for widgets
The Element client and the bundled Element and Nordeck widgets load their own scripts, frames and connections, and a policy written for the old domain can block them after the switch. Take the CSP changes from the documentation for your release, then apply them to the widget hosts and the new Matrix domain. Confirm which Element and Nordeck widget versions the release ships, since the policy has to match them. Test chat, Notes and the other widgets in a browser after each change and check the console for blocked resources.
openDesk deployment READMEIngress paths for Matrix traffic
openDesk runs on haproxy-ingress or the deprecated Ingress nginx, and the controller you choose must route the Matrix client, well-known and federation paths on the new domain. Confirm with your platform team that the controller forwards the well-known and federation paths unchanged and that TLS termination sits where your design expects. Because Ingress nginx is deprecated, check its support status against your plan before you standardize on it. Also confirm that your Kubernetes version and cert-manager setup match the release requirements.
openDesk requirements docsDelegation support at federation partners
Delegation only works with partners whose Matrix servers resolve your well-known files and reach your federation endpoint. Ask each partner whether its server supports the same delegation, and agree on the server name and port with them before the switch. Confirm which partners you need to keep, because a federation allow list limits traffic to the listed domains and an empty list turns federation off. Test with one partner first, then record the result for every other partner.
Synapse configuration manualBundled Synapse and PostgreSQL versions
Confirm the Synapse version and the PostgreSQL version your openDesk release bundles or expects, since both set the upgrade and rollback path. Synapse 1.143.0 and later require PostgreSQL 14 or newer, and openDesk expects PostgreSQL 15 for production, so check that your database service matches. The upgrade notes warn that rolling back can be difficult because of database schema changes, so take a database backup before the change. The Synapse releases page lists v1.163.0, but the version in your openDesk release is the one that counts.
Synapse upgrade notesHow DeployOpen scopes and delivers a custom Matrix domain for openDesk
DeployOpen treats a custom Matrix domain for openDesk as a change that reaches DNS, certificates, the chat server and federation settings at once. We agree the scope in writing, build and test the change inside your infrastructure, and hand over a documented setup your own team can operate. Ongoing support is available as a retainer.
How we scope
- The written scope lists the domain, the homeserver names, the .well-known files and the Content Security Policy changes.
- We confirm which users, rooms and existing identities already use the current server name before any change is made.
- Fixed-scope engagements agree deliverables and timelines in writing before work starts, so changes to the domain stay visible.
How we build
- We set MATRIX_DOMAIN and the Synapse server name so chat IDs use your organization's domain consistently.
- We publish the .well-known delegation files so clients on port 443 find the homeserver without manual user settings.
- We adjust Content Security Policy headers for the chat and widget hosts, then check that every page still loads.
How we hand over
- Handover covers the values file, DNS and certificate records, delegation files and CSP settings, with the reasons for each.
- Federation tests after the change cover remote user lookup, room joins and message delivery with a partner server.
- The runbook records the rollback limits, since Synapse rollbacks can be difficult after database schema changes.
How we support
- Retainer support can cover Synapse upgrades, which need PostgreSQL 14 or newer for releases from 1.143.0.
- Re-testing federation after each openDesk or Synapse upgrade confirms that delegation and CSP settings still hold.
- Review the federation allow list when partner servers change, because the federation_domain_whitelist setting limits which domains can federate.

