Using Mounted USB drive for storage in Syncthing Container

Hello all

I’m having a problem getting my external drive to play nice with my syncthing deployed to a docker container.

here’s the Gist of my set up:

  • Server running PROXMOX
    • VM Running Ubuntu Server
      • Portainer
        • Plex Container
        • Syncthing Container

I connected the drive to proxmox so the Ubuntu Server VM can use it. I’ve successfully used bind to connect to the USB Drive when creating the container(s) The mounted USB Drive is visible to Plex when configuring the server. The mount path of the Drive is available when SSH’ed into the VM, I can create folders, remove folders etc… When I’m in Syncthing however I can’t seem to get it to see the path to the drive despite the binds being successful. If I force Syncthing to the path I know the drive is mounted to and it tries to create a folder I get a permission denied.

I’ve changed the mounting permissions using FSTAB, the chown permissions match the user that syncthing is using to manage the filesystem.

I’m kind of at a loss, it feels like I’m close but I’ve been wracking my brain at this for a couple of hours already any insight would be amazing!

Thank you so much!

That’s quite the software stack. :slightly_smiling_face:

Each of the individual layers are great, but if the goal is for a production-ready setup that’s easier to maintain + there’s only going to be a few containers (or just Plex and Syncthing) + little need for all of Portainers features, using Docker directly will be better in the long run.

If there aren’t going to be other QEMU and/or LXC machines running alongside the Ubuntu VM, I’d even go a step further and remove PVE, then go with a bare-metal install of Ubuntu for a leaner and more secure system overall:

- Ubuntu Server
      - Docker
            - Plex Container
            - Syncthing Container

The bind mounts and permissions will also be simpler (plus more people on this forum will have a similar setup, making it easier to get help).

From your description and screenshots, it’s very likely that the user:group (or more precisely, the UID:GID) of the user running Syncthing inside the container doesn’t match that of the user and group garfield:garfield on the Ubuntu host.

Which Syncthing container image are you using?

Thanks for entertaining an answer!.. Much appreciated.

I’m merely using portainer as an entry into docker, I’m not very familiar with it at the command line level, still need that hand holding so to speak

I’m inclined to keeping proxmox as the base as I need to learn it. the containers are mostly for entertainment at the moment. The hardware is a fully featured server with dual CPUs and 256GB of ram.

on portainer I’m using the linuxserver latest channel version:- v1.27.6-ls138 Build-date:- 2024-04-09T09:12:04+00:00

for giggles I 777’ed the mounted USB drive and it didn’t work either.

I’ve confirmed that portainer is assigning it PUID/GUID of 1000 (which i’ve confirmed is the correct ID for the garfield user)

This is my fstab entry for the mount:

/dev/disk/by-uuid/E0B3-9065 /media/usb/ exfat defaults,uid=1000,gid=1000,umask=002 0 1

Thank you again for your insight!

Anyone have any other ideas what might be causing this permissions problem?

I’m considering building a NAS so I don’t have to deal with USB storage…

This is not really a syncthing question. Syncthing just uses the permissions it was given by the system. You might have more luck asking on portainer or plex forums.

Fair enough, that makes sense. thank you Audrius

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.