Server guides · Troubleshooting
Why Audiobookshelf keeps logging you out
Check the Audiobookshelf fixes shipped in v2.35.0 and v2.35.1, then distinguish expired sessions, storage problems and proxy failures when logins still fail.
Start with your server version. Audiobookshelf v2.35.0 added a refresh-token grace period. v2.35.1 fixed duplicate tokens across simultaneous sessions. Update an older installation before trying token-expiry workarounds from older issue comments.
If you’re already on a release containing both fixes, check when the logout occurs and what the server records. An expired session, an admin changing account details, a storage problem and a failed proxy request need different fixes. The old tracking issue being closed does not mean every possible logout is fixed.
Identify the failed request
- If the session expires after a long period without use, check the configured refresh-token lifetime.
- If several devices lose their sessions together, check account changes and whether the server can persist its configuration database.
- If playback disconnects but the account stays signed in, inspect the reverse proxy and WebSocket connection. Increasing a WebSocket timeout does not repair a missing refresh-token session.
- If only the remote address fails, compare it with the local connection and inspect the failing HTTP response. Use the connection troubleshooting guide to separate connectivity from authentication.
When reporting the problem, include the server and client versions, whether it also happens in the web client, and a redacted log excerpt. Remove complete access and refresh tokens before sharing logs.
Check persistent storage
If the server logs also show database write errors, check the /config volume and its permissions. Back up the configuration before moving it. Keep the SQLite database on local storage; the audiobook files can live elsewhere. A report in the original investigation describes an Unraid installation that recovered after moving its configuration to a local SSD.
Check expiry and account changes
An administrator changing your account can invalidate an existing session. A refresh token can also expire after a long gap between listening sessions. Sign in again and check whether the problem returns during regular use.
Avoid extending access-token lifetimes to work around the old rotation bug. Longer-lived access tokens remain usable for longer if they leak, and releases containing the fixes below address that bug directly.
Check remote connectivity separately
Open the same server address in Safari and try its web client. If the local address works while the remote address fails, inspect the proxy response and certificate. The reverse-proxy guide covers WebSocket upgrades and upstream addresses.
A Tailscale connection can help isolate the public proxy from the server. It will not repair an expired or missing session by itself.
What changed in the server
JWT authentication arrived in Audiobookshelf v2.26.0. Two later fixes addressed different causes of repeated logouts:
- v2.35.0, May 17, 2026: a grace period lets the previous refresh token work briefly after rotation. This helps when a client misses the response containing its new token. See PR #5004.
- v2.35.1, May 28, 2026: unique token identifiers prevent two sessions refreshing in the same second from receiving identical tokens. See issue #5253 and PR #5255.
The original tracking issue includes the investigation and older workarounds. Advice there to lengthen access-token expiry predates these fixes. Check the release containing a fix before applying a workaround from an older comment.
How SoundLeaf handles a rejected session
SoundLeaf stores sign-in credentials in the iOS Keychain. When an authenticated request receives a 401, it attempts token refresh and can use stored credentials to obtain a fresh session before retrying the request. If credentials are no longer valid, you may need to sign in again.
If the server cannot be reached, restoring connectivity comes first. The getting started guide covers the server address and sign-in steps.
Affected versions
The missing refresh grace period was fixed in v2.35.0; the duplicate-token collision was fixed in v2.35.1. Later releases include those fixes. Unrelated expiry, account changes, storage failures and connection problems can still interrupt a session.