How the Matrix public room directory works and when to control it
If your Synapse server is internal, staff may want to publish rooms so colleagues can find them, and if it federates, outsiders could browse your list. Synapse keeps rooms out of the public room list by default: the room_list_publication_rules setting defaults to null, which denies publication unless a rule explicitly allows it. Publication must therefore be allowed on purpose, and the decision belongs in your configuration review rather than being left to room creators.
The directory is a server-wide list of rooms that have been published, and its entries typically carry the room name, topic and member count, as the Synapse documentation describes. Confirm the exact fields your Synapse version returns by creating a test room, publishing it, and querying the directory from an account on your server and from an unauthenticated client. Who can read the list depends on two more settings: allow_public_rooms_without_auth, which defaults to false so that a valid session is needed, and allow_public_rooms_over_federation, which defaults to false so that remote servers cannot fetch your list.
An internal server needs its own decisions here because the defaults protect a federated server but say nothing about your staff's expectations. A published room on a server that only your employees can reach is still visible to everyone who has an account, so the room directory becomes a policy question about project names, client references and internal channels. Write down who may publish, which rooms are meant to be discoverable, and whether an admin reviews entries, then confirm those rules in your staging environment before any user is onboarded.
Matrix public room directory settings and when each fits
This table compares the three Synapse settings that decide whether rooms appear in the public room directory, who can see them, and whether other servers can. Read each row for the default, what enabling it changes, and the value an internal server usually keeps. The main takeaway is that all three start closed, and an internal server should leave them that way unless a specific audience needs access.
| Setting | Default | What enabling it changes | Usual setting for an internal server |
|---|---|---|---|
| room_list_publication_rules | null (denies publishing) | Allows rooms that match a rule to be published to the room list. Rules are evaluated per room, so publishing stays limited to chosen rooms. | Leave unset, or confirm the rule syntax in the configuration manual before adding any rule |
| allow_public_rooms_over_federation | false | Lets other servers fetch the public room list from your server. Rooms published locally can then be discovered by remote users. | false, so the directory is not visible to other homeservers |
| allow_public_rooms_without_auth | false | Lets anyone reach the public room list without logging in. Unauthenticated visitors could browse published room names and topics. | false, so only signed-in accounts can search the directory |
| Combined effect when all three are open | Closed by default | Published rooms become visible to anonymous users and to remote servers, which widens exposure beyond staff accounts. | Keep closed unless the server hosts a public community that needs discovery |
| Publishing a room with no rule matching | Not listed | A room stays out of the directory even when the directory settings are enabled, until a rule matches it. | Expect no rooms listed by default, so confirm which rooms staff expect to find |
| Room visibility set by room creators | User choice | Members can mark a room as public in their own client, which does not by itself add it to the server directory. | Review room settings and admin policy, since client choices do not replace server rules |
How a directory request passes through the Synapse checks
A request to the room directory starts at the client and is checked by the homeserver in order: whether the requester is authenticated, whether unauthenticated access is allowed, whether the request came from a federated server and that server is permitted, and finally whether a room_list_publication_rules entry lets the room be listed. Each unmet check ends in denial, which is the default, so an internal server should confirm that every path it does not intend to open stops at a denied outcome.
Default outcome is denial at every check not explicitly allowed.
Directory settings for internal, federated and public servers
An internal server serves one organization and should not appear in the public room directory at all. Start from the safe defaults: room_list_publication_rules is null, which denies publishing unless a rule allows it, allow_public_rooms_over_federation and allow_public_rooms_without_auth both default to false, and no room is added to the list. For a server that must not talk to anyone else, set federation_domain_whitelist to an empty list, which disables federation entirely.
- Keep the defaults: Leave
allow_public_rooms_without_authandallow_public_rooms_over_federationat false so the directory requires a logged-in account and is not shared with other servers. - Disable federation if it is not needed: An empty
federation_domain_whitelistturns federation off, so rooms and users cannot be reached from other homeservers. - Firewall the federation listener: The Synapse documentation recommends blocking the federation port (8448 by default) at the network level even when federation is restricted, so the listener is not reachable from outside.
- Limit visibility to inside the company: Use a Synapse user directory setting only if colleagues need search, and keep room publication off.
- Confirm the policy: Ask the security owner whether any external federation is permitted and who approves exceptions.
Confirm with the compliance or security owner that no room metadata is intended to leave the network and that the firewall rules match the documented configuration.
A federated server takes part in the wider Matrix network and may want some rooms to appear in the directory of other homeservers. Here the publication rules and federation settings must be combined deliberately, because publishing over federation is off by default. Allowed rooms are limited by room_list_publication_rules, and federated visibility is separately enabled with allow_public_rooms_over_federation.
- Enable federation with a whitelist: List only the partner domains in
federation_domain_whitelistso that other servers you have agreed to work with can connect, and nothing else can. - Publish selected rooms only: Write
room_list_publication_rulesentries that match specific rooms or aliases, instead of allowing broad publication, so only intended rooms are listed. - Enable federated directory access deliberately: Set
allow_public_rooms_over_federationto true only after the publication rules are in place, so other homeservers can read the listed rooms. - Keep unauthenticated access off: Leave
allow_public_rooms_without_authfalse so that federated and local users still need an account to browse. - Firewall and document the listener: Expose the federation listener only to the allowed networks and record which partner domains are listed.
The trade-off is that every published room becomes discoverable to partner servers, so room names, topics and membership signals are shared beyond your organization. Confirm with the compliance owner which rooms may be published and how partner domains are reviewed over time.
A server that publishes rooms to anonymous visitors is the most exposed configuration. Anyone on the internet can browse the directory without an account if allow_public_rooms_without_auth is set to true. This setting should only be used for rooms that are meant to be public, on a server whose purpose is public communication, and after a documented review of what the directory reveals.
- Enable unauthenticated access only with intent: Set
allow_public_rooms_without_authto true only for a server whose purpose is public listing, and pair it with narrowroom_list_publication_rules. - Decide on federation separately: Choose whether
allow_public_rooms_over_federationis also true, since public and federated listing have different audiences and different risks. - Restrict publication to reviewed rooms: Publish only rooms that have an owner, an agreed moderation approach and a clear public purpose.
- Plan moderation for public rooms: Public rooms attract spam and abuse, so set up reporting, moderation and room removal before publishing.
- Log and review: Keep a record of which rooms are published and review the list on a schedule the owner approves.
Confirm with the security and compliance owner who accepts responsibility for public content, what abuse handling applies, and whether the server's data-handling obligations cover anonymous visitors. Rules that are wrong here are visible to everyone, so test the directory from an unauthenticated browser before go-live.
Setting up the directory on a Synapse server
This sequence sets the three directory settings in homeserver.yaml to a deliberate policy, restarts Synapse, and confirms that rooms you did not approve for listing stay out of the directory for logged-out users and for other servers. The result is a directory that matches your audience, with a recorded baseline you can roll back to.
Record the current directory settings
Before changing anything, the Synapse administrator opens homeserver.yaml and notes the values of room_list_publication_rules, allow_public_rooms_over_federation and allow_public_rooms_without_auth. If a key is absent, record that as well, because Synapse applies its defaults. Check the running config file path in your deployment, whether it is a file on disk or a generated config in a container or ESS Helm values. Keep a copy of the file in version control or a dated backup. The step is done when you have a written baseline of all three settings and the file you will edit is confirmed.
Define the intended directory audience
Before writing any rule, the security or platform owner and the community or IT lead agree on who should be able to find rooms: only signed-in members of your organization, or anyone on the internet and other homeservers. Write down which room categories, such as company-wide announcements or a public support space, are approved for listing and which are not. Synapse denies publication by default, so this list is what you will translate into rules. The step is done when the approved audience and the list of approved rooms are signed off in writing.
Set publication rules for approved rooms only
The Synapse administrator sets room_list_publication_rules in homeserver.yaml so that only the approved rooms or room categories can be published. The rules are evaluated in order and the default is null, which denies publishing, so a rule must explicitly allow each approved case. Keep the rules narrow and tie them to the approved list from the previous step. Validate the YAML syntax with your normal tooling before restarting. The step is done when the rules match the signed-off list line for line and the file parses without errors.
Keep unauthenticated and federated access off
Confirm that allow_public_rooms_without_auth and allow_public_rooms_over_federation are both set to false, or are removed so the false defaults apply. For an internal server, leave them off unless the audience decision in step two explicitly allows logged-out or cross-server listing. If you enable either one, record the reason and the rooms it exposes in your change log. The step is done when the file shows both values as false, or a documented exception exists for each one set to true.
Restart Synapse and confirm the config loaded
Restart the Synapse process, or the container or Helm release that runs it, so the new directory settings take effect. Then review the startup log for configuration errors and confirm the service reports healthy. A failed parse will stop Synapse from starting, which is a sign to restore the baseline copy from step one. The step is done when Synapse is running and the log shows no configuration errors related to the directory keys.
Verify from a logged-out client
Open your server's web client or a Matrix client in a private browser session without signing in, and try to open the room directory. Published rooms should not appear, and rooms outside the approved list should be absent. Then sign in with a normal test account and check that the directory shows what that account should see. Record the result for each approved and unapproved room. The step is done when the logged-out view shows no unexpected rooms and the signed-in view matches the policy.
Verify from a second homeserver
Use a separate homeserver, such as a test instance you control or a federated account on another server, to query your server's public room list. If allow_public_rooms_over_federation is false, the rooms should not be listed to that server. Confirm your firewall and federation settings behave as your policy expects. Keep this test outside your production network path. The step is done when the second server cannot see any room you did not approve, and the results are logged with the date and Synapse version.
Document the rollback path
Write a rollback note that names the baseline file from step one, the three setting values to restore, and the restart procedure. Include who can approve a reversal and where the change record lives. Note that any change to these keys only affects what the directory publishes, so restoring the old values and restarting returns the previous behavior, but rooms already published under a looser policy may remain visible to clients that cached them until they refresh. The step is done when the note is stored with the configuration and the on-call team has read it.
What publishing a room exposes to other users and servers
Three separate settings decide who can find and reach a room, and they are easy to confuse. A room is joinable when someone with the right invitation or join rule can enter it. A room is listed when it appears in the server's public room directory, which is the list people browse. A room is shared over federation when that directory listing is also visible to other servers. The Synapse configuration manual treats these as independent controls: room_list_publication_rules decides which rooms may be published to the list at all, allow_public_rooms_over_federation decides whether other servers can read your list, and allow_public_rooms_without_auth decides whether anyone can read it without logging in. Each defaults to null or false, so a room that was never published stays off the list. Confirm the values in your own homeserver.yaml rather than assuming the defaults still hold after an upgrade or a config change.
Rooms created by staff for company use are the usual source of surprise. A project room, an incident channel or a onboarding room may be set to a public join rule for convenience, then published by an admin who assumed it was internal. Rooms that hold personal data, customer details, HR cases or security material should never be listed, and the room's name and topic are visible in the listing even when its history is not. A published listing also outlives its purpose: a room created for a one-off event can keep appearing after the event ends and its members have moved on. Treat each publication as a decision with a named reason, and remove the listing when that reason ends, because unpublishing does not remove existing members or history.
Assign one owner, such as the platform team lead or a named administrator, to approve every change to the directory, and schedule a recurring review of the published list against the rooms that should still be there. Ask for a review record each time, including who approved the listing, the purpose, and the date of the next check. For an internal server, the safe starting point is an empty list with unauthenticated access and federated access both off, and each exception added only after its owner signs off. Confirm how your admin tools expose the directory before you rely on it, since the review process depends on being able to see the full list.
Securing the Matrix public room directory against accidental exposure
A public room list is off by default in Synapse, so exposure usually comes from a change someone made on purpose or a setting that drifted over time. The cards below pair each risk with the Synapse setting, admin step or firewall rule that prevents it and the signal to watch.
Accidental publication by room owners
Room owners can ask to list their room in the directory, and an admin approves it only if a publication rule allows it. Check that room_list_publication_rules is set deliberately rather than left at its default, and confirm which rooms are currently published. Keep a written rule for who may approve listings, and review the published list on a fixed schedule so a room created for a project does not stay visible after the project ends.
- Default publication rules
- null
Unauthenticated directory access
If allow_public_rooms_without_auth is enabled, anyone who can reach the homeserver can read room names and topics without signing in. For an internal server, that exposes project names, team channels and client names to outsiders. Confirm the setting is false, then test the directory endpoint from outside your network with no credentials to verify the response is refused.
Federation sharing the list
With allow_public_rooms_over_federation enabled, remote servers can fetch your published room list. Keep it disabled unless you deliberately want other homeservers to see your rooms. If your server federates at all, check the federation_domain_whitelist setting, which limits federation to listed domains, and confirm the federation listener on port 8448 is reachable only from the servers you intend to reach.
- Default federation sharing
- false
Firewall gaps on the federation listener
The Synapse documentation recommends firewalling the federation listener even when the whitelist is set, so a setting mistake does not expose the server. Write the firewall rule as an allow list for the remote domains you need, deny everything else on the federation port, and test it from a host that is not on the list. Keep the rule in your infrastructure-as-code so it survives host rebuilds.
Synapse federation docsDrift after later changes
The directory settings are often correct on the day a server is installed and then changed during a later upgrade, a config merge or a troubleshooting session. Store the Synapse configuration in version control, require review for any change to the three directory settings, and compare the live configuration against the reviewed file on a schedule. Upgrade notes should be read for any change to these options before a release is applied.
Unreviewed listings after staff changes
When an administrator who approved listings leaves, or when a new admin takes over, the review habit can lapse without anyone noticing. Name an owner for the published list, record each approval with the requester and the reason, and remove the approving account's admin rights during offboarding. Ask your Synapse administrators to confirm who can change room visibility and who can approve listings.
Questions teams ask before changing the Matrix room directory
Is changing the Matrix room directory a configuration change or a project?
For a single Synapse server with a short list of rooms, it is usually a configuration change: you set room_list_publication_rules, restart the homeserver and check the result. It becomes a project when many rooms have different owners, when rooms are already published, or when federation and policy decisions need sign-off. The default is that no rooms are published, because room_list_publication_rules defaults to null. Any change you make starts from that closed state, so the work is mostly deciding which rooms should be visible and who approves that.
How long does a room directory change take?
No duration is supplied for this work, so ask for a written scope with a timeline before you commit. The time depends on how many rooms need review, how many owners must confirm their rooms, whether a test server is available and whether your existing rules need to be untangled. A small server with an agreed list can move quickly; a large server with unclear room ownership usually takes longer on the decision steps than on the configuration itself. Ask any provider to break the timeline into review, rule drafting, test verification and rollout.
What does the work need from our team?
You need three things. First, an administrator who can edit homeserver.yaml and restart Synapse in a controlled change window. Second, a current list of rooms with their owners, including which rooms are meant to be private, internal or open. Third, a written policy on public listing that says who may request a room be published and who approves it. Without the policy, the configuration will reflect whoever edits it last, which is the most common source of rework.
Can our own admins make this change without outside help?
Yes, if the server is internal, the room list is small and someone on your team understands Synapse configuration and the effect of a restart. Start by reading the Synapse configuration manual for the room directory settings, keep both allow_public_rooms_over_federation and allow_public_rooms_without_auth set to false unless you have a reason to change them, and test on a non-production server first. Outside help is most useful when the decision about what to publish is contested or when the server already has rules that nobody documented.
What does a partner add to a room directory change?
A partner typically adds an independent review of the existing room list and published rules, a written rule set that maps each rule to a stated policy, and verification on a test server before anything reaches production. The review often finds rooms that are published without an owner's knowledge or rules that overlap in ways that expose more than intended. Ask for the deliverables in writing, including which settings are tested, how results are recorded and what happens if a rule needs to change after rollout.
What makes the effort grow for a room directory change?
The main drivers are the number of rooms and owners to review, the amount of federation traffic that reaches the directory, and the number of existing publication rules that must be understood before they are replaced. Federation matters because allow_public_rooms_over_federation controls whether other servers can see your directory, so any published room may be discovered beyond your users. Existing rules that were written without documentation take longer to audit than a clean default. Each added policy exception, such as a rule for one team, adds review and test cases.
Should we confirm the directory settings on a test server first?
Yes. Test the rules on a copy of your configuration before you change the production homeserver, because a mistake can expose room names or topics to users or to other servers. Check three things on the test server: that unpublished rooms stay out of the list, that the list is empty when unauthenticated access is off, and that federation behavior matches your decision. Record the settings you tested so the change can be repeated and reviewed later.
Limits to confirm in your environment before changing the directory
The directory settings look simple, but their effect depends on your exact Synapse version, how your clients and bridges read the directory, and how the federation listener is reachable. Confirm these four to six points before you change any rule, so the change does what you expect on your server.
Exact rule syntax and matching
Confirm the syntax and matching behavior of room_list_publication_rules in the configuration manual for your Synapse version, and read the upgrade notes for every release between your current version and your target. Ask your internal team or vendor to show which rule matched a test room, and whether an unmatched room is denied. Because the setting defaults to null, a rule you did not write publishes nothing.
Handling of already published rooms
Ask how rooms that are already listed are treated when a rule changes. Changing the rule may not remove a room from the directory, so test with one room, check the directory from a client, and confirm the removal path before you rely on it. Record which rooms were listed before the change so you can compare afterward.
Other readers of the directory
Identify every client, bridge, bot or integration that calls the public room list. Some may cache results or query the directory directly, so a rule change can look incomplete to them. Ask each owner whether their tool reads the directory, how often it refreshes, and whether it needs a published room to function.
Federation listener exposure
Confirm how the federation listener on port 8448 is reachable from your network and from other servers. The allow_public_rooms_over_federation setting only matters if remote servers can reach you, so check firewall rules, reverse proxy routes and any federation domain allowlist. Ask your network team to confirm the listener is exposed only where you intend.
Unauthenticated access path
Check whether anonymous clients can reach the room list through your public hostname. The allow_public_rooms_without_auth setting defaults to false, so confirm that the value in your file is not overridden elsewhere and that your reverse proxy does not expose the directory endpoint in a way the config does not expect. Test from an unauthenticated session after each change.
Version match with the docs
Confirm that the Synapse version you run matches the documentation you are reading. Compare your installed version with the release page and the documentation version selector, because option names and defaults can change between releases. Ask your vendor or team to state the exact version in writing before the change window opens.
Synapse releasesHow DeployOpen scopes and delivers Matrix directory controls
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure. For the Matrix public room directory, that means agreeing which rooms may be published, which access paths stay closed, and how the settings are verified and handed over before the server is used.
How we scope
- Confirm whether the server is internal, federated, or both, and who needs to find rooms.
- Map which rooms, if any, may be published under room_list_publication_rules before any rule is written.
- Decide whether directory publishing over federation and unauthenticated access stay disabled or are approved exceptions.
- Record scope, deliverables and timelines in writing; engagements are fixed-scope and quoted from that scope.
How we build
- Set the directory defaults in homeserver configuration and confirm they match the approved room publication policy.
- Test with unauthenticated and federated requests to confirm private rooms do not appear in the directory.
- Review room visibility and join rules for rooms that are meant to be listed, with the owners of those rooms.
- Check the configuration in staging before the change reaches production, and keep the change under version control.
How we hand over
- Deliver a written record of the directory settings, the approved publication rules and the reasons for each one.
- Document the test cases used to confirm directory behavior so your team can repeat them after upgrades.
- Walk administrators through how to publish or unpublish a room and who approves the change.
- Include a checklist for reviewing directory settings whenever the homeserver configuration is changed.
How we support
- Retest the directory controls after Synapse upgrades, since configuration behavior can change between releases.
- Review new publication requests and rule changes against the approved policy during ongoing support.
- Ongoing support, upgrades and continuous testing are available as retainers, scoped in writing.
- Confirm with your own security and compliance teams which evidence they need for directory access controls.

