+++
title = "Syncthing"
date = 2022-03-10T01:33:59-05:00
draft = true
+++

[Syncthing](https://syncthing.net/) is one of the best file syncing tools in existence,
and I dont say that lightly.
Syncthing is a distributed, peer to peer file syncing service.
This means that it doesnt rely on a central, always online server ran by you or someone else,
but that your devices directly send files between themselves whenever they are online at the same time.

## Syncthing vs Nextcloud

I use both Syncthing and Nextcloud for data storage and syncing,
and while nextcloud has a lot of features and provides a nice web interface,
(I get a lot of use out of Nextcloud's caldav server)
I keep running into problems and limitations with it.
One thing is maintenance. Of my entire homelab,
I easily spend the most time troubleshooting and fixing nextcloud,
sometimes having to reboot the VM multiple times per week.
Additionally, ive ran into a few annoying limitations more than once,
such as the sever crashing if you view a folder with too many files in the web interface or apps.
Nextcloud does a lot of things, and does things very well,
but I would not describe it as a rock solid piece of software.

Syncthing, on the other hand, has no web file manager,
does not do caldav or any of the other million things you can do with nextcloud apps,
and requires setup on both ends to setup a syncing connection.
In short, Syncthing does only one thing.
But boy does it do that thing well.
During the time Ive used Syncthing,
Ive never seen it crash, hang, or corrupt a file.
Even with a device like my phone,
constantly loosing and regaining network access,
files have synced perfectly, every time.

While all my files are stored on my Nextcloud server,
for folders with large number of files,
I only have one device syncing with Nextcloud,
and all other devices use Syncthing to sync with the device connected to Nextcloud.

## Distributed?

With Dropbox or Google drive, files are not sent directly between your devices,
but are sent from one device to the server,
then from the server to other devices.
This also applies to Nextcloud,
the only difference being who runs and controls the server.
With Syncthing, there is no central, authoritative server storing the 'master copy' of your files that other devices download from.
Instead, devices all connect to each other, sending changes made on one device to all other devices they share that file with.
This makes all of your devices into a cluster, where no device has to always be online,
but any devices that happen to be online at the same time synchronize while they can.

## Introducers

If you have a lot of devices, making sure every device is connected to every other device can become a hassle.
Thankfully, Syncthing has the concept of 'introducer' devices.
In short, With an introducer, you only need to connect your devices to the introducer,
and the introducer will make connections between any devices that share the same folder with the introducer.
This is very useful, for example, to enable for a always online storage server,
an architecture that I plan to implement in the future if I ever get around to moving away from Nextcloud.
