Why Synapse rate limiting matters for a self-hosted server
Rate limiting on a self-hosted Synapse server is the set of per-server settings that cap how fast clients can perform sensitive actions, so you can stop credential stuffing, registration floods and room-join spam without throttling legitimate traffic. The four settings that matter most are rc_login for login attempts, rc_message for events sent to rooms, rc_registration for new account creation and rc_joins for joining rooms, with rc_joins split into local and remote joins in the configuration manual. Each of these is a rate limiter with a per-second rate and a burst count, so a single value can allow short spikes while holding sustained abuse to a lower average. You should tune them when your logs or metrics show repeated failed logins from a small set of addresses, sign-up waves you did not expect, or joins that flood a room, or when a bridge, bot or appservice starts reporting errors that match a limit being hit.
Before you change any value, confirm the exact keys and defaults for your Synapse version in the Synapse configuration manual, because option names and defaults are documented per release and you should not rely on values copied from older guides. Bridges, bots and other appservices often send many events or joins in a short period, so a limit that stops a spammer can also stall a bridge that is doing legitimate catch-up work. Synapse lets you set per-user overrides for specific accounts, which is the usual way to give service accounts more headroom without loosening the limits for everyone. Record the current values, the change you made and the metric you expect to move, then watch login failures, rate-limit errors returned to clients and bridge backlogs for a period before deciding whether the new numbers hold.
Which rate limit settings fit which abuse pattern
This table compares the four Synapse rate limit families and the per-user override mechanism by the traffic each governs, the abuse it targets, and the bridge or bot side effect to check. Read each row against your own traffic profile, and confirm every key name and default in the configuration manual for the Synapse version you run before changing anything.
| Setting | Traffic it governs | Abuse it targets | Bridge or bot side effect to watch |
|---|---|---|---|
| rc_login | Password and token logins, including repeated attempts from one address or account | Credential stuffing and brute-force password guessing against user accounts | Bridges and bots that log in often after restarts or token refresh can hit the limit and stop syncing |
| rc_registration | New account creation through the registration endpoint | Mass account creation used to seed spam rooms or abuse federation | Provisioning scripts that create service accounts in bulk may be throttled unless they run slowly or use an admin path |
| rc_message | Events sent to rooms by each user or application service | Spam floods, message bursts and automated posting from compromised accounts | Bridges relaying busy channels can exceed the per-user rate, causing delayed or dropped relayed messages |
| rc_joins | Room join requests, split into local and remote joins | Join spam, room hopping and automated sweeps of public rooms | Bots that join many rooms at startup or bridges that join portal rooms in bulk may be limited |
| Per-user overrides (ratelimit_override) | Specific accounts such as bridges, bots and service users, set per user ID | Overrides widen the attack surface if a service account is compromised | Keep override lists short, document each entry and review them when bridges or bots change |
| Application service exemptions | Traffic sent by registered application services (bridges and bots) | Limits on the application service path itself can be a misconfiguration source | Confirm in the configuration manual whether application services are exempt from which limits in your version |
| Limit values and burst settings | Per_second and burst_count values for each family | Too-low values slow legitimate traffic, too-high values leave abuse unchecked | Test with real bridge load in staging, since the right values depend on your traffic and not on a fixed figure |
How to tune Synapse rate limits without breaking bridges
This sequence turns rate limits from a guess into a tested configuration: you map every automated account first, then tighten limits per endpoint, grant overrides only where they are justified, and confirm with logs and metrics that normal traffic still flows while abusive patterns are throttled.
Inventory service accounts, bridges and bots
Before changing any value, list every account that sends traffic in bursts: appservice bridges, bots, moderation tools, integration users and any scripted accounts. For each one, record the user ID, what it does, how often it sends or joins rooms, and whether it runs from a fixed address. Owners of each integration should confirm the list, since bridges often create users that do not appear in the usual user directory. The step is done when every automated account has a named owner and a stated purpose.
Record the Synapse version and current limits
Note the Synapse version in use and the rate limit blocks currently set in homeserver.yaml, including rc_message, rc_login, rc_registration and rc_joins, along with any existing per-user overrides. Check the upgrade notes for the version you run, since defaults and option names can change between releases. Keep a copy of the current file in version control so any change can be reverted. The step is done when you have a written baseline that someone else on the team could read and reproduce.
Set conservative values for each endpoint
Adjust rc_login, rc_registration, rc_message and rc_joins one at a time, starting with the stricter values your own traffic can support. Login and registration limits are the usual target for credential stuffing, while message and join limits address spam and room flooding. Change one block per review so the effect of each is clear. Confirm the exact key names and their per_second and burst_count semantics against the Synapse configuration manual for your version. The step is done when the change set is reviewed and each value has a recorded reason.
Add overrides for known service accounts
For each automated account from the inventory, add a per-user override through the rate limit admin API or the matching configuration entry, sized to its measured traffic rather than set to unlimited. Keep overrides narrow, documented and reviewed, because each one is an exception that an attacker would want to compromise. Prefer a dedicated account for each integration over sharing one account across several bridges. The step is done when every override maps to an inventoried account and carries an owner and a reason.
Restart Synapse and confirm the configuration loaded
Apply the change during a planned window, restart the main process and any worker processes so they all read the new configuration, and check the startup log for configuration errors. Confirm that the homeserver answers client requests and that bridges reconnect without repeated errors. A mismatch between workers can cause some requests to follow old limits, so verify each process. The step is done when startup completes cleanly on every process and the bridges show a healthy connection.
Verify legitimate traffic is not rejected
Watch the logs and metrics for rate limit rejections, which Synapse reports with HTTP 429 responses, over a period that covers normal daily activity, including peak hours. Filter the rejections by user and endpoint to see whether any belong to real people or to bridges and bots. Ask bridge owners to report message delivery problems and compare them with the rejection records. Adjust any limit that blocks normal use and repeat the restart check. The step is done when rejections for legitimate accounts are absent or explained and documented.
Confirm abusive patterns are throttled
Test the setup with controlled, clearly labeled test accounts that send bursts of login attempts, messages and join requests, and confirm that Synapse rejects the excess and that the rejections appear in the logs and metrics. Ask the security team to review whether the thresholds would have slowed a real credential stuffing run, and record the results. Schedule the same check after each Synapse upgrade, since limit behavior can change. The step is done when the test results are saved and the team has signed off on the thresholds.
Per-user overrides for bridges, bots and appservices
Per-user overrides let an administrator change the rate limits for one specific account without changing the server-wide defaults. In Synapse they are managed through the admin API's rate limit endpoint for a user, where you set a messages per second value and a burst count for the account. Overrides are the right tool when a single appservice or bot needs more headroom than human users, while the rest of the server keeps its tighter limits.
- Find the account first: Confirm the exact Matrix user ID of the bridge or bot account, since the override applies to that user and not to the appservice registration as a whole.
- Call the admin API: Use the rate limit endpoint for the user with an admin access token, and record the values you set in your change log.
- Read the current value: Query the same endpoint before changing anything so you can restore the previous setting if a bridge misbehaves.
- Separate service accounts: Give each bridge or bot its own account so one override does not quietly raise limits for another integration.
- Remove overrides with the service: Delete the override when you decommission a bridge, so the limit does not outlive the workload.
Before you rely on this, check the admin API documentation for your Synapse version, because endpoint paths and fields change between releases. Confirm which of your bridges and bots actually hit the default limits in logs before granting any exemption.
The second audience decides which accounts qualify for an exemption and documents why. An override is a standing permission that bypasses a control, so it needs the same review as any other privileged access. Human power users such as community moderators or support staff may ask for higher limits, and the answer should depend on their role and on evidence of need, not on seniority.
- Define qualifying roles: Write a short list of account types allowed to hold overrides, such as bridges, moderation bots and named staff with a documented workflow.
- Set an approval step: Require a named owner and a ticket for every override, with a review date.
- Limit human exemptions: Prefer a short-lived, reviewed increase for a person over a permanent exemption, and confirm that such limits are visible in your admin records.
- Keep an inventory: List every account with an override, its owner, the limit, and the reason, and reconcile the list against active accounts each quarter.
- Tie to lifecycle: Remove overrides when a staff member changes role or leaves, as part of offboarding.
The inventory is also what auditors and internal reviewers will ask for first. Confirm with your own governance team how often reviews must happen before you set the cadence.
The third audience is the security reviewer, who asks what an attacker could do with an overridden account. A bridge or bot account often holds a long-lived access token, joins many rooms, and sends messages on behalf of external users. If its token leaks, a generous override means the attacker can send or join at a rate the default limits would have stopped. The override therefore widens the impact of a credential compromise, even though it does not create the weakness itself.
- Model the blast radius: For each overridden account, estimate how many rooms it can reach and how much traffic it sends if its token is stolen.
- Scope tokens tightly: Protect appservice registration files and bot tokens with a secrets manager, and rotate them when staff change.
- Watch for anomalies: Alert on overridden accounts that suddenly send traffic outside their normal pattern, such as joins to many new rooms.
- Avoid shared credentials: Do not let several services or people use one overridden account, because you lose attribution and cannot revoke one party without the others.
- Test the limit: Confirm in a non-production environment what the override actually bypasses, and document it for the reviewer.
The security review should end with a written statement of what each override permits and how it would be detected. Ask your Synapse support channel or vendor to confirm exactly which limits an override bypasses in your release.
How rate limits interact with federation and worker deployments
Rate limits apply on the process that handles client traffic, so their effect changes as soon as Synapse runs with workers or behind a reverse proxy. The rc_login, rc_message, rc_registration and rc_joins settings are read by the components that serve client-server API requests. In a single-process install that is the main process. In a worker deployment, the limits are enforced by whichever worker handles the matching endpoint, and the reverse proxy decides which worker receives each request. Before you tune any value, map each client endpoint to the worker that serves it, using the Synapse workers documentation, and confirm which process enforces each limit in your topology.
Federation traffic is governed separately. Requests from other homeservers arrive on the federation listener, usually on port 8448 or through delegation on port 443, and they are not counted against your client-side limits. A spam wave that arrives over federation therefore needs its own controls, such as federation_domain_whitelist and firewall rules on the federation listener, rather than a tighter rc_message. Check how your reverse proxy routes federation and client paths, because a misrouted path can leave a limit applied to the wrong process or bypassed entirely.
Plan a test before you change production values. Confirm the enforcing process for each limit, then send a controlled burst of login and message requests through the same proxy path your users take, and watch the rate limit responses from each worker. Repeat the check after any change to the worker layout, since adding a worker type or moving an endpoint can move enforcement to a different process. Ask your Synapse administrator or DeployOpen engineer to write down the mapping as part of the change record.
Where a login, message or join request meets a rate limit
The path starts with a client sending a login, message or join request to the reverse proxy, which forwards it to Synapse. Inside Synapse, the request reaches the rate limiter that matches its action, such as rc_login, rc_message or rc_joins. Requests from accounts with a per-user override skip the limit and are handled normally. Requests within the configured limit are also handled, while requests over it are rejected. Check that the proxy passes the real client address, because limits that depend on the address will otherwise apply to the proxy itself.
Requests reach the limiter inside Synapse, with overrides bypassing it.
Security risks of loose or missing rate limits
Synapse rate limits decide how fast an attacker can guess passwords, flood rooms or open accounts. The four risks below are the ones most likely to surface on a self-hosted homeserver, and each one points to a setting you can check before any limit is tuned.
Credential stuffing against logins
Attackers replay leaked username and password pairs against the login endpoint, often spread across many accounts to stay under per-account thresholds. Check that rc_login sets both a per-address and a per-account limit, and that failed attempts are visible in your logs. Without them, a single leaked list can test every account on the server. Confirm the limits with your team's test accounts before you rely on them.
Message floods and spam
A compromised or malicious account can post into many rooms at high speed, filling rooms, federating noise to other servers and degrading performance for your users. Review rc_message for both the default rate and any burst allowance, and test how a single account behaves under load. Federated spam is harder to stop after delivery, so the limit is your main early control.
Join floods and room hopping
Automated accounts that join large numbers of public rooms in a short time can flood the room directory and your server's state resolution work. Review rc_joins for local and remote joins separately, since the two traffic patterns differ. Check how a joined-room flood looks in your metrics before you lower the threshold, because legitimate bridges may join many rooms during setup.
Open registration abuse
If registration is open or only lightly gated, scripts can create accounts faster than staff can review them, and those accounts then serve as spam or login-attack infrastructure. Check rc_registration alongside your registration policy, and confirm which control, such as a token, CAPTCHA or SSO-only sign-up, stops bulk creation. Limits slow abuse but do not replace a decision about who may sign up.
Overrides left after service accounts end
Per-user overrides let bridges and bots run at higher rates, but an override that outlives its account is a permanent exemption from the limits everyone else follows. A retired or compromised bot account with a high override can send at volume without any throttle. Keep a written list of overrides, tie each one to an owner, and remove it when the account is decommissioned.
Monitoring as a control
Rate limits only protect you if someone sees when they trigger. Track rate-limit errors, failed login volume, join rates and registration counts over time, and set alerts for sudden changes. Ask your Synapse operator which metrics your deployment exposes and who receives the alerts, and test that an alert fires during a controlled burst before you treat monitoring as in place.
Questions operators ask before tuning Synapse rate limits
How much effort does tuning Synapse rate limits take?
Changing the values is quick, but measuring their effect is where the effort goes. The work splits into three parts: reading your current traffic and error logs, deciding which accounts and bridges need overrides, and testing each change against real login, message and join patterns before it reaches users. Effort rises with the number of users, the number of bridges and bots, how many clients and login paths you run, and whether your team has already documented normal traffic. A small server with a single client and no bridges is a short exercise. A server with several bridges, a federated community and service accounts needs a test plan and a rollback plan first. Confirm each key name and default against the configuration manual for your Synapse version before you edit anything.
Can our own team tune Synapse rate limits without a partner?
Yes, if your team already runs Synapse, reads its logs and can test changes in a non-production homeserver. The settings themselves are ordinary configuration keys in the homeserver config file, and the Synapse configuration manual documents each one. The harder skills are knowing which traffic is legitimate, such as bridge puppets, bots and monitoring probes, and recognizing abuse patterns in logs. Teams without those skills often tighten limits so far that bridges fail, or leave them so loose that credential stuffing goes unnoticed. A written inventory of service accounts and a staging copy of the server make an in-house exercise much safer.
What does our team need to provide for a rate limit review?
The work needs three inputs from your side. First, Synapse logs and metrics from a representative period, so the team can see how often logins, message sends and room joins hit the current limits. Second, a bridge and bot inventory that lists every application account, its homeserver, the rooms it joins and how often it sends. Third, test accounts on a non-production server that mirror real user types, including a normal user, a bridge puppet and a bot. Your team should also name an owner who can approve overrides and a window in which changes may be rolled out and reverted. Without these inputs, any tuning is guesswork.
How long does a safe rate limit tuning cycle take?
No duration can be stated from the researched facts, so confirm the timing with your own environment. The cycle length depends on how much traffic you have, how many bridges and bots need overrides, and how long you need to collect logs before deciding. A cycle usually includes a baseline period of observation, a staging test with simulated bridge and bot traffic, a controlled change in production, and a follow-up period to check for blocked legitimate activity. Each bridge you add lengthens the testing, because each one has its own sending pattern. Ask any partner for a written timeline that lists these phases and the evidence each phase produces.
When should we ask an outside team to help with rate limiting?
Ask for outside help when the server carries many bridges, a public federated community, or regulated data where a misconfiguration would matter. It is also worth asking when logs show credential stuffing or spam and your team cannot separate abuse from legitimate bursts. A partner can review the configuration, map service accounts, run tests against a staging copy and deliver a written change plan with rollback steps. DeployOpen plans, implements, hardens and tests self-hosted open-source platforms inside your own infrastructure, and most engagements are fixed-scope with the scope and timeline agreed in writing before work starts. A quote follows from that written scope.
What goes wrong when rate limits are set too tight?
The most common failure is that bridges, bots and application services stop working because their normal sending or join rate exceeds the limit. Users see delayed or missing messages from third-party networks, and bot commands fail without an obvious error. Operators often see these problems first in bridge logs rather than in user reports. Tightening limits on normal user accounts also frustrates people who join many rooms at once, such as after an invitation wave. Avoid the problem by putting service accounts on per-user overrides, testing each bridge against its new limits, and watching error rates for a full cycle after each change.
What does a rate limit review cost, and what drives the price?
Costs come from the people doing the work, not from the Synapse software, which is open source. For an in-house effort, the cost is staff time for log analysis, testing, change management and ongoing monitoring. For an outside partner, the cost is the agreed scope, which typically covers the number of homeservers, the number of bridges and bots to map, the size of the log set, the staging environment, and whether the team also reviews related settings such as registration and admin exposure. One-time work covers the initial review and test plan. Ongoing costs come from monitoring and periodic review as bridges change. Ask any quote to list the inputs, the testing environment, the rollback plan and the retest included.
Limits to confirm in your environment
Rate limit values only mean something for the Synapse release and authentication path you actually run. The cards below list what to confirm before you change anything, so the limits you set match your real traffic, your proxy layout and your upgrade plan.
Option names and defaults per release
Confirm the exact keys and default values for rc_login, rc_message, rc_registration and rc_joins in the configuration manual for the Synapse version you run, not the version you remember. Each key takes a per_second and burst_count pair, and defaults can change between releases. Record the effective values from your deployed config file, including any overrides already present, before you edit anything.
Configuration manualWho handles login: MAS or Synapse
Find out whether logins pass through Matrix Authentication Service or through Synapse's own login endpoints. In a MAS setup, the rc_login limit you tune in Synapse may not govern the traffic you are worried about, so the attack surface moves to MAS and its upstream identity provider. Confirm which component receives password and token requests before deciding where limits belong.
MAS upstream providersBridge and bot throughput needs
Measure how many messages per second your bridges, bots and integration accounts send and how many joins they perform during a normal day and during a backfill. Bridges often relay bursts from a third-party platform, so a limit that suits a human user can stall them. Give service accounts their own overrides and test them against realistic volume rather than guessing.
Client IP handling behind the proxy
Per-IP limits only work if Synapse sees the real client address. Confirm how your reverse proxy sets forwarding headers, which proxies are listed as trusted, and whether the listener is configured to read those headers. If every request arrives from the proxy address, one abusive client can exhaust the limit for everyone, or the limit never triggers at all.
Upgrade notes that change behavior
Read the upgrade notes for every release between your current version and your target before changing limits. Upgrade notes can alter defaults, rename options or change how limits apply, and rollback can be hard because of schema changes. Keep a record of the limits in force before each upgrade so you can compare behavior afterward.
Synapse upgrade notesMeasured effect on abuse and false positives
Track login failures, rejected requests, join denials and support tickets from legitimate users after each change. Confirm that your monitoring captures rate limit rejections so you can see whether attacks are being slowed and whether real users or bridges are being blocked. Adjust values in small steps and keep a rollback path ready.
How to confirm limits are working after a change
After you change rc_login, rc_message, rc_registration or rc_joins, confirm two things: that the limiter now rejects the traffic it was meant to reject, and that legitimate automation still gets through. Start with the Synapse server log. Requests that hit a limit are answered with an HTTP 429 response that carries a retry window, so searching the homeserver logs for 429 responses on login, send and join endpoints, grouped by user and by client address, shows which actors are being throttled. Run that search before the change as a baseline, then again after a set period, and compare. Confirm the exact metric names and any counters for rate-limited requests in the Synapse documentation against your version, because the names and the metrics endpoint setup depend on how you deployed Synapse.
Bridges, bots and service accounts need separate checks. A bridge that is throttled usually shows up as delayed or missing messages on the bridged side, retries with growing backoff in its own logs, or a steady stream of 429 responses against one bridge user ID rather than against human accounts. Compare that bridge user's 429 count with the baseline and confirm that any per-user override you set for it is the one being applied. Test by sending a controlled burst from a service account and by checking that the bridge catches up without manual intervention. If a legitimate actor is throttled, the fix is usually a per-user override for that account, not a global increase, so keep a record of which accounts you raised and why.
Plan the rollback before you apply the change. Keep the previous values in version control, make one change at a time, and write down the success signal for each. If rejections rise for human users or a bridge falls behind, restore the earlier values, restart Synapse using your normal process, and repeat the 429 comparison to confirm the old behavior is back. Ask your Synapse operator or vendor to confirm how configuration changes are applied in your deployment, since some settings require a restart. Treat the rollback path as part of the change, and test it in a non-production environment when one is available.
How DeployOpen scopes and supports Synapse hardening
DeployOpen treats Synapse rate limiting as part of a wider hardening scope for a self-hosted Matrix homeserver running in infrastructure you control. We agree the limits, the per-user overrides for bridges and bots, and the test evidence in writing before any configuration changes are made.
How we scope
- Inventory which logins, registrations, messages and joins need limits, and which service accounts and bridges must be exempt.
- Record the current rc_login, rc_message, rc_registration and rc_joins values and the traffic patterns they must tolerate.
- Agree in writing the fixed scope, deliverables and timeline before any work starts, with a quote based on that scope.
How we build
- Set rate limits in homeserver.yaml and per-user overrides for named service accounts, then review them against bridge and bot behavior.
- Test credential stuffing, spam and join bursts against a staging homeserver to confirm the limits block abuse without stalling legitimate traffic.
- Check that limits hold across all Synapse processes if the deployment uses workers, and that the reverse proxy does not mask client addresses.
How we hand over
- Deliver the final configuration, override list and rationale for each value, so your team can review every limit later.
- Document the test cases, observed results and the rollback steps, and note the Synapse version the settings were verified against.
- Walk your administrators through how to adjust limits, add an override for a new bridge and read the rate-limit log entries.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, so limits can be re-checked after each Synapse release.
- Retesting after major changes to bridges, bots, identity providers or federation policy is part of the ongoing support discussion.
- Confirm with your team who owns limit changes after handover, and agree how urgent abuse responses are escalated.

