Redmine session lifetime and autologin settings

Redmine session lifetime and autologin decide how long a browser stays signed in and whether a user is remembered across visits. This page explains the settings to review, the trade-offs, and what to confirm in your version before changing them.

On this page

How Redmine session lifetime and autologin settings change who stays signed in

If your production Redmine serves staff, contractors or clients on shared or unmanaged devices, the question is how long a login should survive when nobody is actively using it. Three separate controls answer that question. Session maximum lifetime caps how long a session lasts from the moment it was created, regardless of activity. An inactivity timeout signs a user out after a period without requests. Autologin issues a persistent cookie so a user returns without entering a password. Each one matters for a different risk: a stolen or left-open browser is mostly an inactivity and autologin problem, while a long-lived token that never expires is a maximum lifetime problem. Confirm the exact setting names, where they live (typically the application settings or configuration files), and their defaults against the Redmine version you run, using the Redmine installation guide and the current documentation for that release.

Redmine's documentation advises setting a maximum session lifetime when sessions are stored in the cookie store. With cookie-based sessions, the session data travels with the client and the server cannot revoke an individual cookie on its own, so the lifetime limit is the main backstop against a copied cookie remaining valid indefinitely. Check how your version handles this before you change anything, and decide whether autologin should be allowed at all for administrators and for users who handle sensitive projects. Note that the cookie session secret is derived from the application's secret_key_base value, which is tied to the SECRET_KEY_BASE setting in your deployment. Changing or rotating that secret invalidates existing sessions, so plan the change as a maintenance event and tell users to expect a sign-in prompt afterward.

Session changes apply in two places, and both need a check. New settings govern sessions created after the change, but existing sessions may keep their old lifetime until they expire or the secret changes. After you apply a change, sign in on a test account from a clean browser, confirm the inactivity and maximum lifetime behave as the documentation describes, and confirm autologin is absent or present as intended. Review the same settings after each upgrade, since defaults can change between releases. If your organization needs these controls evidenced for a compliance review, record the chosen values, the test results and the date of the change, and ask your team whether the setting is enforced in code or only in a configuration file that an administrator could edit.

Session and autologin options and when each fits

This table compares the four session controls that shape how long a Redmine login lasts: maximum lifetime, inactivity timeout, autologin and the session store. Read each row for what it limits, the user experience it creates and the environment where it fits, then confirm the exact setting names in the configuration guide for the release you deploy.

OptionWhat it limitsUser experienceWhere it fits
Session maximum lifetimeThe total time a session stays valid from sign-in, whether or not the user is activeUsers sign in again at a fixed interval, even while workingRegulated or shared-workstation settings where a forced re-login window is a documented requirement
Inactivity timeoutThe idle period after which a session expiresUsers stay signed in during active work and return to a sign-in page after a breakOffices and clinics with shared terminals, where idle screens are the main exposure
Autologin (remember me)Whether a persistent cookie can restore a session after the browser closesUsers skip sign-in on later visits from the same browserInternal tools on managed devices; usually a poor fit for administrator accounts
Cookie session storeWhere session data lives (in the signed client cookie), so keys and cookie settings protect itNo server-side session table to clear, so expiry depends on the stored timestamps and the secret keySingle-server or small deployments that want no session database; pair with a maximum lifetime
Server-side session storeWhere session records live on the server, so administrators can revoke them directlyRevocation takes effect immediately for sessions held in the storeDeployments that must end sessions centrally after account changes or incidents
Changing settings with live sessionsWhether existing sessions pick up new limits, which depends on where the session data is keptUsers may stay signed in under old rules until their sessions end or the key changesPlan the change window, then confirm with a test account in the release you run
Secret key base linkWhether session cookies stay valid across restarts and servers, and whether rotation signs everyone outRotating the key ends all cookie sessions at onceSet the key once in the secrets file and treat rotation as a planned sign-out event

Why a maximum session lifetime matters with the cookie store

An idle timeout alone does not limit how long a session stays valid when sessions live in a cookie. With a cookie-based session store, the session state travels in the browser as a signed cookie rather than sitting on the server in a table that can be cleared. A copied cookie, whether taken from a shared workstation, a backup of a browser profile or a malicious script, carries the same session data wherever it is replayed. An inactivity timeout only works if the server can see that the session has gone idle, and a replayed cookie that keeps being used looks active. For that reason the Redmine documentation advises setting a maximum session lifetime when the cookie store is in use, so that a session ends after a fixed period regardless of activity. Check the exact wording and the mechanics against the current Redmine documentation for your release rather than relying on this summary.

For a security review, the practical consequence is that the reviewer should be able to state the absolute window in which a stolen session remains usable, not just the idle period. Ask the team running the deployment to show the configured maximum lifetime and the inactivity timeout side by side, and to explain what happens to a session once either limit is reached. Confirm whether the cookie store is the one in use in your installation, because the answer changes which control carries the weight. Also confirm how a maximum lifetime interacts with autologin, since a long-lived remember-me cookie can extend access beyond the window the reviewer expects. Record these answers with the configuration file version so that an auditor can see the decision and when it was made.

The decision therefore has two parts that belong together: a fixed upper bound that the server enforces on every session, and an inactivity timeout that tightens the window for users who leave a browser unattended. Setting only one of them leaves a gap that a security reviewer will usually find. Before finalizing values, check the current settings reference and the release notes for your Redmine version, and test with a session copied to a second browser to confirm that the server rejects it once the limit passes. Document the test result as evidence, because it shows the control works in your environment rather than only in the documentation.

How to set session lifetime and autologin in a production Redmine

This sequence takes a production Redmine from its current session behavior to a documented policy for session lifetime, inactivity timeout and autologin, applied with a restart and confirmed in a browser. It is designed so the security and business owners agree the values before anyone edits the configuration.

  1. Record current session behavior in a test copy

    Clone the production instance into a test environment with the same Redmine version, database and configuration file. Log in with a normal account, note how long the session stays valid while idle, whether the Remember me option appears on the login form, and whether a session survives a browser restart. Record the Redmine version from the administration information page and the session settings present in the configuration file. The step is done when you have a written baseline that another engineer could reproduce, so later changes can be compared against something concrete.

  2. Agree the session policy with owners

    Ask the security owner to set the maximum session lifetime and the inactivity timeout, and ask the business owner which user groups need long sessions, such as field staff on shared devices. Confirm whether autologin is allowed at all, and for which roles. Write the decision down with the reason for each value, including who approved it. Ask for the basis of each number from the organization's own policy, since this guide does not supply recommended values. The step is done when the values and the approver are recorded in the change request.

  3. Set lifetime and inactivity in configuration

    Open the configuration file for the installed version and find the session-related keys in the documentation for that release, not in notes copied from older posts, because key names can differ between versions. Set the maximum lifetime and inactivity values agreed in the previous step. The Redmine guidance advises setting a maximum lifetime when sessions are stored in the cookie store, so confirm the session store in use before editing. Keep the change in the version-controlled configuration where possible. The step is done when the file parses without errors and the diff contains only the agreed keys.

  4. Decide and configure autologin

    If the policy allows autologin, enable it only for the roles and login paths approved in the policy, and confirm that the Remember me option behaves as intended on the test copy. If autologin is not allowed, turn it off and confirm the login form no longer offers it. Check how the secret used for signed cookies is defined in the configuration, because changing it invalidates existing sessions and must be coordinated with the owners. The step is done when the test copy shows the approved autologin behavior and the secret handling is documented.

  5. Restart the application server

    Schedule the change in a window agreed with users, since sessions that are already open may end when the server restarts or when the secret changes. Restart the Puma or other application server process used in production, and restart any background worker that reads the same configuration. Confirm from the server logs that the process started without configuration errors. The step is done when the service reports healthy and the logs show no startup warnings about the session settings.

  6. Verify with a fresh browser session

    Open a new private browser window, sign in with a test account, and confirm the login form shows the expected autologin option. Check that the session is valid for the expected period from the baseline you recorded. Confirm that the session does not persist beyond the maximum lifetime set in the policy. The step is done when the observed behavior matches the agreed values, and any difference is logged as a defect to fix before go-live.

  7. Verify idle timeout and logout

    Sign in, leave the browser idle beyond the configured inactivity timeout, then reload a page and confirm Redmine asks for a new sign-in. Repeat with a normal logout and confirm the session cookie cannot be reused by revisiting a protected page with the old session. Check the same behavior for a user who enabled autologin, if you allowed it. The step is done when idle expiry and logout both end the session as the policy requires, and the results are attached to the change record.

How a Redmine login session is issued, renewed and expired

The flow starts when a user submits credentials through the browser, which reaches Redmine via the reverse proxy. On success Redmine issues a signed session cookie, and every later request is checked against the maximum lifetime and inactivity timeout before the session is renewed on activity or removed on logout or expiry. The signing secret is the trust boundary: anyone holding it can forge cookies, so it must be protected. If autologin is enabled, a separate long-lived remember token sits in the browser and outlives the session, so it needs its own review.

Session cookie and autologin token flow, with the signing secret as the trust boundary.

Security considerations for session policy

Session lifetime and autologin decide how long a stolen or forgotten login stays useful. The cards below cover the parts of Redmine's session behavior that interact with each other: the secret that signs session cookies, shared devices, two-factor authentication and sudo mode, the proxy in front of Redmine, logging, and what to recheck after each upgrade.

Cookie signing secret changes

Redmine's session cookies are signed with a secret derived from SECRET_KEY_BASE. If that value changes, the signature check fails for existing cookies, so users are signed out at once. Before you rotate it, confirm who will be signed out, whether scheduled jobs or API clients depend on a browser session, and where the new value is stored. Keep the value out of version control and make sure backups that contain it are protected, because anyone holding it can forge valid session cookies.

Installation guide

Autologin on shared devices

Autologin keeps a user signed in across browser restarts through a persistent cookie. On shared workstations, kiosks or managed devices, that cookie outlives the person who used the machine. Check whether your Redmine settings allow autologin at all, who can enable it for their own account, and whether your device policy clears browser cookies at logout. Write down the user population that may use autologin, such as internal staff on managed laptops only, and confirm that the setting matches it.

Interaction with 2FA and sudo mode

Two-factor authentication and sudo mode add checks on top of a signed-in session, but a long-lived session can carry a user past some of those prompts. Test the sequence on a staging instance: sign in with autologin, perform an administrative change, and confirm whether Redmine asks for a fresh verification. Repeat for a user with 2FA enabled and for an account authenticated through LDAP, since those accounts may follow different paths.

Session behavior behind a proxy and TLS

Redmine sees the connection from the reverse proxy unless you pass the original scheme and client address through. Confirm that the proxy terminates TLS, that cookies are marked secure when served over HTTPS, and that the application trusts forwarded headers only from the proxy. A mismatch can cause sessions to be dropped on every request or, in the other direction, cookies to be sent over plain HTTP. Verify the behavior with a browser session and a request captured at the proxy.

Logging of session events

Session lifetime is only useful as a control if you can see when sessions start, expire and are reset. Review what Redmine writes to its production log on sign-in, failed sign-in, logout and sudo prompts, and decide whether your central log platform receives those entries. Confirm that log entries do not record session identifiers or cookie values, since those would let anyone reading the logs take over a session.

Reviewing settings after upgrades

Session and authentication defaults can change between Redmine releases, and a restored backup may carry settings from an older configuration. After each upgrade, compare the session, autologin and sudo settings with your documented policy, then test a sign-in, a sign-out and a privileged action. Keep the result with the change record so auditors can see that the policy was checked after the change. Ask your implementation partner to include this check in the upgrade runbook.

Upgrade guide

Which session settings fit each environment

When Redmine is reachable from the internet, anyone can attempt to use a session cookie or a captured browser, and external collaborators often sign in from unmanaged laptops and home networks. The risk that changes most is session theft through malware, a shared browser profile or a cookie exposed by a misconfigured proxy, so the maximum session lifetime matters more than inactivity alone. Expect the security team to ask for shorter maximum lifetimes and to decide whether autologin is allowed at all for external accounts.

  • Maximum lifetime: A hard cap limits how long a stolen cookie stays valid, even for an active user.
  • Inactivity timeout: An idle timeout protects unattended browsers on shared home or office machines.
  • Autologin: Persistent login tokens should be disabled or restricted for external accounts unless the team accepts the added exposure.
  • Trade-off: External users will re-authenticate more often, which costs convenience and may generate support requests.
  • Dependencies: Combine session policy with two-factor authentication and sudo mode so that a session alone does not unlock sensitive actions.

Before going live, confirm the session settings in your Redmine version and test how long a session survives after logout, password change and proxy restarts.

Limits to confirm in your Redmine version and environment

Session behavior in Redmine depends on the release you install, the secret key base it runs with, the number of application servers and the proxy in front of them. Each item below should be checked in the documentation for your exact release and in your own environment before you set a lifetime or enable autologin.

Available session options in your release

Session timeout, maximum lifetime and autologin are not guaranteed to exist in every Redmine line, and their names and defaults can change between releases. Read the configuration and settings documentation for the version you plan to run, and confirm which keys are honored by the release installed on your servers. Do not copy a setting from a blog post or an older install guide without checking it against the code you deploy. Record the exact version in your change ticket.

Installation guide

Stable secret key base across deployment

Sessions are signed with the application secret key base. If it is missing, regenerated or different between servers, existing sessions become invalid and users are signed out without warning. Confirm where the value is stored, who can read it, and that it survives configuration management runs and container rebuilds. Treat it as a secret and include it in your backup and restore plan so that restores do not silently log everyone out.

Shared session state across application servers

If you run several Puma processes or hosts behind one address, each one must read and accept the same session data. With the cookie store, every server needs the same secret key base. With any server-side store, confirm which store the release supports and that all nodes point to it. A mismatch often appears as users being logged out at random when a request lands on a different server, so test sign-in across each node before go-live.

Autologin availability and its risks

Autologin keeps a user signed in across browser restarts by storing a persistent credential in a cookie. Whether it is offered, how it is enabled, and what it stores depend on the release and on your authentication method, including LDAP. Confirm the setting in the release documentation, decide whether shared workstations are in scope, and check that autologin does not bypass two-factor authentication or sudo mode in the release you run.

Effect of upgrades on existing sessions

Changing the session settings or upgrading to a new release can end sessions that users already hold. Confirm in the upgrade guide for your source and target versions whether existing cookies remain valid, and whether any secret or configuration key changes during the move. Plan a short notice to users, and test an upgraded copy with a signed-in test account before you switch production traffic to it.

Upgrade guide

Reverse proxy and load balancer timeouts

A proxy or load balancer can end an idle connection or cut a long request before Redmine's own timeout applies, which users experience as an unexpected sign-out or a failed form submission. Compare the proxy idle timeout, the keep-alive settings and any sticky session behavior with the lifetime you configure in Redmine. Confirm which value is authoritative for each user action and test a long-running session through the same path your users take.

Questions buyers ask about Redmine session settings

How long does it take to change Redmine session settings?

The configuration change itself is small, but the time an engagement takes depends on how many environments and users are involved, how the current settings were made, and how much testing the change needs. The main drivers are whether Redmine runs on a single host or a cluster, whether it uses the cookie session store, how many users depend on long-lived sessions such as autologin, and whether API clients or integrations rely on the web session. Ask any partner to show the steps, the environments covered and the verification they will run before you agree on a schedule. Timing is set in the written scope rather than assumed.

What does a Redmine session hardening engagement cost, and what drives the quote?

Redmine is free under GPL v2, so the cost comes from people and infrastructure: the review of your current configuration, the change itself, testing in a non-production copy, the handover and any follow-up support. Those components are mostly one-time work. Recurring costs appear when you add a retainer for upgrades or security testing. DeployOpen does not publish a price list. A quote follows from a written scope that lists the environments, the settings to review, the users and integrations affected and the deliverables. Ask for each line item to be tied to a deliverable.

What does our team need to provide before the work starts?

Expect to provide read access to the Redmine configuration file and the production settings, the Redmine version and Rails environment, the database type, and a list of login methods in use, including LDAP, API clients and any SSO plugin. You should also supply a non-production copy or staging environment for testing, a named contact who can approve the user-facing change, and a window for communicating a forced sign-out. Confirm with your team which backups exist and how they are restored, since a settings change should not be the only recovery path.

Can an internal Redmine administrator change these settings without outside help?

Yes, a competent administrator with shell access to the host can change the session settings, provided they have tested the effect on a copy first. The harder parts are judging the trade-off between a maximum session lifetime and user convenience, checking how autologin interacts with the cookie store, and confirming that the SECRET_KEY_BASE value is handled correctly during the change. If no one on your team has run Redmine through a Rails upgrade or restarted it under a production process manager, an external review can reduce the risk of a mistake. Your administrator should still own the decision.

What happens to users who are already signed in after a session change?

Behavior depends on the session store and on how the settings are applied. With the cookie store, a change to the secret key base or to the session settings can invalidate existing sessions, so signed-in users may be asked to sign in again. Shorter maximum lifetimes take effect at the next request for sessions that exceed the new limit. Plan the change for a quiet period, warn users, and confirm in staging exactly which sessions survive. Also check that automated API clients using API keys are not affected by a web session change.

How do session lifetime, autologin, 2FA and sudo mode fit together?

They control different parts of the sign-in lifecycle, so change them as a set. Session lifetime limits how long a signed-in browser stays authenticated, autologin keeps a user signed in across browser restarts, two-factor authentication adds a second factor at sign-in, and sudo mode asks for re-authentication before sensitive administrative actions. A long autologin window can weaken a stronger sign-in policy, so review them together. Confirm with your security team which combination matches your policy and test each path, including users who have 2FA enrolled.

Why does the secret key base matter when changing session settings?

The secret key base, stored as SECRET_KEY_BASE in the environment or secrets file, signs and encrypts session data in Rails. If the cookie store is used, the key protects session contents, so a weak, shared or accidentally rotated value can either expose sessions or sign everyone out. Treat the value as a secret, keep it out of version control, back it up securely, and rotate it only as a planned change. Ask your partner how they will confirm the value is set correctly and that old sessions behave as expected after any change.

How DeployOpen works on this

DeployOpen plans and implements Redmine session lifetime and autologin settings inside your own infrastructure, starting from your policy for session length, idle timeout and autologin. Each change is agreed in writing, tested against real sign-in and API flows, and documented so your security and operations teams can review it.

How we scope

  • Written scope lists the session, inactivity and autologin values your policy requires, agreed before any change is made.
  • Scope records how Redmine is signed in (local accounts, LDAP or a reverse proxy) so cookie and session behavior is mapped correctly.
  • Scope states whether existing sessions are expected to end at cutover, and how users and administrators will be told.

How we build

  • We set the maximum session lifetime and inactivity timeout in the Redmine configuration for your deployment and record each value.
  • We confirm that the session cookie store and the SECRET_KEY_BASE handling match your rotation and recovery plan before changes go live.
  • We test sign-in, idle logout, autologin on shared workstations and API clients against the agreed values in a staging copy.

How we hand over

  • You receive a settings record listing each session value, its reason and the test that verified it.
  • The runbook explains how to rotate the secret, what happens to active sessions and how to roll back a change.
  • Your administrators get a short walkthrough so they can review the settings during audits and future upgrades.

How we support

  • Ongoing support is available as a retainer, covering retesting after Redmine upgrades and plugin changes.
  • Retesting covers session behavior after each security release, since upgrades can change how sessions are handled.
  • Support can include periodic reviews of the settings against your access policy as your user base changes.

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.