Thanks!

This is just a review really.

I realise NextCloud is a different tool for a somewhat different purpose but I just switched from it to Syncthing and here’s why…

I was using NextCloud for the last year or so to sync my laptop and desktop. I had a cheap VPS running NextCloud as I like not having to have the two devices on at the same time. I can do something on my desktop and pick it up next time I use my laptop whether my desktop is on or not. It’s just convenient (and why I’d chosen NextCloud initially), and having a copy off site is an added bonus (though obviously I have a proper backup of my stuff and I’m not relying on NextCloud or Syncthing as a backup!)

Every 2 days (often more regularly) it would get conflicts even though I never use my desktop and laptop at the same time. Every single time I changed a branch in a git repository, NextClould would complain about conflicts in various files in the .git directory. I guess NextCloud couldn’t keep up with how quickly a large set of small files changed? At first I would manually try to fix the issue. Shortly after, I ignored the errors and just let it sync the other files when it could. I lost count of how many times I had to remove a folder from the NextCloud client and re-add it…

It also took forever to sync. I could see how it worked. It checked every single file against every single file on the server, one at a time, requiring a new HTTP request for each file. Syncing my rather modest 5gb of files would take hours because they’re almost all small source code files. Being familiar with git this puzzled me. Why can’t it see what files have changed then send them as a batch!?

A week ago I tried the same thing with Syncthing and it… just works. If I swithc a git repo it syncs it without complaining about conflicts. And it syncs quickly, it basically maxes out my internet connection.

I’m sold. While NextCloud was a frustrating experience, Syncthing just works. Thanks Syncthing for doing it right, being worryingly easy to use and working as intended.

3 Likes

I’m glad you found Syncthing useful and fitting your needs, but I still feel the need to warn you. Syncing git repositories is usually not a good idea, independent of the software you use for that. I can see how you might want to do exactly that in your setup, but if you ever find yourself in a situation of (almost) simultaneously working on the same repository on both of your machines, or in a situation where things didn’t have enough time to sync because of a slow connection before you switch machines, you’re likely to end up in a lot of pain.

2 Likes

Thanks for the warning. Perhaps this is the issue I had with nextcloud.

I want to be able to work on a local repository without committing it upstream (e.g. to github.com or wherever). The problem I was having with nextcloud was the act of checking out a branch (whether I changed any of the files myself or not) would cause a conflict and often stop syncing continuing. This is a pain as switching branches is a very common task for any developer.

This is something that will never happen in my use case. I’m either working on my desktop or my laptop. I just want to be able to pick up from where I left off when I move between devices and there’s going to be at least ~10s between the two (usually a few hours). Certainly I’ll never save something on my desktop, then save the same file on my laptop before it’s synced as if the time is < 30s I’ll know I’m expecting a sync to occur.

What I usually end up doing is keeping my work-in-progress in a private online repository, pushing and pulling it from my desktops and laptops as I work. Then, when the work is finished, I push it to GitHub or wherever the public repository is hosted.

I mean, setting up something along the lines of gitolite on a cheapest VPS you can find (or a Raspberry PI sitting in your cupboard, as I did) is a piece of cake for someone who did already manage a NextCloud instance, isn’t it? And the flexibility you gain is tremendous.

The only “downside” to this approach is that you get used to committing to WIP branches and force-pushing instead of stashing, but I think that beats the constant risk of messing up the local repo any day of the year.

1 Like