filebrowser icon indicating copy to clipboard operation
filebrowser copied to clipboard

GUI integration of Session Timeout setting

Open korgano opened this issue 11 months ago • 7 comments

Is your feature request related to a problem? Please describe. Filebrowser consistently times out on long 2+ hour long uploads of content on slower networks. This leads to corrupt files, which have to be deleted, and forces user to attempt reupload, which may run into the same issue.

Describe the solution you'd like A UI card in either Profile Settings or Global settings that displays the current token expiration time and allows the user to increase/decrease it as necessary.

Additional context This issue is seen in repeated reports: https://github.com/filebrowser/filebrowser/issues/2553 https://github.com/filebrowser/filebrowser/issues/2554 https://github.com/filebrowser/filebrowser/issues/3150

This PR seems to resolve it, but there's no documentation on how to implement this setting, especially for Docker: https://github.com/filebrowser/filebrowser/pull/2753

korgano avatar Feb 01 '25 15:02 korgano

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Mar 04 '25 02:03 github-actions[bot]

Would like to update that Docker version of Filebrowser does not seem to respect the following configuration via manual filebrowser.json edit:

// filebrowser.json
{
  "tokenExpirationTime": "6h"
}

Configuration changes made through the GUI are respected, which means that making this change through the GUI should persist across sessions.

korgano avatar Mar 04 '25 12:03 korgano

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 04 '25 02:04 github-actions[bot]

Another obligatory bump to keep the issue from getting swept under the rug.

korgano avatar Apr 05 '25 12:04 korgano

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar May 06 '25 02:05 github-actions[bot]

Another obligatory bump to keep the issue from getting swept under the rug.

korgano avatar May 06 '25 14:05 korgano

leads to corrupt files, which have to be deleted, and forces user to attempt reupload

This issue that needs to be resolved. Please look into it.

ayan-iiitd avatar May 22 '25 19:05 ayan-iiitd

still not even a workaround? that is really annoying.... thought first it was my reverseproxy, but no.....

4920441 avatar Oct 21 '25 18:10 4920441

I've submitted PR #5546 that should fix this issue!

The problem was that tokenExpirationTime wasn't being saved to the database during initial setup. The PR includes:

  • Fix for Docker config file not being respected
  • Environment variable support (FB_TOKEN_EXPIRATION_TIME)
  • CLI command to update existing databases (config set --token-expiration-time)
  • Comprehensive Docker configuration documentation

All configuration methods have been tested and appear to work correctly. 🤞

brianfromm avatar Nov 15 '25 05:11 brianfromm

@korgano, now that my PR is merged, you should be set. Here's a detailed overview of your options:

Session Timeout

By default, user sessions expire after 2 hours. If you're uploading large files over slower connections, you may need to increase this timeout to prevent sessions from expiring mid-upload.

Temporary Change (Current Session Only)

To temporarily increase the timeout for the current server session, restart File Browser with:

CLI flag:

filebrowser --tokenExpirationTime 6h

Environment variable:

FB_TOKEN_EXPIRATION_TIME=6h filebrowser

Configuration file:

{
  "tokenExpirationTime": "6h"
}

These changes apply only while the server is running and do not modify the stored database configuration.

Permanent Change (Stored in Database)

To permanently change the timeout setting, use filebrowser config set:

filebrowser config set --tokenExpirationTime 6h

Then restart File Browser for the change to take effect.

Duration Formats

Valid duration formats include "2h", "30m", "24h", or combinations like "2h30m".

brianfromm avatar Nov 19 '25 02:11 brianfromm