[Support] Linuxserver.io - Syncthing


Recommended Posts

On 5/11/2018 at 7:05 AM, NewKrewLinux said:

I managed to get this to sync with my devices perfectly over LAN using the info I provided below.

 

But I still have one problem. I am unable to directly add a file to a folder via Windows Explorer on my SMB share. That is, I cannot drag and drop a photo into the
//Server/Storage/sync/My_Folder directory to be sent to my other devices. It says "permission denied" in Windows. How do I fix this?

 

 

_________________________________________________________

 

 

Just letting you guys know. I had to swap my interface from "Bridge" to "br0" for this to work properly. Otherwise I also got the issue with it not connecting ever again after 15 mins. Also disabled the relay on all of my devices to first properly work out the LAN issues I was having, because if after a certain time a LAN connection can't be made it'll just move to using a relay and it's sort of hard to work out if it's using the relay (gotta scour the log, or look at the slow speed etc). In addition to that I added the port "22010" to the port mappings before installing the Docker app. Then I changed the listen address in the app to "TCP 22010" because having it set as "default" causes a "connected to myself, not supposed to happen" error every 60 seconds.

 

Then I set the listen address on each of my devices as follows TCP 22011, 22012 etc. and port forwarded these over my router. Not sure if I had to do these 2 steps but I did it anyway.

 

After this I re-enabled the relay so my files can sync when I am away from home. Over LAN I'm able to get just up to 50MB/s transfer speeds (Smartphone is the bottleneck) which is much, much higher than Nextcloud which used to only get me about 10MB/s. Probably due to less overhead and not having to write to a DB etc.

 

Hope this helps someone and thanks for providing this app.

Regarding the 'permission denied' issue. The resolution on this side kicked in after running the /Tools/DockerSafeNewPerms which corrected the directories and their permissions.

 

(update)

Buuuuut. It does seem that anything new/created such as syncing a new folder will inherit the original permissions upon creation and the 'permission denied' kicks in again.

Edited by DirtyHippy
update
Link to comment

I'm having this same permissions issue.  

 

I just ran DockerSafeNewPerms which fixed all the files created by syncthing, however, I can't modify new files created by syncthing.  Can I somehow pass to the docker to create the files as 777 or some such thing?  

 

Worst off maybe schedule DockerSafeNewPerms to run daily at night... not an ideal solution.  

 

FYI my speed seems fine.  I had to turn off everything but local discovery, and changed my server's ip from dynamic to it's actual ip.  Things go much faster now, although still slower than transferring files in windows explorer.

Link to comment
9 hours ago, Mysticle31 said:

I'm having this same permissions issue.  

 

I just ran DockerSafeNewPerms which fixed all the files created by syncthing, however, I can't modify new files created by syncthing.  Can I somehow pass to the docker to create the files as 777 or some such thing?  

 

Worst off maybe schedule DockerSafeNewPerms to run daily at night... not an ideal solution.  

 

FYI my speed seems fine.  I had to turn off everything but local discovery, and changed my server's ip from dynamic to it's actual ip.  Things go much faster now, although still slower than transferring files in windows explorer.

Still digging around and since Resilio operates in a similar fashion and we have a thread based on that. There was a mention (thanks to SelfSD) suggesting a variable of UMASK_SET with initially a 0777 but others utilized a 0000 with a good result. Check up on the following responses after that initial post, seemed to work well for them.

 

  • Like 1
Link to comment
  • 1 month later...

This is a syncthing issue, not a docker issue, but thought I'd ask here in case someone has also had this issue:

 

I've just installed Syncthing on 2 unRAID servers. The use-case here is one of the servers is a snapshot backup of the main server.

So My main server (sender) sends all data to the other (receiver) unraid server, with versioning enabled. 

 

On the sender server, i've given syncthing readonly access to the whole array /sync/ -> /mnt/user/

and on the receiver server, I've created a share, and given syncthing read/write access /sync/ -> /mnt/user/syncthing/

 

I've created a folder in the GUI as follows:

source: /sync/MediaServer/Home Videos

send only, no versioning at the moment.

Share with receiver server.

 

This fails because the SOURCE is read-only and syncthing attempts to write to the source folder

I'm not going to give syncthing read/write access to all my data. It should only need read access to read and send the data to the other server.

 

Anyone know how to do this?

 

Syncthing Error message:

Quote

2018-12-26 12:50:14: Saving .stignore: open /sync/MediaServer/Home Videos/.syncthing.tmp.105273867: read-only file system

2018-12-26 12:50:14: Failed to create folder marker: mkdir /sync/MediaServer/Home Videos/.stfolder: read-only file system

2018-12-26 12:50:14: Error on folder "MediaServer / Home Videos" (q4esr-ishsp): folder marker missing

2018-12-26 13:11:35: Saving .stignore: open /sync/MediaServer/Home Videos/.syncthing.tmp.669697141: read-only file system

 OK

 

Edited by jj_uk
Link to comment
  • 3 weeks later...

Having a problem getting Syncthing connected to remote server.

 

I'm having problems getting Syncthing to connect to an instance I have running on a seed box.  I've used Syncthing in the past, but this is my first experience in using it as a docker under Unraid.  The gui is showing the listeners as 0/1 (in red) with the following message " tcp://10.0.30.xxx:22000: listen 10.0.30.xxx:22000: bind: cannot assign requested address"

 

I've got 22000 assigned in the docker.  I've tried port forwarding from my router to my ip address of Unraid.  I'm not certain what I'm missing at this point.

I'm running Unraid 6.6.6 in Vlan 30 of my managed switch

 

Anyone have any ideas?

 

Never mind.  I had to completely uninstall the docker and my user settings and then re-install everything.  That fixed the problem.

Edited by Moose_Flunky
Link to comment
  • 2 weeks later...

So I've just got Syncthing installed for the first time. Not entirely sure I've gotten it configured correctly; but I was in fact able to transfer some files to the desired folder on Unraid from a remote machine. So that's something... 

 

I recently followed Spaceinvader's video on LetsEncrypt+NGINX to get Nextcloud accessible through the reverse proxy. I'd like to be able to do the same with Syncthing (i.e. https://syncthing.mydomain.com presents me with the syncthing GUI).

Is this possible? Like Nextcloud, does Syncthing require additional configuration (either in the Syncthing appdata files or the LetsEncrypt appdata files)?

 

In addition, not sure if I've got Syncthing configured securely. The GUI listen address is currently 127.0.0.1:8384. Do I need to change this if I want Syncthing to be accessible through a reverse proxy? What about the GUI authentication and "Use HTTPS for GUI" options?

 

Any and all help is much appreciated! I'm currently in the unenviable position of having a little knowledge (i.e. just enough to break things)...

 

P.S. Under "GUI Settings", I see there is a message "The GUI address is overridden by startup options. Changes here will not take effect while the override is in place." Not sure what this means exactly?

Edited by rragu
Link to comment
  • 2 weeks later...

Hello

 

  I m having a problem or multiple ones to be honest. So I ll try to give out as much information as I can (I tried first to read some othr posts / documentations before posting but it seems I can t find a way to solve my problem - probably due to lack of knowledge). So here it goes

 

   I installed syncthing and during the installation form I filled in 

the host path 2 with the  path /mnt/user/ (it was empty and beneath it mentions greyed out Container Path: /sync)

AppdataConfig Path-> /mnt/user/appdata/syncthing (the default one)

Should I have entered different paths?

Also shouldn't Krusader see the Sync installation path somewhere. I can't find it in none of the above paths I entered during installation

 

 I started syncthing and first thing to do is  set the already created folder Music Data Base which

Krusader can see it  in  this directory ->/media/Music Data Base

in unraid shares tab it uses this path -> /mnt/user/Music Data Base

Why 2 different paths for the same directory? Shouldnt all programs see it at the same place?

So in the share folder inside syncthing i typed /media/Music Data Base and during save got an error message

 

<<2019-02-08 12:03:55: Failed to create folder root directory mkdir /mnt/user: permission denied

2019-02-08 12:03:55: Error on folder "Muz" (s3xqe-civks): folder path missing>>

 

After that I tried /mnt/user/Music Data Base but with the same error message. Ok probably its straightforward what to do due to the message but still i can't figure out what to do

 

Any help would be highly appreciated!!!

 

 

Edited by ieronymous
Link to comment
46 minutes ago, ieronymous said:

Hello

 

  I m having a problem or multiple ones to be honest. So I ll try to give out as much information as I can (I tried first to read some othr posts / documentations before posting but it seems I can t find a way to solve my problem - probably due to lack of knowledge). So here it goes

 

   I installed syncthing and during the installation form I filled in 

the host path 2 with the  path /mnt/user/ (it was empty and beneath it mentions greyed out Container Path: /sync)

AppdataConfig Path-> /mnt/user/appdata/syncthing (the default one)

Should I have entered different paths?

Also shouldn't Krusader see the Sync installation path somewhere. I can't find it in none of the above paths I entered during installation

 

 I started syncthing and first thing to do is  set the already created folder Music Data Base which

Krusader can see it  in  this directory ->/media/Music Data Base

in unraid shares tab it uses this path -> /mnt/user/Music Data Base

Why 2 different paths for the same directory? Shouldnt all programs see it at the same place?

So in the share folder inside syncthing i typed /media/Music Data Base and during save got an error message

 

<<2019-02-08 12:03:55: Failed to create folder root directory mkdir /mnt/user: permission denied

2019-02-08 12:03:55: Error on folder "Muz" (s3xqe-civks): folder path missing>>

 

After that I tried /mnt/user/Music Data Base but with the same error message. Ok probably its straightforward what to do due to the message but still i can't figure out what to do

 

Any hep would be highly appreciated!!!

 

 

 

You seem to not understand how docker and volume mappings works. Take a look in the Docker FAQ for a better understanding.

Your docker containers will only see the container path and not the host path.

So Krusader will not see syncthings /sync folder. For Krusader to see what syncthing sees in the /sync folder, you need to map the same host path to Krusader (/mnt/user/). Notice that the folder you see in Krusader will be whatever you set it to in the container path.

Link to comment
14 minutes ago, saarg said:

 

You seem to not understand how docker and volume mappings works. Take a look in the Docker FAQ for a better understanding.

Your docker containers will only see the container path and not the host path.

So Krusader will not see syncthings /sync folder. For Krusader to see what syncthing sees in the /sync folder, you need to map the same host path to Krusader (/mnt/user/). Notice that the folder you see in Krusader will be whatever you set it to in the container path.

   Yes it seems this way but before posted as already mentioned was reading about docker images volumes and containers. All that are theoretical  and in practice its always another thing. Probably with what you ve said in your mind it's like giving me the solution. is there a do this and you re ok kind of answer, because feels like  I m asking in a forum for cars  I have a problem with the suspension and getting an answer like read the car manual and you ll find the answer. I don t want to be offensive in any way but that s how it feels.

 

   I dont thing that I m so different as a person than all the other world. When ti comes to pc h/w, networks, cabling, installation, racks ...etc and  I am asked all kind of info/troubleshooting I just give a straight (and most times a thorough explain even though the one) answer do this .....because that..... Is it so difficult to get once that kind of explanation even once. i am  not the type of guy that  asks in forums, on the contrary, in my life is the one who got tired of giving them, but this project i have with unraid has a time limit and I m already there and haven't figure out yet. So an answer like read the bible and you ll find your faith won t really help in this situation.

 

Thank you though for trying

 

Link to comment
  • 3 months later...

Hi,

 

I am using Syncthing to sync my main unraid server to my backup system. Works great.

 

I recently made some networking changes to my system and where my unraid servers (and with that dockers) used to be connected with 1gig utp, the situation is now as follows:

 

Main server is connected with 10G SFP+ to my internal network, running on 192.168.1.0/24

Backup server is connected with 1GB SFP+ to my internal network, running on 192.168.1.0/24

 

The main server and backup server have a direct connection with 10G SFP+, these have their own network: 10.10.10.0/24 (primary .1, secundary .2)

 

The two syncthing dockers have ip addresses in the 192.168.1.0/24

 

What I now would like to do is have both syncthing dockers communicate over the 10G private network between the two servers while I can still reach the servers on their 192.168.1.0/24 address.

 

The interfaces all work, if I give the dockers a 10.10.10.0/24 address then they sync fine but the webgui is not reachable anymore..

 

Any idea how I could do this within a docker ? In the end I could use two VM's but I am pretty happy with the docker setup and would like to  keep that..

Link to comment
  • 2 months later...

FWIW,

 

 add me to the list of users who have given up w/ this app.  Relatively OOTB Unraid install w/ an asus board, 4 WD red drives & samsung nvme for cache.  It likely has to do w/ permissions (I've configured it w/ windows AD authentication), but I just don't feel like fighting with it any more.  Maybe it has to do w/ the other syncthing box being a Synology.  None of the logs made it clear what was going wrong, but it'd just sit at 0% syc'd between the two and, eventually, show it as disconnected.  I'm guessing a few more try/catch blocks within the application and maybe a test writing file data to a target folder could go a long way toward making it more user friendly.

 

This is my first time w/ Unraid, I've only used docker w/ a PiHole machine & I'm a linux newbie.  Anyway, I got rsync working between them & I'll setup some cron jobs to sync the files instead. 

 

 

Link to comment

I am trying to get syncthing to sync to my google drive folder without success. I have mounted a google drive folder with:

mkdir -p /mnt/user/google_syncfolder
rclone mount --buffer-size 256M --fast-list --allow-other gdrive:Dump/ /mnt/user/google_syncfolder &

I can see the mounted folder and all google drive files and can also copy from/to my google drive with the use of a file-browser on unraid.

I have also added the same directory to the path in the syncthing container. But when trying to sync from a remote syncthing-server to the unraid server it just sits at 0% and then throws a sync error.

 

If I look on my google drive I can see that syncthing has created a zero-byte .tmp file for every file I am trying to sync

 

If I change the path in the syncthing container to a regular folder on the unraid server it works without problem. Can anyone explain to me how to solve this?

Edited by Cliff
Link to comment
  • 4 weeks later...

anyone else having trouble with the syncthing docker and updating?  Mine keeps telling me there is an update, but there is not... I can update and then click on check for updates, it thinks there is another one... My version is 1.2.2 which i believe is up to date.

 

My other dockers are not doing this, just syncthing.

Edited by Abzstrak
Link to comment
2 minutes ago, Abzstrak said:

anyone else having trouble with the syncthing docker and updating?  Mine keeps telling me there is an update, but there is not... I can update and then click on check for updates, it thinks there is another one... My version is 1.2.2 which i believe is up to date.

 

My other dockers are not doing this, just syncthing.

 

Link to comment
  • 1 month later...
3 hours ago, RichardU said:

Simple question about Folder Path ...

In the Syncthing config, I set Host Path 2 to: /mnt/user/

When I create a folder to share, I set the folder path to: /config/Sync

If I understand correctly, that should be the same as /mnt/user/Sync

Do I have that right? 

 

Cheers, Richard

 

You have it wrong.

The default path inside the container is /sync. So it you added /mnt/user as the host path, /sync inside syncthing is /mnt/user on the host.

 

You can see the folder path inside the container under where you choose the host path. If it's not there, enable advanced view and click the Edit button for that volume mount.

  • Like 1
Link to comment
7 hours ago, saarg said:

 

You have it wrong.

The default path inside the container is /sync. So it you added /mnt/user as the host path, /sync inside syncthing is /mnt/user on the host.

 

You can see the folder path inside the container under where you choose the host path. If it's not there, enable advanced view and click the Edit button for that volume mount.

Then what's all this talk about config ... ? Just kidding. It makes perfect sense that /sync = /mnt/user. What threw me off was when you add a folder, it automatically fills in config, and even offers a ~ shortcut for config. Seems like at a minimum they could at least mention /sync there. Should I suggest that in a PR? Thanks for responding.

  • Like 1
Link to comment
15 hours ago, RichardU said:

Then what's all this talk about config ... ? Just kidding. It makes perfect sense that /sync = /mnt/user. What threw me off was when you add a folder, it automatically fills in config, and even offers a ~ shortcut for config. Seems like at a minimum they could at least mention /sync there. Should I suggest that in a PR? Thanks for responding.

 

I have never used synching, so have no idea how it's working.

If you want that behavior changed, go ahead and talk to syncthing about it.

Link to comment
  • 1 month later...

Hi all,

 

I'm having an issue where everything connects, but there seems to be an issue of permissions. I have the log bellow. I have tried a lot of other folders and have the same issue. Private or not.

 

image.thumb.png.25c6066ec60d29fb034254f51e1b2607.png

 

2019-12-15 20:55:04 My ID: 4MC2NS7-CABPHJY-ESQRT4R-ZIEMLZJ-FJJLSCE-FFFEZKW-JI5B75J-U75NIQV
2019-12-15 20:55:05 Single thread SHA256 performance is 2029 MB/s using minio/sha256-simd (476 MB/s using crypto/sha256).
2019-12-15 20:55:05 Hashing performance is 1206.97 MB/s
2019-12-15 20:55:05 Failed to create folder marker: mkdir /media/.stfolder: permission denied
2019-12-15 20:55:05 Ready to synchronize "TV" (TV) (receiveonly)
2019-12-15 20:55:05 Ready to synchronize "Default Folder" (default) (sendreceive)
2019-12-15 20:55:05 Overall send rate is unlimited, receive rate is unlimited
2019-12-15 20:55:05 Error on folder "TV" (TV): folder marker missing
2019-12-15 20:55:05 Using discovery server https://discovery.syncthing.net/v2/?noannounce&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
2019-12-15 20:55:05 Using discovery server https://discovery-v4.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
2019-12-15 20:55:05 ...
2019-12-15 20:55:05 Using discovery server https://discovery-v6.syncthing.net/v2/?nolookup&id=LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW
2019-12-15 20:55:05 Relay listener (dynamic+https://relays.syncthing.net/endpoint) starting
2019-12-15 20:55:05 QUIC listener ([::]:22000) starting
2019-12-15 20:55:05 TCP listener ([::]:22000) starting
2019-12-15 20:55:05 Failed initial scan of receiveonly folder "TV" (TV)
2019-12-15 20:55:05 Completed initial scan of sendreceive folder "Default Folder" (default)
2019-12-15 20:55:05 GUI and API listening on [::]:8384
2019-12-15 20:55:05 Access the GUI via the following URL: https://127.0.0.1:8384/
2019-12-15 20:55:05 My name is "AulakhHome"
2019-12-15 20:55:05 Device ORZ7T3U-4IU3ZC7-YV2PGAO-PPND2OE-QAOFBHY-YRJ3HIM-MDWMPYG-JLI5JA6 is "seedit4me" at [dynamic]
2019-12-15 20:55:07 Established secure connection to ORZ7T3U-4IU3ZC7-YV2PGAO-PPND2OE-QAOFBHY-YRJ3HIM-MDWMPYG-JLI5JA6 at [::]:22000-94.130.167.213:22000/quic-client/TLS1.3-TLS_AES_128_GCM_SHA256
2019-12-15 20:55:07 Device ORZ7T3U-4IU3ZC7-YV2PGAO-PPND2OE-QAOFBHY-YRJ3HIM-MDWMPYG-JLI5JA6 client is "syncthing v1.3.2" named "ct1336" at [::]:22000-94.130.167.213:22000/quic-client/TLS1.3-TLS_AES_128_GCM_SHA256
2019-12-15 20:55:07 Connection to ORZ7T3U-4IU3ZC7-YV2PGAO-PPND2OE-QAOFBHY-YRJ3HIM-MDWMPYG-JLI5JA6 at [::]:22000-94.130.167.213:22000/quic-client/TLS1.3-TLS_AES_128_GCM_SHA256 closed: reading length: NO_ERROR
2019-12-15 20:55:24 quic://0.0.0.0:22000 detected NAT type: Port restricted NAT
2019-12-15 20:55:24 quic://0.0.0.0:22000 resolved external address quic://104.152.166.232:22000 (via stun.syncthing.net:3478)
2019-12-15 20:55:26 Detected 1 NAT service
2019-12-15 20:55:43 Joined relay relay://199.195.251.28:22067
2019-12-15 20:56:05 Folder "TV" (TV) isn't making sync progress - retrying in 1m0.00046035s.
2019-12-15 20:56:06 Established secure connection to ORZ7T3U-4IU3ZC7-YV2PGAO-PPND2OE-QAOFBHY-YRJ3HIM-MDWMPYG-JLI5JA6 at [::]:22000-94.130.167.213:22000/quic-client/TLS1.3-TLS_AES_128_GCM_SHA256
2019-12-15 20:56:06 Device ORZ7T3U-4IU3ZC7-YV2PGAO-PPND2OE-QAOFBHY-YRJ3HIM-MDWMPYG-JLI5JA6 client is "syncthing v1.3.2" named "ct1336" at [::]:22000-94.130.167.213:22000/quic-client/TLS1.3-TLS_AES_128_GCM_SHA256
2019-12-15 20:56:06 Folder "TV" (TV) isn't making sync progress - retrying in 2m0.000103581s.
2019-12-15 20:58:06 Folder "TV" (TV) isn't making sync progress - retrying in 4m0.000921692s.
2019-12-15 21:02:06 Folder "TV" (TV) isn't making sync progress - retrying in 8m0.000158232s.
2019-12-15 21:10:06 Folder "TV" (TV) isn't making sync progress - retrying in 16m0.000181065s.
2019-12-15 21:25:07 Sent usage report (version 3)
2019-12-15 21:26:06 Folder "TV" (TV) isn't making sync progress - retrying in 32m0.000144798s.
2019-12-15 21:58:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.000166848s.
2019-12-15 23:02:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.000164283s.
2019-12-16 00:06:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.000161468s.
2019-12-16 01:10:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.000153674s.
2019-12-16 02:14:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.000180484s.
2019-12-16 03:18:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.000157131s.
2019-12-16 04:22:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.006771204s.
2019-12-16 05:26:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.000190532s.
2019-12-16 06:30:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.000158222s.
2019-12-16 07:34:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.000456313s.
2019-12-16 08:38:06 Folder "TV" (TV) isn't making sync progress - retrying in 1h4m0.000148324s.
 

So I have the TV set as private and only two users have access, I have tried to set the PUID to one of these users, but it seems to still set the user as 'root'.

 

Below are my settings in Syncthing. I have tried to add the TV folder here, but the docker fails to install.

 

image.thumb.png.f4d80003713a718fc8f490e23a18356d.png

 

Would love your thoughts. Im also very new to unraid and linux. So far learning lots. Thanks in advance!

Link to comment

Thank you for the reply. I had it at 99 and it would still show the same issue. I have been playing around with it to see if it would change anything. I've read that the user syncthing is on doesn't have access to where i want the files transferred to. I'm wondering if there a way to give access to allow it read write access? 

 

Where can I add the permission mask? you know what it should be?

Edited by Gursh
Link to comment

Hmmm... I don't know, sorry... your config looks about like mine, and mine has been working fine.

 

I have fits with permissions on unRaid for some reason - I wish it did things a bit more "standard" (at least as I understand standard), but...

 

Have you tried changing the permissions of your target directory?

 

Make sure all directories are 777 and files are 666, including (in your config) /mnt/user/syncthing itself?

 

And the ownership should match the 99/100 of PUID/PGID.

 

Otherwise, sorry, all I know to check.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.