Two-factor authentication in Rocket.Chat

Rocket.Chat supports TOTP authenticator apps and email codes as second factors, and paid plans can enforce them per role. This page explains how to choose and roll them out for a self-hosted workspace.

On this page

How two-factor authentication in Rocket.Chat works and when to enforce it

Two-factor authentication in Rocket.Chat adds a second proof of identity on top of the password, so a stolen password alone does not open a workspace that holds internal or regulated conversations. Teams should enforce it when their self-hosted workspace carries information that a single compromised credential could expose, and when they can name who must comply and how they will recover access. The free Starter plan includes multi-factor authentication, so a small workspace can start with a second factor without a paid license. Per-role enforcement, which limits the requirement to selected roles, is a premium capability, so confirm its current status against the Rocket.Chat plans page before you design the rollout around it.

Before you switch anything on, decide which users and roles must present a second factor and which methods they may use. Rocket.Chat supports authenticator apps (TOTP) and email codes, and the two behave differently. Email codes are the practical option for users who sign in through an external identity provider, but they depend on the security of the mailbox that receives them. Map each user population to a method, then test the full sign-in path for each one, including the path a user takes when they lose their device. Confirm the exact enforcement options, timeouts and retry behavior for your release in the official two-factor configuration documentation, because these settings change between versions and you should not rely on defaults you have not verified in your own environment.

Treat the recovery process as part of the rollout, not an afterthought. Every enforced factor creates a lockout risk, and a locked-out administrator is the most common way a rollout stalls. Agree in advance who resets a lost authenticator, how that person verifies the request, and where the event is recorded. Schedule the enforcement change in a way that lets an administrator still sign in if something goes wrong, and keep at least one tested recovery path outside the account being reset. Your security team should review these decisions before go-live, and your compliance team should confirm that the evidence of enforcement will satisfy your assessor.

Choosing between authenticator apps, email codes and OAuth users

This table compares TOTP authenticator apps with email codes and shows how each option applies to users who sign in through OAuth. Read each row as a decision: who the option suits, what the user needs on hand, the main risk, and what the administrator must configure. The main takeaway is that TOTP fits users who can keep an app available, while email codes depend on the mailbox being reachable and secure.

OptionBest suited toWhat the user needsMain risk and administrator setup
TOTP authenticator appStaff with a phone or hardware they carry daily and who sign in with a Rocket.Chat passwordA TOTP app that supports six-digit codes refreshing every 30 secondsLost or replaced phones lock users out; enable 2FA in administration and plan a reset path before rollout
Email codeUsers whose mailbox is protected by the organization's own sign-in and mail controlsAccess to the mailbox registered to the Rocket.Chat accountA compromised mailbox defeats the factor; confirm the email server is configured and test code delivery before enforcing
Email code for OAuth usersUsers who sign in through an identity provider and have no Rocket.Chat passwordAccess to the mailbox on the account, plus the identity provider sign-inEmail codes can stack on top of identity provider MFA, so check the identity provider policy to avoid duplicate or conflicting prompts
Automatic opt-inPilot groups or organizations that want users to enroll at next sign-in without an admin ticketA device or mailbox ready at the first sign-in after the setting is enabledUsers who are unprepared may be blocked at sign-in; announce the change and confirm the enrollment flow in a test workspace
Per-role enforcementAdministrators and privileged roles where a second factor should always be requiredMembership in the enforced role and a working second factorEnforcement on premium plans only; confirm plan eligibility in the written scope before relying on it
Code lifetime and attemptsTeams that need predictable sign-in windows and a documented lockout behaviorEnter the code before it expiresEmail codes expire after 3600 seconds by default and a new code is issued after 5 invalid attempts; confirm the values in your environment
Lost authenticator recoveryEvery organization, regardless of the chosen factorA verified second factor or an administrator able to reset itReset without a documented process becomes a support bypass; define who approves resets and how identity is verified
Adding an authenticator app laterAccounts that already hold a second factorAn existing second factor to confirm the new appFrom 8.8.0, enabling or validating an authenticator app requires an existing second factor; plan this for users who only have email codes

Code lifetimes and retry limits to plan for

Rocket.Chat ships with default values for how long email codes stay valid, how many wrong attempts are allowed and how TOTP codes are accepted. Each one trades user convenience against brute-force exposure, so the settings should be decided before go-live rather than left as installed.

Email code lifetime

Email 2FA codes expire after 3600 seconds by default. A longer window helps users who check mail late, but it also leaves a code usable for longer if it is forwarded, read on a shared device or sitting in a compromised mailbox. Check whether your environment keeps the default, and whether your mail retention and forwarding rules make an hour acceptable for your risk level.

2FA configuration docs

Regeneration after invalid attempts

A new email code is generated after 5 invalid attempts, which limits how many guesses an attacker can make against a single code. The same limit can also lock out a real user who mistypes or uses an old email. Confirm the threshold with your team, and tell the help desk that a fresh code, not a lockout, is the expected recovery path.

Invalid tries before new code
5 attempts

TOTP refresh interval

Authenticator app codes refresh every 30 seconds, which is the standard interval most authenticator apps use. Users on a slow network or with a device clock drifting by more than a moment will see codes rejected. Ask users to keep phone time set automatically, and include time sync in your enrollment instructions.

Maximum Delta setting

The Maximum Delta default of 1 accepts the current TOTP code plus one adjacent 30-second window. Raising it tolerates larger clock skew but widens the set of valid codes at any moment, which slightly weakens the factor. Keep the default unless testing shows real users failing, and document any change so auditors can trace it.

Pre-go-live confirmation

Before enforcement starts, confirm in your own instance whether each of these values is still at its default, since administrators can change them. Record the values, test a lockout and a code expiry with a pilot group, and check that the help desk knows the reset path. A written record of the settings also supports later access reviews.

How a sign-in moves through the second factor

The sign-in starts when a user submits a password or completes an OAuth redirect, and Rocket.Chat then checks whether that account already has a second factor enrolled. If it does, the user gets a TOTP prompt or an emailed code, and invalid attempts count toward a lockout; if it does not, enforcement sends the user to enrollment before the session opens. The trust boundary sits between the identity provider and Rocket.Chat, so confirm which factor the identity provider has already checked and whether Rocket.Chat still challenges the user.

Sign-in path from primary authentication through the second factor check.

Rolling out two-factor authentication in Rocket.Chat in phases

This sequence moves Rocket.Chat from optional to enforced two-factor authentication without locking out users, so each factor type and each group of accounts is proven before the requirement applies to everyone.

  1. Confirm the plan and Rocket.Chat version

    The administrator confirms the workspace is on a plan that includes the two-factor features you need, and that the server runs a supported release line. Check the current version under Administration, compare it with the support windows in Rocket.Chat's version durability documentation, and confirm with Rocket.Chat which factor controls and per-role enforcement your plan covers. Record the version and plan in the rollout ticket. The step is done when the team can name the release and the plan tier in writing, and knows whether per-role enforcement is available to them at all.

  2. Verify the email delivery path for codes

    Email codes depend on the workspace's outgoing mail settings, so the mail server, sender address and authentication method must work before any user relies on them. Send test messages from the workspace to internal mailboxes and to at least one external provider, and confirm that the messages arrive in the inbox rather than spam. Check that the sender domain's records are correct with your mail team. The step closes when test codes arrive reliably and within the time window you expect, and the team has written down who owns the mail relay.

  3. Enable the chosen factor types

    Turn on the factor types selected in the options table, most often TOTP authenticator apps and email codes, in the two-factor authentication settings. Leave enforcement off at this stage so existing sessions are not disrupted. Confirm the default code lifetime, the invalid-attempt limit and the time-based token settings match your decision. The administrator then completes a test enrollment on a staff account and signs out and back in with each enabled factor. The step is done when every enabled factor completes a full sign-in with a fresh account.

  4. Pilot with a small group including OAuth users

    Choose a pilot group of about a dozen people from IT, security and a few business teams, and include at least one account that signs in through SAML, OAuth or LDAP. OAuth and directory users may receive email codes rather than authenticator apps, so their path needs its own test. Ask each pilot user to enroll and complete a sign-in with their factor, then check the admin view for who has enrolled. The step closes when each identity path has produced at least one successful second-factor sign-in and the pilot group has reported any confusing prompts.

  5. Set the enrollment window and communicate it

    Publish a date-free enrollment notice that explains which factor to use, how to set up an authenticator app, and what to do if a code does not arrive. Agree the enrollment window with the business owners and record it in the change plan, since the window length depends on your organization's rules. Prepare the lost-authenticator reset procedure so help desk staff can act on requests during the window. The step is done when the notice, help desk script and reset steps have been reviewed and approved by the owners.

  6. Review enrollment gaps before enforcing

    Before turning on enforcement, review which active accounts have not yet enrolled in a second factor, grouped by department, role and sign-in method. Work with managers to contact the remaining users and resolve accounts that belong to shared, service or departed staff. Confirm that any accounts you intend to exempt are documented with an owner and reason. The step closes when the unenrolled list is small enough that the owners accept the lockout risk in writing, and each remaining account has a named contact.

  7. Enforce broadly and monitor sign-ins

    Turn on enforcement for the agreed scope, starting with the roles or groups that the rollout plan lists, and expand to all users as planned. Watch sign-in failures and help desk tickets during the first working days after the change, and confirm that users who lost access can recover through the documented reset path. Keep an audit of enforcement changes and reset actions for your compliance records. The step is complete when enforced accounts can sign in with their factor, support volume has settled, and the owners sign off on the final enrollment report.

Enforcement choices by plan and sign-in method

On a free Starter workspace, two-factor authentication is available but optional for users, so the administrator's main job is to make it visible and encourage its use rather than to require it. Starter includes multi-factor authentication along with LDAP and Active Directory authentication and single sign-on, according to the plans documentation, but per-role enforcement is a premium capability and should not be assumed on this tier.

  • Administrator control: Turn on two-factor authentication in the workspace settings and choose which methods users may use, such as an authenticator app or email codes.
  • User experience: Users who opt in are prompted for a second factor at sign-in. Users who have not enrolled can keep signing in with a password alone.
  • Email code lifetime: Email codes expire after 3600 seconds by default, so users should request a new code if their first one lapses.
  • Lost authenticator: Without an enforced policy, users or administrators must recover access through the documented reset path, so confirm who holds that authority.
  • Pilot it: Test the flow with a non-admin test account before announcing it.

Confirm with Rocket.Chat which features your current Starter limits cover, since the 50-user cap on Starter may change what you can run.

Resetting lost authenticators without weakening the control

A reset path is a security decision, not a help desk convenience. If an administrator or help desk agent can clear a user's second factor on a phone call or a chat message, the attacker only needs to impersonate the user once to get past the control you enforced. Treat every reset as a change to the account's authentication, and decide in advance who may approve it, what identity evidence they must see, and how the change is recorded. Write this down before the first enforcement deadline, because lost-device requests tend to peak right after a rollout.

From Rocket.Chat 8.8.0, enabling or validating an authenticator app requires an existing second factor. This matters for resets. A user who still has email codes can add a new authenticator app themselves, but a user who has lost every factor cannot complete that step alone. Map your user population into two groups: users who still hold a working factor, and users who hold none. The second group is where your identity checks carry the weight, and it should go through a documented, administrator-initiated path rather than a self-service workaround. Confirm in your version's release notes and two-factor configuration documentation exactly which factors can be reset by an administrator and which steps the user must complete afterward.

Before any reset, have the administrator or help desk verify identity through a channel the requester does not control, such as a call-back to a number already on file in your directory, or a manager confirmation in your ticketing system. Record the ticket, the verifier and the time, and prefer short, time-limited re-enrollment windows over open-ended ones. Confirm the exact reset steps, the audit entries Rocket.Chat writes for them, and whether sessions remain active after a reset in the version you run before you write the procedure into your runbook.

Security risks in a two-factor authentication rollout

Turning on two-factor authentication shifts the weak point from the password to the channels around it: the mailbox, the help desk, the enrollment queue and the offboarding process. Each card below names one of these risks, the Rocket.Chat control that reduces it and the recurring task that keeps the control working after go-live.

Email codes depend on the mailbox

Email 2FA codes are only as strong as the inbox that receives them. Anyone who can read or reset a user's mailbox can also sign in to Rocket.Chat, so email codes add little protection for accounts where the mail password itself is weak. Prefer TOTP for staff accounts where your policy allows it, and confirm that the mail accounts behind email codes carry their own MFA. Review which users still rely on email codes at each access review.

Default email code lifetime
3600 seconds
2FA configuration docs

Phishing of one-time codes

A user can be tricked into typing a current TOTP or email code into a fake login page, and the attacker can replay it within its validity window. Short code lifetimes and single use reduce the window, but they do not stop real-time relay. Pair 2FA with SSO and an identity provider that supports phishing-resistant factors, and train users that codes are never requested by support staff. Check sign-in logs for unusual login locations after each rollout wave.

Help desk reset abuse

The most common path around 2FA is a reset request. A caller who impersonates a user and asks for a 2FA reset can take over the account without any code. Write a reset procedure that requires identity verification through a second channel, such as a manager callback to a number already on file, and log every reset with the requester and reason. Review reset logs monthly to spot repeat resets on the same account.

Enrollment gaps for service accounts

Bots, integration users and service accounts often cannot complete an interactive 2FA enrollment, so they are either excluded from enforcement or left on a shared password. Enforcing 2FA per role can leave these accounts outside the policy by default. Inventory every non-human account, record its owner, and move each to token-based or scoped credentials with its own audit trail. Recheck the inventory whenever a new integration is connected.

Recovery gaps when users leave

Enrolled authenticators can outlive the employment that created them. A departing user who keeps a phone with a TOTP app, or who still receives email codes at a forwarded address, can regain access after the account should be closed. Pair account deactivation with authenticator reset, remove any forwarding rules, and confirm that active sessions end. Make offboarding a checklist item owned by HR and the Rocket.Chat administrator together.

Enforcement that drifts over time

A 2FA policy set once at rollout tends to drift as roles change, new administrators are added and temporary exceptions become permanent. Keep the list of roles that require 2FA in version control or a change record, and review exceptions with an expiry date. Confirm after each Rocket.Chat upgrade that enforcement settings still apply, since the release notes for 8.8.0 changed how authenticator apps are enabled and validated.

Release notes

Questions teams ask before enforcing two-factor authentication

What does a Rocket.Chat 2FA rollout cost and what drives the price?

The cost depends on the written scope, so no fixed figure applies here. Most of the effort is planning and testing rather than switching a setting. The main drivers are the identity provider in use (OAuth, SAML or LDAP users each need different checks), the number of user groups and roles that will be enforced, how many test accounts and devices must be covered, and whether the rollout includes lost-authenticator procedures and user communications. Costs recur only if you add ongoing support or retesting after upgrades. Ask for a fixed-scope written quote that lists each of these items separately, along with what the internal team must provide.

How long does it take to enforce two-factor authentication?

The enforcement setting itself takes little time, but the surrounding work sets the duration. Expect time for confirming which authentication methods each user group can use, testing TOTP and email code flows, deciding how existing users are opted in, and writing the instructions users need to enroll. Enforcement per role is a premium capability on paid plans, so confirm plan entitlement first. No duration figure is supplied for this topic, so ask any partner to state the phases, dependencies and milestones in the written scope rather than a single number.

What does our internal team need to provide for the rollout?

Your team needs to provide administrator access to the Rocket.Chat workspace, a staging or test instance that matches production, a list of user groups and roles to be enforced, and access to your identity provider so OAuth and SAML users are tested correctly. You also need a decision on the email sender used for email codes, a named approver for lost-authenticator resets, and a support channel for users during enrollment. Confirm each item with your own environment before the engagement starts, since the exact access model depends on how your workspace is hosted.

Can our own team enforce two-factor authentication without outside help?

Yes, a capable Rocket.Chat administrator can change the 2FA settings in the workspace administration area. The harder part is testing the result across every sign-in path. Check how TOTP compares with email codes, how users who sign in through OAuth receive codes, what happens when a user lost their authenticator, and how enforcement interacts with role assignments. An outside team adds value when the environment has several identity providers, many roles, or compliance evidence requirements. Decide based on whether your team can run a documented test plan and keep it current after upgrades.

How are OAuth users handled when two-factor authentication is enforced?

Users who sign in through an external identity provider need a deliberate plan, because the second factor may be handled differently from password accounts. Rocket.Chat supports email codes as a second factor, and the Topic Facts describe that email codes expire after 3600 seconds by default and a new code is generated after 5 invalid attempts. Confirm how your identity provider and Rocket.Chat interact for each sign-in method, and test a sign-in for every provider you run. Ask your partner to document the expected user experience for OAuth accounts in the written scope.

What changes after a Rocket.Chat upgrade, and does 2FA need retesting?

Treat each upgrade as a reason to retest the 2FA path. From Rocket.Chat 8.8.0, enabling or validating an authenticator app requires an existing second factor, which changes how users set up TOTP. Supported releases also move on a fixed schedule: standard releases are supported for 6 months and LTS releases for 12 months, and unsupported versions can lose connections to the official mobile and desktop clients. Ask for upgrade testing to be included in any retainer, and check the Rocket.Chat release notes before each planned upgrade.

Do we need a paid plan to enforce two-factor authentication for specific roles?

Probably yes, so confirm before you commit. Rocket.Chat's free Starter plan includes multi-factor authentication, but per-role enforcement is part of the premium capabilities described in the Rocket.Chat plans documentation. Plan pricing is quote-based, so the licensing cost comes from Rocket.Chat or your reseller, not from the implementation work. Ask your team to confirm the plan that includes per-role enforcement with Rocket.Chat before writing the requirement into a scope document.

Limits to confirm in your environment

Several 2FA behaviors depend on the plan you buy, the version you run and the delivery path for codes, not on the feature list alone. Confirm each limit below against the vendor documentation and release notes before you write the rollout plan.

Per-role enforcement on your plan

Enforcing 2FA for specific roles such as administrators or owners is the control most teams want, and it is a plan question to settle early. The free Starter plan includes multi-factor authentication, but the per-role enforcement behavior should be confirmed against the plan you intend to buy. Ask the vendor in writing which plan includes it, then test it on a staging workspace with a non-admin account before you enforce it for anyone who matters.

Plans docs

Authenticator enrollment by version

Rules for enrolling or validating an authenticator app changed in recent releases. From Rocket.Chat 8.8.0, adding or validating an authenticator app requires an existing second factor, which affects users who have only TOTP and a lost device. Read the release notes for your current line and for any target version, then decide how users without a second factor will enroll during the rollout.

Release notes

Email delivery for code-based factors

Email codes are only as reliable as your mail path. Confirm that your SMTP relay delivers messages to every domain your users have, that bounce and spam filtering do not hold codes, and that the sender address passes your DMARC policy. Email codes expire after 3600 seconds by default, so a slow mail queue can make a valid code useless. Test delivery to external mailboxes before enforcement.

2FA configuration docs

Service accounts and bots

Integration bots, webhook users and automation accounts cannot usually answer an interactive 2FA prompt. Decide whether these accounts are exempt from enforcement, and if so, how they are scoped and who owns their credentials. Check the 2FA documentation for how enforcement treats non-human accounts in your version, and record the exemption list as part of the access review so it does not grow silently.

Sign-in for OAuth and LDAP users

Users who sign in through an external identity provider may not be able to use a Rocket.Chat authenticator app in the same way as password users. Confirm whether your chosen method uses email codes, whether the identity provider already enforces MFA, and whether the workspace will ask for a second factor on top of it. Document the sign-in path for each user group so help desk staff can answer questions without guessing.

End-of-life versions and sign-in

A version past end of life receives no security or bug fixes, and Rocket.Chat says unsupported versions may also lose the ability to connect with the official mobile and desktop clients. That affects sign-in and 2FA prompts on those devices, not just the server. Check the support dates for your installed line against the version durability page, and schedule upgrades so that enforcement is not rolled out on a version that will lose support mid-project.

Standard release support
6 months
Version durability docs

How DeployOpen works on this

DeployOpen is a Chainscore Labs company that plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure. For two-factor authentication in Rocket.Chat, we start from which users sign in with passwords, which use SSO, and which roles must be covered, then deliver the enforcement design as a written, fixed-scope engagement.

How we scope

  • Inventory which accounts sign in locally, through LDAP or through SAML and OAuth, and which of them can reach email codes.
  • Agree in writing which roles and user groups must enroll, and the enforcement timeline for each.
  • Confirm your Rocket.Chat plan and version, since per-role enforcement depends on the paid plan and release line.

How we build

  • Configure the 2FA method policy, choosing between authenticator apps and email codes for each population.
  • Set code lifetimes and invalid-attempt behavior, then test enrollment, login and lockout paths with pilot accounts.
  • Document the lost-authenticator reset procedure and the help desk checks that must pass before a reset is granted.

How we hand over

  • Deliver a written runbook covering enrollment steps, reset requests, role exceptions and the settings each admin must not change.
  • Provide a test record showing each login path tested, the result and the fix applied where a path failed.
  • Walk your administrators and help desk through the procedures and confirm they can run them without DeployOpen.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed before work starts.
  • Ongoing support, upgrades and continuous testing are available as a retainer, which can cover reviews after each Rocket.Chat upgrade.
  • Ask each vendor for a quote built from the written scope, including which parts are one-time work and which recur.

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.