Just installed Syncthing on my Scale server. It looks like it doesn’t have users but rather folder IDs that are then used to sync devices. One of the cool features of Nextcloud is the ability to share files with other users. Can this be done with Syncthing?
https://forum.syncthing.net/t/sharing-folder-with-others/14024/2
Syncthing is not a public sharing tool, it’s for your own devices. Perhaps you are trying to fit it to a scenario it’s not made for.
Quote from the maintainer/developer.
Which is one of the occasions that a Dev sticks to the original feature list instead of trying to shoehorn in some features which wouldn’t really fit.
I mean you can kinda do it with one way syncs (e.g. read only shares and give a friend the code so they can connect to it).
Syncthing keeps folders in sync between multiple devices, it doesn’t have any concept of users since it’s not designed for that.
You want Nextcloud or similar ‘google drive’ replacement if you want to share individual files and folders with specific users easily.
Personally, I’d really like if it could have different users on its management interface, with their own file shares.
It’s understandable why they don’t bother, but I would like to share my NAS without running several instances.
Well each share can choose which devices it shows up for, so you don’t really need users in that sense. But also if you run it under another user account it will have its own clean profile too.
Then you need NextCloud, not Syncthing.
Run NextCloud on your NAS and you’ll be set.
Hum, no. The last thing I need on the world is a piece of non-working hard to maintain software.
I’d write something before trying Nextcloud again.
Nextcloud works just fine on my system, must be something with the way you set stuff up.
If both people have Syncthing installed, you can do that by sharing a folder between you.
But it is not like cloud services where you can generate a shareable link - Syncthing is mostly designed for syncing files between your own devices real-time.
What are you trying to achieve?
i like this, so many wasted meetings with people that don’t know their head from their ass
man this is getting real popular (kinda like “why not both?” a while ago)
Por que no los dos?
Syncthing is more like P2P tool for syncing files between own private devices rather than being things like torrents.
Syncthing is not a cloud storage or tool for sharing. It can be used like this on a stretch, but it’s a continuous two-way synchronization tool.
I portrait it like this: select a folder on one device, select a folder on second device, Syncthing would keep their content synced as if there were one folder :).
This is in contrast to Nextcloud that needs central location and user, to rsync that is oneshot and not two-way.You got the wrong application. Since other users already mentioned plenty of alternatives this comment is also redundant and can be ignored.
Syncthing is very, very good at syncing, but I get the sense the developers are very specific about keeping to the core objective. There have been other features that would be nice, like have one device sync and archive old/removed files, that many have asked for but rejected. (There is a way, but it’s clunky and sometimes gets out of sync.)
I don’t think a cross-user sync solution would ever come to this app. You’ll have to create a unique folder and “device” for that.
So this is where I’m getting confused. Say I want to share a folder with my wife. We each have a phone: Phone_1 and Phone_2. I need to create two devices (Phone_1 and Phone_2) and 3 folders (my_folder, wife_folder, shared_folder). Phone_1 would sync to my_folder + shared_folder whereas my wifes phone (phone_2) would sync to wife_folder + shared_folder. All shared files would go in shared_folder. Both of us can edit files in the shared_folder?
You create a folder on one device and share it with other device. Both can edit files if you set the folder type as “Send & Receive”. If you edit the same file at the same time you will end up with 2 copies
Its an unlikely event that both would be editing the same file at the same time. I think I’ve achieved this. Been messing with Syncthing today. we each have a “shared” folder on our phones and the server has one too. I selected to share with both devices.
The trick now is when you have a PC with multiple users that want to share that “shared” folder. I need to work that one out … :-)
Here one crucial element that needs to be highlighted is Syncthing is decentralised by design. I mean it is different from a server-client way of thinking. It is very much like how git stores content, if you are familiar with it.
For example, let us say I have 5 devices and there is a folder I want in all my devices kept in sync. Since there is no server, to propagate updates made in one device (let us call it Source Device) to other devices, it has to happen either directly, or indirectly. Here I’m assuming all 5 devices are configured to communicate with each other directly.
Whenever one of the other 4 devices (Device 1) becomes ‘online’ at the same time as of Source Device, the sync will happen. This is the direct way. The indirect one is, let us say after the sync happened between Source Device and Device 1, the Source Device goes ‘offline’, but the Device 1 continues to be ‘online’, now if Device 2 comes online, the change will be propagated from Device 1 to Device 2.
Note that the assumption, one device configired with all other devices is not the case, propagation of change has to take a path that similar to indirect way, even if all the devices are simultaneously online.
This configuration, where each device is configured to communicate with all other, is a pain to maintain, since Syncthing is not designed like a publish-subscribe model. What people usually do is, an always-on device (usually a server) is used as one of the devices that need to be kept in sync. Again, this is not a client server model, but each device is a ‘node’, and the always-on device is also just another node.
As you already experienced, it is very easy to get sync conflicts, if a folder is shared between multiple users, because of this decentralised design. In my opinion Syncthing works best for a single user. My use cases are, syncing my notes between pc and mobile, sync files scanned with the mobile to my pc, etc.
If your case is more focused on multiple users, WebDAV server can be an option. But again it’s not straight forward and may not cover all use cases. Depending on what you are trying to achieve, a tool more suitable might be available. For example, if the aim is collaborative development there is Iroh (Still in early stages of development)
I hope this helps.
I actually do have an always on server and I was planning on using it as a client-server type system. I think that the file sharing option is complicated to implement. I tried to launch syncthing in my wifes environment on the laptop and while I get a new ID, when I register it with the server, it complains saying that there are conflicts with the IDs for the device. I wonder if its getting confused by having two IDs against the same IP
IP should not cause any issues. IDs are just a hash of certificate used by Syncthing. Can you elaborate a little on the current setup? Device, OS, User, etc. Also if possible can you explain your use case? As I mentioned, Syncthing is very specific to what it can do, so it may not be the best solution for your case.
Server is Truenas Scale. Syncthing is running as app. I and wife have it installed on Android phones. We both share a Debian 12 laptop with different logins. We both want to keep respective phone synced with laptop login. We want to have a folder shared on nas where we can exchange files.
Oh forgot to add that the last case that you mentioned, where multiple users sharing a PC, and keeping the folder in sync with all, is not straightforward. This needs another always-on (server like) device.
At least in Windows each user gets a different Syncthing ID. So if you sync the file with an always-on device, the other user can get the update when they come online from that.
That’s right, all it is is an auto-copy program. It doesn’t host a shared folder like NextCloud; it just saves you the clicks (or commands) of copying your newly-changed files to all the places you want a copy to be.
If you edit a file on your machine, and your wife edits her copy, you might even find there to be a conflict. (I don’t use Syncthing so I don’t know how it handles this)
This is correct - Syncthing will notify you of sync conflicts, and will store the conflicting files in a subfolder of the sync job on each device.
Where do you want to sync the phones to? I assume you have a server where you want to keep these, otherwise my_folder is just your phone’s local storage.
With that in mind what you described is a very straightforward synching configuration. You install it on the server, give it access to the three folders, install it on both phones, and configure it to sync:
- Phone1 local_folder to Server my_folder
- Phone1 shared_folder to Server shared_rolder
- Phone2 local_folder to Server wife_folder
- Phone2 shared_folder to Server shared_rolder
Don’t understand why you think you need users for that.
Think of it like this:
- there’s a syncthing share
- you connect any devices you want to that share
- each device uses a local folder to act as that share
- the devices need to know each other
Then, syncthing sorts it all out. You can move a file into the share on phone1, and it’ll show up on phone2. Move it out of that share on phone2, and it disappears from phone1. Same deal for any other device connected to that share.
You can make this all simpler by using the same name for the share and on all folders:
- A share named Kim-n-Max
- A folder named /storage/emulated/0/shares/Kim-n-Max on Max’s phone
- A folder named /storage/Kim-n-Max on Kim’s phone
- A folder named c:\Users\Max\Kim-n-Max on Max’s computer
…all is pretty clear then.
You create a physical folder on device one, and in Syncthing create a sync job (which Syncthing calls a folder) and share it to device two, defining how the share works, and Bob’s your uncle.
From syncthing.net:
Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it’s transmitted over the internet.
Yes
Seafile is a file platform that’s more in line with what you mean. It can do sync but also sharing and collaborative editing.
Mmm, Seafile is is developed by an for-profit organisation. Looks interesting but might stick with nextcloud if I have to move to Seafile. Syncthing seems really robust and simple. I think its just the file sharing bit that I’m missing. Nextcloud is just a beast.
Seafile has a free open source edition, and even their paid enterprise license is free under 3 users
You can easily selfhost Seafile and make a ‘dropbox’ like system with as many users you like, and as large a storage you can handle / afford. Although there is an enterprise version, the community edition provides with many features to make it really a great service. It is mighty fast, and has native clients for many different platforms, in addition to using the Seafile website to acces, upload and download files.
I never hosted Nextcloud, but from what I read, it is a beast with way too many features to fit my use case. Seafile is doing one thing very well.
Syncthing sync files, it is all does.
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:
Fewer Letters More Letters Git Popular version control system, primarily for code IP Internet Protocol NAS Network-Attached Storage
3 acronyms in this thread; the most compressed thread commented on today has 12 acronyms.
[Thread #733 for this sub, first seen 1st May 2024, 19:45] [FAQ] [Full list] [Contact] [Source code]
Yeah, by my understanding this is by design. However, there’s nothing stopping you from running multiple instances for each user account on a computer, assuming you are running Linux and are using the Syncthing CLI. Probably can’t do that on windows though.