Mattermost session timeout: what it controls and when to tune it
Session length and inactivity settings control how long a signed-in Mattermost client stays trusted without asking the user to authenticate again. A security team answering a session question needs to know three things for each client type: the maximum lifetime of a session, whether activity extends it, and whether an idle period ends it. Those answers differ between web browsers, the mobile and desktop apps, and logins that go through single sign-on, so one global figure is rarely enough to describe the environment. Confirm the exact setting names, default values and any difference in behavior for SSO sessions against the server version you run, because these controls have changed across releases and the administration documentation for your version is the authority.
You need to tune these settings when the data or the users change the risk. Regulated or sensitive channels, shared workstations in clinics, plants or branches, and contractor accounts that outlive a project are the usual triggers. Shorter lifetimes and idle timeouts reduce the window in which a stolen or abandoned session can be used, but they also increase re-authentication for people who work in Mattermost all day, so the trade-off should be written down per user group rather than applied uniformly. A change to your identity provider's session policy or MFA rules is another trigger, because Mattermost sessions may not match the lifetime you set upstream. Test each client type after a change, not only the web login.
Before you change anything, ask your team or partner to produce a short matrix showing, for each client and login method, the session lifetime, the activity behavior, the idle behavior and what happens when a user changes their password. Compare that matrix with your access policy and your identity provider's settings. Session revocation after a password change is the control auditors most often ask to see demonstrated, so run that test on a non-production account and record the result. Any gap between the matrix and your policy becomes a configuration item with an owner, not a note in a document.
Which session setting fits each login path
This table compares the session controls to evaluate for password login on web, mobile apps, desktop apps and SSO. Read each row as a question to answer for every login path, because some controls apply to only one client type. Confirm the exact setting names and locations in the System Console of the version you run before you change anything.
| Setting or control | What it governs | When it fits | What to confirm |
|---|---|---|---|
| Absolute session length | How long a session stays valid from sign-in, whether or not the user is active | Regulated environments that need a fixed maximum period before re-authentication, applied separately to each client type where the setting allows | Whether the setting applies to web, mobile and desktop logins alike, and whether SSO sessions are bound by it or by the identity provider's own lifetime |
| Inactivity (idle) timeout | Ends a session after a set period with no user activity | Shared workstations and kiosks, where an unattended open session is the main risk | Whether idle timeout is enforced on mobile and desktop apps, which may keep background connections alive |
| Extend session by activity | Renews the session expiry while the user keeps using Mattermost | Long-running daily use where forced sign-in would disrupt work, paired with an idle timeout | How the extension interacts with the absolute length and whether it resets on API or bot activity |
| Session expiry on mobile apps | Governs how long a phone stays signed in before a new login is required | Devices managed by mobile device management with a short lifetime and device-level lock | Whether the mobile session setting differs from the web setting in your version, and how it behaves after an app restart |
| Session expiry on desktop apps | Governs how long a desktop client remains signed in on a laptop | Corporate laptops that sleep and resume often, where expiry should match the device lock policy | Whether the desktop client re-prompts for credentials after a laptop wakes, and how this differs from browser sessions |
| SSO login sessions | Mattermost session length after sign-in through SAML, OIDC or OAuth, which may depend on the identity provider | Organizations that already set session lifetimes and MFA prompts in their identity provider | Whether the identity provider's session lifetime or Mattermost's own setting ends the session first, and how a revoked identity provider session affects Mattermost |
| Revoke sessions on password change | Ends all active sessions for an account when its password is changed | After a suspected compromise or a forced reset, and for accounts that changed roles | Whether this applies to password login only, whether SSO accounts are affected, and whether it also covers mobile and desktop sessions |
Where long sessions create exposure
A session is a standing permission. Whoever holds a valid session token can act as the user until that token expires or is revoked, so the length of each session type sets how long a lost device, a departed contractor or a leaked integration credential stays useful to an attacker. The cards below cover the situations where that lifetime matters most and the check that narrows each one.
Lost or shared devices
A laptop left in a taxi or a browser on a shared workstation keeps a logged-in Mattermost session until the session expires or someone signs it out. Long web session lengths extend that window. Check the web session length your policy sets, confirm that idle timeout applies on shared machines, and confirm that users know how to end all their sessions from the account settings. Illustrative example: a user signs out of a kiosk browser but the session cookie survives in a different profile.
Unlocked mobile devices
A phone with the Mattermost app open and unlocked gives anyone holding it access to every channel and direct message the user can see. Mobile session length is the setting that decides how long that access survives after the device is lost or handed over. Ask which mobile session length your server applies, whether it differs from web sessions, and whether your device management policy requires a screen lock with a short timeout.
Contractors and former staff
Contractors and staff who leave can keep a valid session if their account is deactivated in a different system or if the session was never tied to the directory. Review who can deactivate accounts, confirm that deactivation ends active sessions, and run a periodic check of accounts that still hold sessions after their engagement ends. Ask your team to confirm this behavior in the server version you run before relying on it.
Sessions outliving the identity provider
With SSO, a user who is disabled or signed out at the identity provider may still hold a Mattermost session that Mattermost issued earlier. The session stays valid on Mattermost until its own lifetime ends, so a central sign-out does not automatically end the application session. Compare the identity provider's session lifetime with the Mattermost session length, and test whether disabling a user at the provider ends their Mattermost access in your configuration. The SAML single sign-on docs describe the SSO setup that governs this behavior.
SAML SSO docsIntegration credentials that ignore timeouts
Bot accounts, personal access tokens and webhook credentials do not behave like browser sessions. They are typically not affected by idle timeouts or a browser sign-out, so a leaked token can remain usable long after a user session would have expired. Inventory every token and bot in use, record who owns each one, and confirm how each is revoked. Treat token rotation and revocation as a separate control from session length.
Password changes that leave sessions open
A user who changes a password after suspecting compromise expects every other session to stop working. Confirm that a password change revokes all existing sessions for the account on your server version, and test it with two browsers before you rely on it. If it does not, instruct users to sign out of all sessions manually and add the step to your incident response runbook.
How a Mattermost session is issued, extended and ended
The lifecycle starts at sign-in, either with a password or through an identity provider over SSO. Once the user is authenticated, the server issues a session to the client, and each period of activity can extend it. The session ends when it goes idle or reaches its expiry, and a password change revokes every session and forces sign-in again. The SSO branch matters because the identity provider's own session state decides whether the user is simply sent back through login. Check each branch against your configured values and test them in a staging server.
Session issue, extension, expiry and revocation, with the SSO branch shown separately.
How SSO sessions interact with Mattermost session length
An SSO login creates two sessions, and ending one does not automatically end the other. The first is the session at your identity provider, which proves the user signed in to the directory or single sign-on service. The second is the Mattermost session, which the server issues after the SAML, OIDC or OAuth handshake completes and which governs the web, desktop and mobile clients from that point on. Session length settings in Mattermost control only the second layer. A user who signs out of the identity provider may still hold a valid Mattermost session until it expires, and a user whose Mattermost session expires may be silently re-authenticated if the identity provider still considers them signed in. Your security team should decide which layer is the control of record for each user population before setting any lifetimes.
SSO is available from the Professional plan according to the Mattermost pricing page, and the setup steps for SAML are covered in the Mattermost SAML single sign-on documentation. Read that documentation alongside your identity provider's own guidance, because the Mattermost settings only define how often the server asks for a fresh sign-in, not how the identity provider treats the user's existing session.
Confirm with your identity provider team how three behaviors work for your chosen provider: how often it forces re-authentication, how long access and refresh tokens remain valid, and whether a sign-out or account disablement is propagated to relying applications such as Mattermost. Some providers propagate sign-out only through specific protocol features or configuration, and others do not propagate it at all. Test a disabled account and a forced sign-out end to end on each client type, since the result determines whether Mattermost session length is a meaningful control or only a convenience setting.
How to set and verify session timeouts before go-live
This sequence sets Mattermost session lifetimes and idle limits for each client, confirms that they hold on web, mobile and desktop, and leaves a record that an auditor or the next administrator can follow.
Confirm the server version and release status
The administrator who owns the server checks which Mattermost version is running and whether it is a monthly release or an Extended Support Release (ESR). Use the Mattermost server releases page to confirm the version's support end date and note whether a newer release is needed before go-live. Session settings should be tested on the version you will run in production, so record the exact version number in the change log before changing anything. The step is complete when the version, its release type and its support end date are written down and the team agrees the version is supported for the launch.
Document the session policy by group and client
The security lead and the owner of the collaboration platform agree on the session policy in writing. Cover each user group (for example, general staff, administrators and contractors) and each client type: web, iOS, Android and desktop. For each combination, state the required absolute session lifetime, the idle timeout and whether the policy differs for SSO users. Ask the identity team to confirm which groups must reauthenticate more often. The step is complete when a one-page policy table exists, has named approvers and matches the regulatory or internal rules the organization must meet.
Set absolute and idle values in the System Console
A Mattermost system administrator opens the session length settings in the System Console and enters the absolute and idle values from the approved policy for each client. Confirm which settings apply to mobile and desktop separately from web, and set them in the same change window so the policy is applied consistently. Save the configuration, then export or capture the saved values from the configuration file or the console screen. The step is complete when the saved values match the policy table line for line, with no client left on a default value that was not approved.
Align identity provider session lifetimes for SSO users
For accounts that sign in through SAML, OIDC or another SSO method, the identity team reviews the session lifetime and idle settings in the identity provider as well. Mattermost session settings do not replace the identity provider's own sign-in lifetime, so a user may be sent back to the provider after the Mattermost session ends, or the reverse. Confirm with the identity provider's documentation how its session and reauthentication settings behave, and align the two sets of values. The step is complete when a tester can state, for an SSO user, which system ends the session first and that the result matches the policy.
Test each client with a real timeout
A tester signs in to Mattermost on the web, an iOS device, an Android device and the desktop app, using a test account in each relevant user group. Leave each client idle until the configured idle timeout passes, then perform an action and confirm the client asks for sign-in again. Repeat the test for the absolute lifetime on a session that stays active. Record the start time, the observed sign-out time and any differences between clients in a test log. The step is complete when every client type has a logged result that matches the policy, and any deviation has a ticket assigned to an owner.
Test password change revocation with a second session
The tester signs in to Mattermost in two separate browsers or clients with the same test account, leaving the second session open. In the first session, change the account password, then return to the second session and perform an action that requires authentication. Confirm that the second session no longer works and that the user must sign in again with the new password. Repeat the test for at least one mobile or desktop client if those are in use at launch. The step is complete when the test log shows that every older session was revoked after the change, with screenshots or request results attached.
Record the settings in the change log
The administrator writes a change record that names the server version, the approved policy table, the saved values, the identity provider settings, the test results and the approver for each. Store the record in the same system that holds other configuration changes, and link it to the go-live ticket. Ask the security team to confirm that the record is complete and that the settings will be reviewed again after each Mattermost upgrade. The step is complete when the record is approved, filed and linked, and the next administrator can reproduce the settings from it without asking the original team.
Session timeouts by client: web, mobile and desktop
The web client stores its session credential in the browser and sends it with each request. A browser session usually ends when the server stops accepting that credential, which depends on the server's session expiry settings and on any activity-based extension. Because the browser is often left open on a desk or in a shared tab, the web client is where idle timeouts matter most.
- Session credential location: The token lives in the browser, so closing the browser or clearing site data ends the client side of the session, but it does not revoke the server side.
- Expiry behavior: Users typically see a return to the sign-in page with a short message, and any unsent draft may be lost, so confirm how the client handles drafts before rollout.
- Activity extension: Confirm whether ordinary activity extends the session, since this decides whether an open tab keeps a user signed in all day.
- Multiple tabs and windows: Test whether a timeout in one tab affects others, and whether signing out in one browser profile affects other profiles.
- Shared workstations: Browsers on shared machines can keep sessions alive for the next person, so pair the timeout with a sign-out prompt and clear guidance for users.
Before you set a value, test an idle browser tab, a sign-out in one profile and a password change, then record what a user sees at each step.
Mobile apps hold session credentials on the device, typically in the platform's app storage, and reconnect in the background to deliver notifications. A phone is carried outside the office, can be lost, and is often unlocked by a short PIN or biometric, so the session length on mobile is a decision about how long a lost or unattended device stays signed in. Confirm the exact storage and reconnect behavior for your app version with the vendor documentation.
- Long-lived sessions: Mobile users expect to stay signed in across days, so a short timeout can generate frequent sign-in prompts and push users toward workarounds.
- Device lock interaction: Ask whether the app requires a device passcode or biometric check before reopening, since this is often the practical control on a lost phone.
- Background refresh: Confirm whether background connections extend the session, because notifications may keep a session active without any user action.
- Remote sign-out: Test whether an administrator or the user can end a mobile session from the server side, and how quickly the device reflects it.
- Policy alignment: Check that mobile session settings match the mobile device controls your organization applies, such as management profiles or app protection policies.
Before you approve a mobile value, sign in on a test phone, lock it, wait through the configured interval, reopen the app, and confirm that a password change ends the session on the device.
Desktop apps behave like a hybrid of the web and mobile clients. They run for long periods, often start at login, and may keep a connection open while the screen is locked. The machine's own sleep, lock and logout settings therefore often decide when a user is effectively signed out, which can differ from the server's session setting.
- Sleep and lock interaction: Test what happens when a laptop sleeps, wakes or is locked, since the app may reconnect without a fresh sign-in.
- Auto-start behavior: Confirm whether the app signs in automatically at operating system login, which affects shared or multi-user computers.
- Session storage: Confirm where the app keeps its credentials on each operating system and whether they are protected by the operating system keychain or credential store.
- Version consistency: Desktop apps are updated separately from the server, so check that each desktop version handles the session behavior you configured.
- Offline and reconnect: Test how the app behaves after a network drop, because a reconnect can refresh a session that the server would otherwise have expired.
Before you set the desktop value, lock and wake a test laptop, sign out from the server side, and confirm that the app asks for sign-in again within the time you expect.
Shared devices, such as meeting-room displays, clinical workstations, plant-floor terminals and loaner laptops, break the assumption that one user signs in on one device. A session left open on a shared device exposes the next person's view and any data it shows. Here the timeout is a control for the device as much as for the account, so the choice of client and sign-in method matters more than the number itself.
- Session persistence: Confirm whether the client remembers the last user, since a persistent session on a shared device can expose one user's messages to another.
- Sign-out discoverability: Check that sign-out is easy to find and that the client does not hide it behind menus that users rarely open.
- Idle clearing: Ask whether the device can clear its session or return to a sign-in screen after a period of inactivity, and whether that is a client setting or a device policy.
- Browser or app mode: Decide whether a kiosk should run the web client in a restricted browser or the native app, and test each option's sign-out behavior.
- Account type: Consider whether shared devices should use accounts with narrower channel access, which limits exposure if a session is left open.
Before you approve a shared device, sign in, walk away, sign in as a second user on the same device, and confirm that no earlier conversation or channel list remains visible.
Security checks for session policy
Session length settings only protect you if someone owns them, checks them, and connects them to the rest of your access process. The cards below cover the recurring checks that tie Mattermost session policy to offboarding, incident response, proxy and SSO sign-out, and upgrades.
Document the policy and its owner
Write down the session lifetime for web, mobile and SSO logins, the idle timeout, and whether activity extends sessions. Name one owner, usually the security lead for the messaging platform, who approves changes. Record the reason for each value so a later administrator can tell a deliberate choice from a default. Review the document whenever the identity provider or the mobile app rollout changes, because those shift how long a session really lasts.
Revoke sessions for leavers
Offboarding must end active Mattermost sessions, not only disable the directory account. Confirm with your identity team whether disabling a user in the identity provider stops new logins and whether existing Mattermost sessions remain valid until they expire. Test this with a non-production test account before relying on it. Assign the check to the team that runs joiner and leaver processes, and add a step that verifies the session is gone.
Review sessions after password resets
When a user resets a password or you suspect account compromise, check whether every existing session was revoked. Confirm the exact behavior of your Mattermost version and your login method, since SSO-backed accounts may not use a local password. Ask the platform administrator to document the steps used for a forced sign-out and to test them. The incident responder owns this check and records the result in the incident ticket.
Log session-related admin changes
Changes to session lifetime, idle timeout and related authentication settings should appear in an audit trail with the person who made them and the time. Confirm which of these changes Mattermost writes to its audit logs and which must be captured from configuration management or the server logs. Review the log monthly, and alert on any change made outside the approved change process. The security operations team owns the review.
Coordinate proxy and SSO sign-out
Session length is only one layer. The reverse proxy, the identity provider's own session and any single sign-out settings all affect whether a user stays signed in. Map each layer, decide which one controls the final sign-out, and test that a logout from one place ends access where you expect. The network or platform team owns the proxy settings and the identity team owns the provider settings, so schedule a joint review.
Re-check settings after each upgrade
Session behavior and default values can change between Mattermost releases, and proxy or identity provider changes can alter timing too. After every server upgrade, compare the active session settings with the documented policy, then test a login, an idle timeout and a forced sign-out. Monthly releases and Extended Support Releases follow different cadences, so check the release notes for your version. The platform owner runs this check as part of the change record.
Server releasesQuestions buyers ask about session timeouts
How much effort does configuring Mattermost session timeouts take?
The settings themselves are a small part of the work. Most of the effort goes into deciding the policy per user group, testing each login path, and confirming that the policy holds on every client. Session length applies to web, desktop, mobile and SSO logins, and each can behave differently, so a change that looks simple on the server needs checks on each one. The size of the effort depends on how many groups need different lengths and how many clients your users run. Ask any partner for a written scope that lists the groups, clients and login methods it will test, and for the evidence it will hand over at the end.
What makes session timeout work more or less expensive?
Four factors move the cost most:
- The number of user groups that need different session lengths, such as admins, contractors and general staff.
- SSO complexity, including how many identity providers are in use and whether session lifetime is controlled there, in Mattermost, or both.
- The client mix. Web, desktop and mobile apps each need their own test pass, and mobile devices add device management questions.
- Compliance evidence. If an assessor will ask for proof of settings, logs and test results, the documentation and retesting take additional time.
Each of these adds testing and documentation rather than changing the core setting, so ask for the count of groups, clients and identity providers in the quote.
Can our own team configure Mattermost session timeouts without a partner?
Yes, a competent administrator can change the session settings in the System Console and test them. The harder part is proving the result. Your team needs to confirm the behavior on each client, check that SSO providers enforce their own lifetimes correctly, and record the evidence an auditor will request. Teams without a test account per client, or without someone who understands the identity provider, often find that the setting works on the web and not on mobile. Decide whether you need a second set of hands for testing and documentation, or only for the initial configuration.
What do we need to provide for a session timeout engagement?
Plan to provide three things before work starts:
- Read and administrative access to your identity provider so the team can confirm session lifetimes and any reauthentication rules set there.
- A test account for each client and each user group, including mobile and desktop, so behavior can be checked without touching production users.
- A change window agreed with your operations team, because session changes can sign users out and affect in-progress work.
Also name the approver for the final policy and the person who will receive the test evidence. Confirm these items in the written scope.
Do session timeout settings need a higher Mattermost plan?
Mattermost sells its plans as prepaid annual subscriptions based on seat licenses, and its pricing page does not list public prices. The pricing page lists SSO and AD/LDAP user sync from the Professional plan, while high availability and FIPS 140-3 compliance start at Enterprise. The pricing page does not state session settings as a separate tier, so confirm directly with Mattermost sales which plan includes the session controls you need, especially if you rely on SSO-enforced lifetimes. Ask the vendor to name the plan in writing before you commit to a design that depends on it.
How do session timeout settings change after a Mattermost server upgrade?
Upgrades can change defaults, configuration keys and how existing sessions are handled, so check session behavior after every server upgrade rather than assuming it carries over. Review the release notes for each monthly release or Extended Support Release you move to, then rerun your session tests on web, desktop, mobile and each SSO path. Keep your session settings in a documented baseline so you can compare before and after. Mattermost publishes its release dates and support windows on its server releases page, which is the right place to plan the test cycle, and the upgrade process should include a rollback plan.
Limits to confirm in your environment
Session length in Mattermost depends on more than one setting. The server, the identity provider, the reverse proxy and the cluster all can end a session, and each has its own clock. The cards below list what to confirm against Mattermost documentation or a test in your own environment before you set a policy.
Setting names and defaults by version
Session setting names, their defaults and their units can change between server versions. Confirm the exact keys in the System Console and the configuration file for the version you run, including whether each one is measured in hours or in days. A default you copied from a blog post or an older release may not match your build. Record the values you observe on a test server and keep them with your change records so later upgrades can be checked against them.
Server releasesCoverage across web, mobile and desktop
Confirm whether each session setting applies to browser sessions, the mobile apps, the desktop apps and direct API access. Test each client separately, because a limit that ends a browser session may not end a session on a phone that was already signed in. Note how long a mobile device stays signed in after a password change or after a user is deactivated, since that is the window an attacker with a stolen device would use.
Identity provider token lifetime and sign-out
When users sign in with SAML or OIDC, the identity provider's token lifetime and its single sign-out behavior can affect how long a Mattermost session really lasts. Confirm whether Mattermost re-checks the identity provider, whether a sign-out at the provider ends active Mattermost sessions, and how deactivation in the directory propagates. Test this with a disabled account, because a session that survives the directory change is a gap in access control.
SAML single sign-onReverse proxy and load balancer timeouts
A reverse proxy or load balancer in front of Mattermost can close idle connections on its own schedule, separate from any Mattermost idle timeout. Check the idle and read timeouts on the proxy, the load balancer and any web application firewall, and confirm how long websocket connections stay open. Mismatched timers can cause users to be signed out early, or cause sessions to persist longer than the policy you intended.
Consistency across high availability nodes
A high availability cluster runs several application servers behind a load balancer, so confirm that session settings are applied the same way on every node and that a session created on one node is ended on all of them when required. High availability is available only on the Enterprise and Enterprise Advanced plans. Verify this by revoking a session on one node and confirming it fails on the others, and by restarting nodes during the test to confirm that settings persist after a rolling restart.
High availability docsPersonal access tokens and bot tokens
Confirm whether personal access tokens and bot tokens fall outside session timeouts. These credentials are often used by integrations and scripts and may not expire when a user session does. Check whether they are revoked when a password changes or a user is deactivated, who can create them, and whether they can be restricted. List every token type in use so that your session policy does not leave a long-lived credential untracked.
How DeployOpen works on this
DeployOpen plans and delivers Mattermost session length and timeout settings inside your own infrastructure, starting from a written scope that names your login paths, session rules and affected user groups. The work is tested, documented and handed to your team, with optional ongoing support.
How we scope
- Inventory which login paths exist today: web, mobile, desktop and SSO sign-ins
- Record the session lifetime, idle timeout and activity-extension rules your policy requires
- Agree in writing how password changes should revoke existing sessions for each user group
How we build
- Configure session settings on the server and confirm each client type honors them
- Test SSO sessions against your identity provider's own lifetime and logout behavior
- Verify that a password change ends active sessions across web, mobile and desktop clients
How we hand over
- Deliver a configuration record listing each session setting, its value and its owner
- Document the test cases, results and any client behavior that differs from policy
- Train administrators to change session settings and review them after each upgrade
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing first
- Ongoing support, upgrades and continuous testing are available as a retainer
- Retesting after Mattermost upgrades or identity provider changes can be added to the written scope

