Login rate limiting in Strapi

Strapi can slow repeated login attempts, but the limits only hold if the store they count in is shared by every instance. This page explains what to configure, when Redis is needed, and what to confirm for your version.

On this page

Why login rate limiting matters before go-live

Strapi can throttle login attempts, but the limits are only as good as the store that counts them. If the admin panel or an end-user login endpoint is reachable from the internet, password guessing and credential stuffing are routine risks, and a rate limit is one of the first controls a reviewer will ask about. Before go-live, confirm that login throttling is active on every path that accepts credentials, and plan where the attempt counters live. On a single instance, the default in-process store may be enough. Once you run several instances behind a load balancer, each instance can count attempts separately, so an attacker spreads requests across nodes and the effective limit quietly multiplies. Teams running more than one instance need to plan a shared store, such as Redis, before launch rather than after an incident.

Admin SSO and end-user login are separate paths. Administrator sign-in to the admin panel can go through an identity provider using Strapi's SSO feature, while end-user authentication is handled by the Users & Permissions plugin. Throttling, lock-out behavior and the endpoints covered may differ between them, so test each path on its own rather than assuming one setting covers both. Confirm the exact configuration keys, default intervals and limits against the Strapi version you run, since Strapi 5 minor releases ship often and middleware behavior can change between them. The Strapi SSO documentation is the right starting point for the admin side, and your own test results against your deployed version should be the final word.

Ask your team three questions before go-live: which login endpoints are reachable from outside your network, how many instances will count attempts, and where the counters are stored. If the answers are one, several and in memory, the rate limit is not yet protecting you. Record the settings you chose, run a failed-login test from outside the network against each path, and keep the result with your go-live evidence so that a reviewer can see the control was tested, not just configured.

Which login paths rate limiting covers

Strapi has several sign-in routes, and each one reaches the server differently and serves different users. Before you set limits, map every route that can issue a session or token, then confirm in the documentation for your exact Strapi version which of them the limiter wraps.

Admin panel password login

Editors, administrators and developers who sign in to the admin panel with a local email and password. This path is often targeted by credential stuffing when the admin URL is reachable from the public internet. Confirm coverage for your version in the Strapi docs, including whether the limit counts failures per IP address, per account or both. Test it by sending repeated bad passwords from one address and checking the response code and retry behavior.

End-user login through Users and Permissions

Website visitors, customers or members who sign in through the Users and Permissions plugin with the local provider. Because these accounts usually sit behind a public front end, this route receives the most anonymous traffic. Confirm that the limiter wraps the local authentication route in your version. A limit on login does not cover registration, password reset or email confirmation on its own, so check those routes separately.

Admin login through SSO

Administrators who sign in to the admin panel through an identity provider such as Microsoft Azure Active Directory. Failed attempts at the identity provider are usually handled by its own lockout and conditional access policies, not by Strapi's login limiter. If the local login lock-out option is not enabled, the password path may still be open, so check both sign-in paths. Review auto-registration and the default role before relying on SSO alone.

Strapi SSO docs

Token-issuing API endpoints

Scripts, mobile apps and front ends that call login endpoints directly to receive a JSON Web Token. These clients often retry after a failure, which can trip a limit or produce bursts that look like an attack. Confirm which token-issuing endpoints your version limits and whether the limiter keys on the address Strapi sees. Behind a reverse proxy or load balancer, every request may appear to come from the proxy unless forwarded headers are trusted correctly.

Password reset and registration routes

Endpoints that send email or create accounts, such as forgot-password and register. These are not sign-in routes, but attackers use them for account enumeration and for flooding a mailbox or mail provider. Confirm whether your version limits them and whether responses reveal if an account exists. Review the Users and Permissions email confirmation and default role settings alongside the limits, since they determine what an unauthenticated request can create.

Rate limit settings and when each fits

This table compares the four kinds of rate limit setting a team can change for Strapi login routes: the time window, the attempt count, the routes covered and the counter store. Read each row for the trade-off it creates, then match it to a public login form or an internal admin path. Exact key names and default values depend on your Strapi version, so confirm them in your configuration docs before you change anything.

SettingWhat it controlsWhen a tighter setting fitsTrade-off for legitimate users
Time windowThe period over which attempts are counted before the counter resetsPublic end-user login forms that attract credential stuffing, where a short window slows automated guessingA short window can lock out a user who mistypes several times in one session, and support tickets rise
Attempt limitHow many failed or repeated requests are allowed within one windowAdmin login paths that only a small set of staff use, where a low ceiling is easy to justifyShared office or VPN exit IPs can share one budget, so one colleague's failures can block others
Route scopeWhich paths the limit applies to, such as admin authentication versus end-user login or password resetApply stricter limits to admin login and password reset, and review whether public read endpoints need any limit at allBroad scopes catch legitimate API traffic, while narrow scopes leave alternate login paths unprotected. Test each path
Counter storeWhere request counts are kept: in memory for one process, or in a shared store such as RedisUse a shared store when several Strapi instances sit behind a load balancer, so each instance sees the same countA shared store adds a dependency. If it is unavailable, confirm whether requests fail open or closed in your setup
Client identityHow the requester is identified, usually by IP address, and whether a proxy header is trustedConfirm trusted proxy settings before relying on IP-based limits behind a reverse proxy or CDNA wrong proxy setting makes every user share one address, or lets attackers spoof the header to evade limits

Single instance or several instances: which store to use

A lone Strapi process keeps its login counters in its own memory, and every login attempt reaches that same process. This means the count is accurate for the whole deployment, so in-process counting may be enough for a low-risk site with modest traffic and no shared login surface. The trade-off is that the protection only holds while the deployment stays at one process.

  • Counter scope: every failed attempt is counted by the same process, so the limit applies to the whole site.
  • Restart behavior: a restart or redeploy clears in-memory counters, so confirm whether a reset window matters for your threat model.
  • Session handling: one process issues and validates sessions and tokens, so signing secrets only need to be consistent within that one process.
  • Scale limit: adding a second container or replica splits the count, which quietly weakens the limit without any visible error.

Before relying on this setup, confirm the replica count is fixed at one in your deployment manifests and in any autoscaling rules.

How a login attempt is counted across instances

A login request starts on the public side, passes a load balancer, and lands on one of several Strapi instances. Each instance checks the shared rate-limit store before the request reaches the database or identity provider, so every instance counts against the same tally. Admin sign-in through single sign-on takes its own path to the identity provider, separate from end-user sign-in handled by the Users and Permissions plugin. Check that the store is reachable from every instance and that both paths hit the same limiter.

Every instance checks one shared store before login reaches the database or identity provider.

How to configure limits and move the store to Redis

This sequence takes a Strapi project from default login behavior to rate limits that hold across every instance behind the load balancer. Each step ends with a check so the team knows the limits are enforced and shared before go-live.

  1. Confirm the Strapi version and runtime support

    The platform engineer records the Strapi version, the Node.js runtime and the database engine in use, then compares them with the installation requirements for Strapi 5. Strapi 5 supports PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.3 or later and SQLite 3, and it runs only on Active or Maintenance LTS Node.js versions. Confirm the exact versions against the installation documentation for the release you run, because the supported list can change between minor releases. The step is done when the team has a written version record for every instance and every environment, and nothing in that record falls outside the documented requirements.

  2. Record current login behavior with test attempts

    Before changing anything, the security engineer runs a controlled set of failed and successful sign-in attempts against the admin login and at least one end-user login route, using a test account on a non-production environment. The engineer notes whether responses change after repeated failures, what status codes and messages come back, and whether the limit appears to reset. This baseline shows which login paths are actually limited today and gives the team something to compare against after configuration. The step is complete when the baseline is written down for each login path and each instance.

  3. Decide window and threshold for each login path

    The security lead and the application owner agree a time window and an attempt threshold for the admin login, the end-user login and any other authentication route that accepts a password. They should set these values separately, because an editor login and a customer login carry different risks and different support costs. Document the reasoning, who approved each value and which lockout behavior follows from it. Confirm the configuration keys and their accepted units against the Strapi version you run, since the rate limiting settings are version specific. The step is done when a signed decision record lists each path, its window and its threshold.

  4. Provision Redis inside the same network boundary

    The platform team deploys a Redis instance in the same network segment as the Strapi instances, so the application reaches it without crossing an untrusted network. They enable authentication with a strong password or ACL user and, where the environment requires encryption in transit, turn on TLS and issue the certificates through the organization's normal process. The team restricts inbound access to the Strapi hosts only and stores the credentials in the secrets manager used for other Strapi secrets. The step is verified when a client on a Strapi host connects with the credentials and a client on any other host is refused.

  5. Point every instance at the shared store

    The developer updates the rate limit store configuration on every Strapi instance so each one writes its counters to the same Redis database, with the connection details and TLS settings taken from the secrets manager rather than from source control. The team confirms that all instances receive identical configuration by comparing the rendered settings or environment values, not by assuming that a template was applied. Verify the exact configuration keys and any Redis client options in the Strapi documentation for your version before deploying. The step closes when every instance reports the same store target in its startup logs or configuration dump.

  6. Restart and verify shared counts across instances

    The operator restarts all Strapi instances in a rolling or maintenance-window pattern and then sends failed sign-in attempts to the same login path through two different instances, using the same test account. If the counters are shared, the attempts from both instances accumulate toward one threshold and the lockout appears at the expected point regardless of which instance receives the final request. If counts stay separate, the store configuration is wrong and the team goes back to step five. The step is done when the combined failed attempts trigger the lockout across instances as designed.

  7. Test lockout and recovery

    The tester triggers a lockout on each login path, confirms the response to a locked account, then waits for the configured window to pass and checks that the account can sign in again with correct credentials. The tester also confirms that a successful login behaves as the decision record says and that lockout events appear in the team's logs or monitoring if the environment collects them. Record the results, including any path that did not lock, any path that locked too early and any unexpected status code. The step is complete when every login path passes the lockout and recovery tests and the results are attached to the change record.

Why in-memory counters fail behind a load balancer

A rate limit that lives in each Strapi process's memory counts attempts per instance, not per account. If the load balancer spreads login requests across four instances and the limit is five failed attempts per address per window, an attacker can make up to twenty attempts before any single process blocks them. Each added instance multiplies the budget. Password spraying and credential stuffing depend on exactly this kind of slack, so the effective limit becomes a function of how many replicas happen to be running. Autoscaling makes this worse, because the count an attacker can reach changes as instances start and stop, and a process that is recycled takes its counter with it.

The fix is a shared store, so that every instance increments the same counter for a given key. In Strapi, that means keying the limit on the account identifier and on the client address, and reading and writing both from one place. Keying on the account stops distributed guessing against a single user, and keying on the address slows a single source trying many accounts. Confirm with your own configuration which key each limiter uses, and test it by sending failed logins through different instances and checking that the count is shared. Redis is the common choice for this store, but the decision has to be made deliberately.

A shared store adds a dependency. Decide before go-live how logins behave if Redis is unreachable: fail open keeps authentication working but removes the limit during the outage, while fail closed protects the accounts but can lock out legitimate users. Either choice should be tested by stopping Redis in a staging environment. The store also becomes part of the security review. Restrict network access to it, require authentication, avoid exposing it on a public interface, and decide whether its persistence settings are acceptable, since a restart that clears counters quietly resets every limit. Ask your platform team who owns Redis, how it is patched, and where its logs go.

Security and operational risks to review

Rate limits protect login endpoints only when the proxy, store, lockout policy and edge gateway agree on who is attempting access and how failures are handled. The six risks below connect those layers, and each one names the control to verify and what to confirm in your environment before go-live.

Client IP behind the proxy

If Strapi sees only the reverse proxy address, every login attempt counts against one client, so a single attacker can lock out the whole user base or the limit never triggers. Verify that the proxy sets forwarded headers and that Strapi trusts only that proxy. Confirm which header carries the client IP in your load balancer and that spoofed forwarded headers from the internet are stripped at the edge.

Lockouts enabling denial of service

A strict lockout lets an attacker submit bad passwords against a known username and block the real user from signing in. Review the attempt limit and the lockout window together, and decide whether to key counters by account, by IP or by both. Confirm with your identity team how a locked user recovers, and whether support staff can clear a lock without bypassing the limit for everyone.

Redis exposed without authentication

When limits move to Redis, the store holds counters that an attacker could reset or flush to erase the protection. Bind Redis to a private network, require authentication and TLS where the client supports it, and restrict access to the Strapi hosts only. Confirm that the Redis instance is not reachable from other tenants or public subnets and that its ports are closed at the perimeter.

Personal data in failed-attempt logs

Logging every failed login with the submitted identifier can store email addresses and, in some cases, mistyped passwords in plain text. Review what the application and proxy write to logs for authentication requests, and set retention and access rules for them. Confirm with your privacy team that log fields are minimized and that log access follows the same role model as the data it describes.

Admin lockout during identity outage

Admin SSO sends administrators to the identity provider, so an outage there can leave no one able to sign in to the admin panel. Strapi's SSO settings include an option to lock out local login, which is useful for control but removes the fallback. Decide in advance who holds a break-glass path, where its credentials are stored, and how it is tested. Confirm that this path does not bypass the rate limits on the same endpoints.

Strapi SSO docs

Limits missing at the edge gateway

Application-level limits run only after requests reach Strapi, so floods still consume gateway and network capacity and can bypass limits if traffic reaches the origin directly. Set matching limits on the edge gateway or load balancer for authentication paths, and make sure the origin accepts traffic only from that edge. Confirm which layer owns each limit, what happens when Strapi instances are restarted, and whether the counts at the two layers are aligned.

What to confirm in your version and environment

Do not rely on any rate limit value until you have checked it against the exact Strapi 5 release pinned in your project. Strapi ships minor releases roughly weekly, so documentation read from a newer or older release may describe configuration keys, defaults or behavior that your build does not have. For the pinned version, confirm the configuration keys that control admin login limits and end-user authentication limits, their default values, and the units used for the time window and the attempt count. Read the generated configuration files and the rate limiting code in your installed package, then record the confirmed values in the same repository as the rest of your configuration.

Next, confirm whether the store option that holds the attempt counters is documented for that version, and which backends it supports. Do not assume that Redis is supported because it is common in multi-instance deployments. Confirm the exact option name, how the Redis connection is configured, and whether the setting applies to both admin and end-user routes or only one of them. Then test the setup with two running instances: a burst of failed logins sent to one instance should count toward the limit on the other. If the counters stay separate, the limit is per instance, and your multi-instance design needs to change before go-live.

Confirm how the proxy and trusted IP settings affect counting. Limits are usually keyed on the client address, so a reverse proxy or load balancer that is not trusted can make every login appear to come from one address, which locks out all users at once. Trusting forwarded headers from clients you do not control lets an attacker choose the address being counted. Check the proxy setting in your server configuration against how your ingress sets forwarding headers. For SSO, the Strapi SSO documentation describes an optional local login lock-out. Confirm how that setting interacts with admin rate limits, and whether it can block the break-glass account you need during an identity provider outage.

Limits and open questions to settle

Rate limiting for Strapi login touches versioning, shared state, token handling, and identity provider design. Each item below is a question to settle with Strapi or in your own environment before limits go into production, because the answers change the configuration and the failure behavior.

Store integration for your version

Confirm that the Redis-backed store you plan to use is supported for the Strapi version you run, and whether it applies to admin login, end-user login, or both. Strapi 5 supports PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.3 or later and SQLite 3 for the database, but the rate limit store is a separate question. Ask Strapi or check the configuration reference for the version you are on before you assume shared counting works.

Installation requirements

Redis failover and counting

Ask what happens to counters when the Redis primary fails over to a replica, and whether a failover can reset or lose attempt counts. A reset during an active password guessing attempt would widen the window for brute force. Also decide whether the application should fail open or fail closed when Redis is unreachable, and test that behavior in staging rather than discovering it during an incident.

Token refresh and API routes

Confirm whether the limiter covers token refresh, password reset, registration and API authentication routes, or only the login endpoint. An attacker who cannot pass login may still probe refresh or reset flows. Map each authentication route in your Users & Permissions setup and check it against the limiter's route matching in the version you run, then test each one with repeated requests from a single client.

Admin SSO licensing

Confirm whether your plan must include admin SSO before you plan limits for the admin panel. In Strapi's self-hosted plans, SSO is an add-on for Growth and included in Enterprise, so a Community deployment may need a different approach for admin sign-in. Ask Strapi which plan and add-on your SSO design requires, and whether the audit logs you need for login review are on that same tier.

Self-hosted pricing

Limits and the identity provider

Check how the chosen limits interact with your identity provider. When admin login is delegated to a provider such as Microsoft Azure Active Directory, failed attempts may happen at the provider rather than in Strapi, and a local login lock-out may still be needed as a fallback. Confirm which layer enforces each limit, who is locked out when the provider is down, and how an administrator unlocks an account.

Strapi SSO docs

Questions teams ask before changing login limits

How much effort does moving Strapi login rate limits to Redis take?

The effort depends mainly on how many Strapi instances run, how the current limits are defined, and whether your team already operates Redis. A single instance with a Redis store is a contained change to configuration plus a test pass. Multi-instance setups add work: confirming that every instance points to the same Redis endpoint, checking how failover behaves, and testing login throttling from several nodes at once. Admin login and end-user login should be tested separately, since they can carry different limits. Before accepting a quote, ask for a written list of environments, instance count and test cases, because those inputs set the scope.

Can our own team change Strapi login limits without outside help?

Yes, a team with Node.js and Strapi experience can change interval and limit values in the project configuration and test them locally. The harder part is the Redis move, because it touches deployment, network policy, secrets and monitoring. Teams usually decide based on three things: whether someone owns the Strapi codebase, whether they can reproduce multi-instance behavior in staging, and whether they have operational experience with Redis. Outside help is most useful for the test plan, for confirming that limits hold across instances, and for documenting the result for a security review. DeployOpen can plan and implement this as a fixed-scope engagement, with scope agreed in writing first.

What does the work need from our team before it starts?

The work needs a few concrete inputs from your side:

  • Access to the Strapi project repository and the deployment pipeline, with the Strapi version confirmed.
  • Network paths from every Strapi instance to the Redis endpoint, plus rules for who can reach Redis.
  • Identity provider details if admin SSO is in use, and a list of the admin roles that must keep working.
  • Redis hosting, either a managed service or a cluster your team runs, with credentials stored in your secrets process.
  • A staging environment that matches production instance count, so multi-instance behavior can be tested before release.

Missing any of these usually moves work into a later phase, so confirm them in the written scope.

How long does a Strapi Redis rate limit change take?

No fixed duration applies here, because the answer depends on the Strapi version in use, the number of instances, the state of your existing Redis service and the approval steps your organization requires. A project already on a current Strapi 5 release with a staging environment and an operated Redis cluster has fewer open items than one that needs network changes or a version upgrade first. Strapi 5 minor releases ship frequently, so confirm the target version early and avoid planning around a release that may change. Ask for a timeline in the written scope, and check that it lists the review, staging and rollout steps separately.

Can we change Strapi login limits later without downtime?

Changing limit values is usually a configuration change, but each instance typically needs a restart or rolling deployment before the new values load, so confirm this against your deployment setup. Moving the store to Redis is a larger change. During a rolling rollout, some instances may use the old in-memory store while others use Redis, so limits can be split for a short period. To avoid surprises, test the rollout order in staging, watch login error rates during the change, and agree on a rollback path. Plan a maintenance window if your organization does not accept inconsistent limits during rollout.

What does running Redis for login limits cost?

The Strapi pricing page covers Strapi plans, not Redis, so no Redis price is given here. Redis cost usually has four parts: hosting, either a managed service fee or servers and storage you run yourself; operator time for patching, monitoring and capacity checks; backup and failover components; and network traffic between instances and Redis. Setup work is largely one-time, while hosting and operations recur. On the Strapi side, the Community plan is free, and the Growth plan is listed at 45 US dollars per month including 3 users, with 15 dollars per extra user. Check Strapi's self-hosted pricing page for current plan terms. DeployOpen provides a quote from a written scope.

Does Strapi SSO remove the need for local admin rate limits?

No. Strapi SSO covers administrator login to the admin panel through an identity provider, with options for auto-registration, a default role and an optional local login lock-out. It does not change end-user authentication, which the Users and Permissions plugin handles separately, so end-user login limits still apply. Even for administrators, keep a local lock-out or rate limit as a fallback in case the identity provider is unavailable, and confirm how that setting is configured. SSO is an add-on for the Growth plan and is included in Enterprise, so check plan terms before relying on it. Review the Strapi SSO documentation for the exact options.

How DeployOpen scopes and delivers login rate limiting

DeployOpen treats login rate limiting in Strapi as a scoped piece of work on your own infrastructure, starting from how your admin and end-user logins actually reach the server. The written scope defines the limits, the store and the verification evidence before any configuration changes are made.

How we scope

  • Map which login routes need limits: admin sign-in and end-user sign-in through the Users and Permissions plugin.
  • Agree the limit intervals, thresholds and lockout behavior with your security team before any change.
  • Confirm the number of Strapi instances and whether limits must hold across them, which decides if Redis is in scope.

How we build

  • Configure the Strapi rate limit settings in your project and document each value and its reason.
  • Plan and build the Redis store for shared limits, including network placement and access controls for the store.
  • Test failed-login bursts against each instance and confirm that counts hold across the cluster before sign-off.

How we hand over

  • Deliver a written configuration record listing every limit value, store setting and the environment it applies to.
  • Provide test scripts and results showing blocked and allowed login attempts for admin and end-user routes.
  • Walk your platform and security teams through how to change limits, read the logs and handle a Redis outage.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, Strapi upgrades and continuous testing are available as a retainer if limits need periodic review.
  • Ask for a quote based on your written scope, which sets out the components, effort and recurring items.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.