Skip to content
Discussion options

You must be logged in to vote

To adjust the auto‑logout (idle session expiration) in LibreChat, you can configure two environment variables:

  • SESSION_EXPIRY: how long the session cookie remains valid (in milliseconds).
  • REFRESH_TOKEN_EXPIRY: how long the refresh token remains valid (in milliseconds).

By default:

  • SESSION_EXPIRY = 1000 * 60 * 15 (15 minutes → 900000)
  • REFRESH_TOKEN_EXPIRY = (1000 * 60 * 60 * 24) * 7 (7 days → 604800000)

1. Using Docker Compose

If you’re deploying with Docker Compose, update your service definition for api in your docker-compose.yml (or supply a separate .env file):

services:
  api:
    # ... other settings ...
    env_file:
      - .env       # or define environment inline
    environ…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by liHai001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants