Menu Close

Speed up Filebrowser file listing

Considering donating if you found my post helpful 😊

Buy Me a Coffee QR Code

FileBrowser is a neat program that allows you to access files on your system. You can access, rename, delete, move, and much more right from your browser.

Problem

It is simple, powerful, and working well…except when you are working with thousands of files. When trying to access a directory with thousands of files, FileBrowser takes a lot of times to list them all, sometimes minutes.

But there is something you can do to speed it up which will decrease those minutes to seconds.

Solution

You run filebrowser with these extra parameters:

$ filebrowser --disable-preview-resize --disable-thumbnails --disable-type-detection-by-header --cache-dir /tmp

Docker

For docker, you can add this to your compose file

command: --disable-preview-resize --disable-thumbnails --disable-type-detection-by-header --cache-dir /tmp

My full docker-compose.yml looks like this:

services:
filebrowser:
volumes:
- ./srv:/srv
- /my/cifs/mount:/srv/media-backup
- /my/sshfs/mount:/srv/media-backup-sshfs
- ./database:/database/
- ./config:/config/
environment:
- PUID=1000
- PGID=1000
ports:
- 8080:80
image: filebrowser/filebrowser
command: --disable-preview-resize --disable-thumbnails --disable-type-detection-by-header --cache-dir /tmp

Hope it helps!

Considering donating if you found my post helpful 😊

Buy Me a Coffee QR Code
0 0 votes
Article Rating
Subscribe
Notify of
guest
8 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Sandro

Good morning. I use Filebrowser in OpenMediaVault and I’m having problems with a folder that has about 6 thousand files. It takes more than 2 minutes to load the file list. I put these parameters in my compose file but it didn’t make any difference. I even deleted the db file to see if the application would recreate a new one but nothing happened. Any tips on what might be happening?

Sandro


version: “2.1”
services:
 filebrowser:
   image: filebrowser/filebrowser:s6
   command: filebrowser –disable-preview-resize –disable-thumbnails –disable-type-detection-by-header –cache-dir /tmp
   container_name: filebrowser
   environment:
     – PUID=1000
     – PGID=100
   volumes:
     – /Docker/filebrowser/database/filebrowser.db:/database/filebrowser.db
     – /Docker/filebrowser/settings/settings.json:/config/settings.json
     – /Docker/filebrowser/tmp:/tmp
     – /srv:/srv
   ports:
     – 8100:80
   restart: unless-stopped

Sandro

When I remove the word “filebrowser”, the container starts with the error /run/s6/basedir/scripts/rc.init: line 76: –disable-preview-resize: not found
Furthermore, I can no longer connect to Filebrowser. What will be the problem? I’m using the image from the official website and the latest docker available for OpenMediaVault.

Sandro

I changed the image. I’m going to do some tests online and on the local network. I noticed a huge improvement in speed. Before the listing took up to 3 minutes, now it takes between 5 and 10 seconds. I’ll check if after restarting the server or accessing from other machines it’s still fast. I really appreciate your help.

8
0
Would love your thoughts, please comment.x
()
x