filebrowser icon indicating copy to clipboard operation
filebrowser copied to clipboard

If mount points offline, unable to continue with other mounts

Open pecbeck opened this issue 1 month ago • 9 comments

I have several smb mounts from the server running qbfilebrowser. If one is offline (e.g server asleep) then unable to use filebrowser for all other online mounts. Throws error and won't continue

pecbeck avatar Nov 20 '25 22:11 pecbeck

Are you sure its an issue with filebrowser? the program is set to allow non-working sources and to continue running.

See https://github.com/gtsteffaniak/filebrowser/issues/1264

gtsteffaniak avatar Nov 21 '25 23:11 gtsteffaniak

All i know is that if any of my mounts are not working, browser fails with error

pecbeck avatar Nov 22 '25 00:11 pecbeck

can you show the error?

gtsteffaniak avatar Nov 25 '25 01:11 gtsteffaniak

My kitchen PC goes to suspend overnight so my raspberrypi run fb loses mount. Once PC awake, fb starts fine

Watchtower log

time=2025-11-25T03:00:18Z

level=info

msg=Found new ghcr.io/gtsteffaniak/filebrowser:latest image (3b5d646b1d27)

time=2025-11-25T03:00:30Z

level=info

msg=Stopping /filebrowser-quantum (2f3651b3187b) with SIGTERM

time=2025-11-25T03:00:38Z

level=info

msg=Creating /filebrowser-quantum

time=2025-11-25T03:01:09Z

level=error

msg=Error response from daemon: error while creating mount source path '/media/kitchen': mkdir /media/kitchen: file exists

Docker compose up

 ✔ Container filebrowser-quantum  Recreat...                                 0.2s Attaching to filebrowser-quantum

Error response from daemon: error while creating mount source path '/media/kitchen': mkdir /media/kitchen: file exists

pecbeck avatar Nov 25 '25 09:11 pecbeck

Also if fb container is running, and the PC suspends, starting fb on raspberrypi spins saying loading until PC wakes, then loads ok. Eventually I get "something went wrong" then red error saying host offline I would add screenshot but can't see how to attach it here, link icon at bottom doesn't work

pecbeck avatar Nov 25 '25 10:11 pecbeck

BTW, I'm on 1.1.1 beta (using :latest tag)

pecbeck avatar Nov 25 '25 19:11 pecbeck

Those aren't FileBrowser application logs, looks like some pre launch error from watchtower?

gtsteffaniak avatar Nov 27 '25 02:11 gtsteffaniak

Correct, I was showing the same type of error I get from fb when my kitchen PC is suspended. Irrespective of the watchtower log, fb fails if host is offline. If host is online watchtower updates ok, but if host is offline , watchtower fails per the logs Do you need any further info, its a solid failure, just trying to help by adding watchtower error too.

pecbeck avatar Nov 27 '25 12:11 pecbeck

Here's my compose file. If any of the mounts are offline, fb loads, times out with red host offline dialogue box, then unable to access any other mounts Am I using this incorrectly? If so, what am I doing wrong This is a terrific improvement on the original filebrowser, really appreciate your work

services: filebrowser: image: ghcr.io/gtsteffaniak/filebrowser:latest container_name: filebrowser-quantum ports: - "89:80" volumes: - ./config:/folder - ./data:/home/filebrowser/data - /media/kitchen:/folder/kitchen - /media/HDD:/folder/pi5_HDD - /media/usb_pi4:/folder/usb_pi4 - /media/usb1_pi4:/folder/usb1_pi4 - /media/pi:/folder/pi environment: FILEBROWSER_CONFIG: "data/config.yaml" FILEBROWSER_ADMIN_PASSWORD: "change-me" PUID: "1000" PGID: "1000" restart: unless-stopped

Config.yaml server: sources: - path: /folder config: defaultEnabled: true

pecbeck avatar Nov 28 '25 11:11 pecbeck

Image

pecbeck avatar Dec 11 '25 16:12 pecbeck

@pecbeck the config that you send here is the config that you're using?

If so, why you're mounting all your sources as a single source? Maybe that's the issue...

Try to separate them in config.yaml, like this:

server:
  sources:
    - path: /folder/kitchen
      config:
        defaultEnabled: true
    - path: /folder/pi5_HDD
      config:
       defaultEnabled: true
    - path: /folder/usb_pi4
      config:
        defaultEnabled: true
    - path: /folder/usb1_pi4
      config:
        defaultEnabled: true
    - path: /folder/pi
      config:
        defaultEnabled: true

I think with that should work, and if not, show the filebrowser logs here, not the watchtower logs.

docker logs filebrowser-quantum

Kurami32 avatar Dec 11 '25 18:12 Kurami32

I posted my compose.yaml earlier asking for help if I'm using this incorrectly. I honestly don't understand your post, is this the config yaml file or the docker compose yaml. Sorry if I'm being dim but I really don't understand what I'm doing wrong. I posted the watchtower logs because it showed a failure due to kitchen being offline, trying to help identify this problem

pecbeck avatar Dec 11 '25 18:12 pecbeck

My config.yaml

server: sources: - path: /folder config: defaultEnabled: true

Everything works perfectly until one of the sources in my compose.yaml goes offline

pecbeck avatar Dec 11 '25 18:12 pecbeck

Is the configuration file of filebrowser (config.yaml), is a different file from docker-compose.yaml. I was saying to try configure your sources like that to see if works.

Because from your docker-compose.yaml I see that you have all the sources in the same /folder, and then in config.yaml, you have only one source configured.

Kurami32 avatar Dec 11 '25 18:12 Kurami32

Ok so I need to basically duplicate the binds in my docker compose with those in config.yaml?

pecbeck avatar Dec 11 '25 19:12 pecbeck

Yep, more or less, but not exactly in the docker compose, but in config.yaml, I'll try to explain:

(using your configs as example)

In your docker-compose.yaml you are mounting your sources:

# docker-compose.yaml
services:
  filebrowser:
  image: ghcr.io/gtsteffaniak/filebrowser:latest
  container_name: filebrowser-quantum
  ports:
    - "89:80"
  volumes:
    - ./config:/folder/config          # Source 01 (I think)
    - ./data:/home/filebrowser/data 
    - /media/kitchen:/folder/kitchen   # Source 02
    - /media/HDD:/folder/pi5_HDD       # Source 03
    - /media/usb_pi4:/folder/usb_pi4   # Source 04
    - /media/usb1_pi4:/folder/usb1_pi4 # Source 05
    - /media/pi:/folder/pi             # And source 06
  environment:
    FILEBROWSER_CONFIG: "data/config.yaml"
    FILEBROWSER_ADMIN_PASSWORD: "change-me"
    PUID: "1000"
    PGID: "1000"
  restart: unless-stopped

So, you should do the same in the configuration file of filebrowser (config.yaml), binding them separately too, like this:

# config.yaml
server:
  sources:
    # Source 01
    - path: /folder/config
      config:
        defaultEnabled: true
    # Source 02
    - path: /folder/kitchen
      config:
        defaultEnabled: true
    # Source 03
    - path: /folder/pi5_HDD
      config:
        defaultEnabled: true
    # Source 04
    - path: /folder/usb_pi4
      config:
        defaultEnabled: true
    # Source 05
    - path: /folder/usb1_pi4
      config:
        defaultEnabled: true
    # Source 06
    - path: /folder/pi
      config:
        defaultEnabled: true

In UI you will see all of them as separate source instead of folders under the same source like before.

Something like this:

Image

So, when your kitchen source is offline, just that one will become red, and the rest should remain green and accessible.

Kurami32 avatar Dec 11 '25 19:12 Kurami32

Ah, I see! I'll try this tomorrow, hopefully will fix things. Not too clear from the docs I've read so far, so many thanks for your clarification. I'll post back results. Thanks!

pecbeck avatar Dec 11 '25 20:12 pecbeck

Ok, despite changing config.yaml, if kitchen mount is offline, fb won't start

[+] down 1/2 ✔ Container filebrowser-quantum Removed 0.0s ⠙ Network fbquantum_default Removing 0.2s [+] up 2/2 ✔ Network fbquantum_default Created 0.1s ✔ Container filebrowser-quantum Created 0.3s Error response from daemon: error while creating mount source path '/media/kitchen': mkdir /media/kitchen: file exists

This is where I just don't understand what I am configuring incorrectly

pecbeck avatar Dec 12 '25 09:12 pecbeck

If I add noauto to fstab, then fb starts fine showing empty kitchen mount, however with noauto, I would have to manually mount /media/kitchen every time it comes back online, as will not auto mount at boot or any other time

pecbeck avatar Dec 12 '25 13:12 pecbeck

Ah, well, that's an issue with the drive mounts and docker, is not related with filebrowser.

I'm not sure why can be happening, but seems that docker auto-directory creation is conflicting with the mount point somehow.

The only solution that I can think are:

  • Creating a systemd mount units ( How you said that you need to.mount manually, this for automate the process).
  • Mount in docker by UUID
  • And modify fstab

But I'm not sure if that will even work.

Kurami32 avatar Dec 12 '25 14:12 Kurami32

I'll try to help if I can, so..

How looks your fstab? And how looks the /media directory when docker throws that error?

Kurami32 avatar Dec 12 '25 14:12 Kurami32

Yep, I have spent ages trying different options, and, like you, concluded it's a basic docker issue. Many thanks for your thoughts and comprehensive help

pecbeck avatar Dec 12 '25 14:12 pecbeck

//192.168.1.208/e /media/kitchen cifs nofail,x-systemd.automount,_netdev,vers=3.0,credentials=/etc/samba/credentials

/media/kitchen drwxr-xr-x 2 root root 0 Nov 25 16:05 kitchen

pecbeck avatar Dec 13 '25 16:12 pecbeck

Ah, is a network cifs drive. I think that docker has a native driver for this that mounts the drive directly in the docker filesystem.

I'm not familiar with this, but seeing this discussion in the docker forums.

Basically you'll need to modify your docker compose, something like this:

# docker-compose.yaml
services:
  filebrowser:
  image: ghcr.io/gtsteffaniak/filebrowser:latest
  container_name: filebrowser-quantum
  ports:
    - "89:80"
  volumes:
    - ./config:/folder/config
    - ./data:/home/filebrowser/data
    # With docker CIFS volume
    - kitchen_share:/folder/kitchen
    # I think you'll need to do the same if this are like 'kitchen'
    - /media/HDD:/folder/pi5_HDD
    - /media/usb_pi4:/folder/usb_pi4
    - /media/usb1_pi4:/folder/usb1_pi4
    - /media/pi:/folder/pi
  environment:
    FILEBROWSER_CONFIG: "data/config.yaml"
    FILEBROWSER_ADMIN_PASSWORD: "change-me"
    PUID: "1000"
    PGID: "1000"
  restart: unless-stopped

volumes:
  kitchen_share:
    driver: local
    driver_opts:
      type: cifs
      device: "//192.168.1.208/e"
      o: "vers=3.0,credentials=/etc/samba/credentials,uid=1000,gid=1000,nofail,_netdev"

Kurami32 avatar Dec 13 '25 17:12 Kurami32

And I'll make this issue a discussion, we'll continue there if you want to.

Kurami32 avatar Dec 13 '25 17:12 Kurami32