Setting up syncthing with Docker/Portainer

  • Hi there,


    how do I have to bind my directories to my Syncthing container so that I can access them from the Syncthing GUI?


    The directories to be synchronized are


    /srv/dev-disk-by-label-Daten/Daten/me/folder_x

    /srv/dev-disk-by-label-Daten/Daten/my_wife/folder_y


    Do I have to bind every particular folder to /var/sync or only the folder which contains my sync-folders (/srv/dev-disk-by-label-Daten/Daten/)?


    My test installation in VB had only one shared folder, now I have the challenge of using several.

    (The test installation was done with a friend who works with Docker but unfortunately isn't available atm; I'm not too familiar with it)


    Thanks for any assistance,

    fahrer17

    OMV6.x

    AMD Ryzen 5 5600G

    ASRock B550M Pro4

    Crucial DIMM 16GB

    Western Digital WD Blue SN570

    Seagate IronWolf 8TB/WD Red 8TB

    AeroCool CS-102

  • Ok, I was able to solve the problem (tbh my friend was ;)), I try to describe it for the next container beginner looking for help.


    Actually there were two problems:


    1. Binding the right directories:

    You have to bind every folder you want to syncronize to a particular subfolder in the container's data folder

    e.g.

    /srv/dev-disk-by-label-Daten/Daten/me/folder_x -> data/me

    /srv/dev-disk-by-label-Daten/Daten/my_wife/folder_y -> data/my_wife


    2. Permissions

    Make sure no folder is owned by root. In my case /srv/dev-disk-by-label-Daten/Daten/my_wife belonged to root; no idea why, my data drives+directories were created with OMV1(?). Changing the owner solved it.

    OMV6.x

    AMD Ryzen 5 5600G

    ASRock B550M Pro4

    Crucial DIMM 16GB

    Western Digital WD Blue SN570

    Seagate IronWolf 8TB/WD Red 8TB

    AeroCool CS-102

    Einmal editiert, zuletzt von fahrer17 ()

  • fahrer17

    Hat das Label gelöst hinzugefügt.
  • Hey all, I am also struggling with this setup as well.

    i'm a newbie to OMV, cli, coding, NAS, docker & portainer, please bear with me if this is an obvious error. (I have attached a log for the portainer docker instance)


    The Instance log is also presenting this:


    standard_init_linux.go:211: exec user process caused "exec format error"


    Per:

    https://github.com/pi-hole/docker-pi-hole/issues/519

    &

    https://github.com/olbat/dockerfiles/issues/28


    Is this my lack of experience or a portainer docker environment issue or syncthing image. Been into this problem for two days, any help/suggestions could be helpful.


    I have tried to find relevant issues on this forum, the above comment by @fahrer17 to be one of my approaches.


    I am Running: raspberry pi 4, 4GB with Linux 4.19.97, raspian lite, OMV - 5.4.3-1, portainer 1.23.2

  • As mentioned before I'm a docker beginner myself and therefore did start with a simple container. But a Pihole is next on my docker list (Pihole's instructions still look pretty complicated to me).

    As soon as I know how to do it I can try to explain how to do it, maybe this can help others too.

    OMV6.x

    AMD Ryzen 5 5600G

    ASRock B550M Pro4

    Crucial DIMM 16GB

    Western Digital WD Blue SN570

    Seagate IronWolf 8TB/WD Red 8TB

    AeroCool CS-102

  • standard_init_linux.go:211: exec user process caused "exec format error"

    This means, that you chose the wrong image for your architecture. You are probably trying to run a x86 docker on your pi. You have to check if there is an ARM version of image available.


    Edit: try the image by linuxserver

  • Absolutely correct Morlan the syncthing/syncthing pull was incorrect for raspberry pi. the linuxserver/syncthing pull was the trick. so, i found this set of instructions which is great for people in my shoes as beginners trying to get syncthing onto Pi. Its very similar to the linuxsserver github for syncthing.


    However, i still am very stuck with using a new SSD drive connected via USB3.0 as the source of the sync for the pi. I have successfully synced data from a mac computer to the raspberry pi internal MICRO SD. I cannot configure the access structure correctly to get to the USB3.0 SSD drive to be the endpoint for the syncthing data. I am having the same issue with Next cloud using the same external drives as the data storage. This has happened through multiple installs of systems, so, i am reasonably certain its not the drive but my setup.


    This new SSD drive was brand new yesterday, it has been formatted a number of times while i played around with choice of file system for my usage. It stands now with ext4 formatted using OMV with 4 main directories example (FolderA, FolderB, FolderC, FolderD) and further directories and files in them.


    fahrer17 is there more info or detail on the binding solution you found. Does my binding structure in the attached inspection look correct per your example?

    e.g.

    /srv/dev-disk-by-label-Daten/Daten/me/folder_x -> data/me

    /srv/dev-disk-by-label-Daten/Daten/my_wife/folder_y -> data/my_wife

    Thanks all, for your your input do far.

  • Sorry, your txt doesn't tell me a lot but maybe this can help you:


    My volumes look like this:

    Host/volumePath in container
    /srv/dev-disk-by-label-Daten/Daten/AppData/syncthing/var/syncthing
    /srv/dev-disk-by-label-Daten/Daten/me/my_stuff/data/me
    /srv/dev-disk-by-label-Daten/Daten/my_wife/her_stuff/data/my_wife


    If I look into the container's terminal the permissions are like this


    /data # ls -la

    total 16

    drwxr-xr-x 4 root root 4096 May 4 19:48 .

    drwxr-xr-x 1 root root 4096 May 4 19:48 ..

    drwxrwsr-x 3 1000 users 4096 May 4 13:34 my_wife

    drwxrwsr-x 19 1000 users 4096 May 6 21:10 me

    OMV6.x

    AMD Ryzen 5 5600G

    ASRock B550M Pro4

    Crucial DIMM 16GB

    Western Digital WD Blue SN570

    Seagate IronWolf 8TB/WD Red 8TB

    AeroCool CS-102

  • After a couple of days I discovered there were problems during synchronizing my wife's files (belonging to user my_wife). Whenever a file was synced from her Win10 machine to her OMV5 folder the owner was changed from my_wife to me so that she could not change them any more. I don't know much about the concept but I'm pretty sure this was caused by Syncthing running with PUID me and not being able to decide between different owners.


    For example:

    My wife creates a file on OMV so this is owned by user my_wife and she can modify it as she wants. This file is now synced to the Win machine and she can modify it again. Now this file is synced back to OMV and while this the owner is changed so she can access and change but not save it back.


    chown'ing folders+files to her was no solution because with this Syncthing (running with my PUID) had no permission for her stuff any more.


    After reading, guessing and trying a lot with Linux permissions and Syncthing manuals I ended up starting a second Syncthing container running with her PUID for her stuff only (take care about the ports and change them to something else but :8384!).


    Now everything's running fine.


    But please let me know if you know a simpler way :)

    OMV6.x

    AMD Ryzen 5 5600G

    ASRock B550M Pro4

    Crucial DIMM 16GB

    Western Digital WD Blue SN570

    Seagate IronWolf 8TB/WD Red 8TB

    AeroCool CS-102

  • Good day to @ll

    I am not able to configure the container with multiple disks on my OMV.

    It never lets me write outside of / config and I honestly don't know what I'm doing wrong.

    My configuration is the following:

    ---

    version: "2.1"

    services:

    syncthing:

    image: ghcr.io/linuxserver/syncthing

    container_name: syncthing

    hostname: syncthing #optional

    environment:

    - PUID=1000

    - PGID=100

    - TZ=Europe/

    volumes:

    - /srv/dev-disk-by-label-Raid1/Programas/syncthing/config:/config

    - /srv/dev-disk-by-label-2T/Media/Fotos:/Fotos

    - /srv/dev-disk-by-label-1T/Musica:/Musica

    ports:

    - 8384:8384

    - 22000:22000

    - 21027:21027/udp

    restart: unless-stopped


    Health for @ll

  • Sounds to me like something's wrong with your files' and paths' ownership.

    Is the your user allowed to access the paths you want to write to?


    Sorry, I'm a bit out of practice. I set up my system and forgot about it since it's running since. Hmm, thinking about this I maybe should check for updates...

    OMV6.x

    AMD Ryzen 5 5600G

    ASRock B550M Pro4

    Crucial DIMM 16GB

    Western Digital WD Blue SN570

    Seagate IronWolf 8TB/WD Red 8TB

    AeroCool CS-102

  • Good afternoon.

    If it is correct my OMV user has all the permissions in order. Writing, reading and execution, in the folders that I want to synchronize. It is something that I have taken into account after multiple readings, to be able to configure the portainer.

    It was much easier for me with docker and the Techno Dad Life video tutorial. I do not understand that I am doing wrong since I even copied the previous configuration.

    A little goat for this

  • Good afternoon.

    If it is correct my OMV user has all the permissions in order. Writing, reading and execution, in the folders that I want to synchronize. It is something that I have taken into account after multiple readings, to be able to configure the portainer.

    It was much easier for me with docker and the Techno Dad Life video tutorial. I do not understand that I am doing wrong since I even copied the previous configuration.

    A little goat for this

    Ok, I will try to check your settings with mine but first I have to remember my Portainer password - the one I've written down doesn't seem to be the right one... :rolleyes:


    But remember: I'm no pro and I'm glad I managed to start my container stuff.

    OMV6.x

    AMD Ryzen 5 5600G

    ASRock B550M Pro4

    Crucial DIMM 16GB

    Western Digital WD Blue SN570

    Seagate IronWolf 8TB/WD Red 8TB

    AeroCool CS-102

  • ...self-taught in this world, as in life.:)

    So am I :)


    Ok, I remembered my password - thank god :)

    Now I "only" have to remember what and why did I do what I did. I'm going to examine my setup, check permission etc. and will come back.

    OMV6.x

    AMD Ryzen 5 5600G

    ASRock B550M Pro4

    Crucial DIMM 16GB

    Western Digital WD Blue SN570

    Seagate IronWolf 8TB/WD Red 8TB

    AeroCool CS-102

  • What exactly is your system setup? How many drives, what to sync from and where to etc.

    I had the idea of recreating it in Virtualbox, maybe my Docker setup is successful.


    Sorry, I don't find a mistake in your config (well, TIMEZONE is missing the city - no idea if this is important though). Again, I think it has something to do with permissions. I had quite trouble syncing my wife's stuff with my user and her permissions.

    OMV6.x

    AMD Ryzen 5 5600G

    ASRock B550M Pro4

    Crucial DIMM 16GB

    Western Digital WD Blue SN570

    Seagate IronWolf 8TB/WD Red 8TB

    AeroCool CS-102

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!