binja.xyz

Blog

Index About Blog Photography Contact me

Shared Folders Between Devices With Syncthing

When I first got my own laptop for school, I would often want to move a photo or a text document between it and my PC. At the time, I would just use a thumb drive which worked but was kind of inconvenient. The other method I would use was just uploading the files to Google Drive and downloading them on my other device. That was also okay, but took more steps than I would prefer. After my complete switch to Linux in 2023, I ended up finding a program called Syncthing which was exactly what I was looking for.

It's a program that runs in the background and automatically syncs folders between two or more of your devices over the local network without the need for USB drives or uploading and downloading from a server. You can download it on Windows, MacOS, Linux, Android, and more. I've made a lot of use with this program for syncing wallpapers, notes, presentations, random files, and photos between my laptop and my desktop. The only potential downsides depending on your use case are that the devices need to be on the same network and you can't edit the same file on both devices at the same time. For me, that's exactly what I need. By default and on the off-chance it can't resolve a file conflict, such as a file being edited differently on both devices before they can sync, it will separate the two versions and let you manage it yourself.

How to set up Syncthing

After getting Syncthing installed on your devices, setting it up to run on boot (if you want to/need that), and running it, it should automatically open the browser to 'localhost:8384' (if it doesn't, make sure it's actually running and try to type that in without quotations). This is the dashboard you can use to add devices and set up folders. There is a lot of configuration you can do, but the default settings are probably fine for you.

By default, there should be a single unshared folder under the folders section. Feel free to delete that if you want to set up your own folders as I have. Once you have Syncthing set up and running on both devices, click the '+Add Remote Device' button in the bottom right. If the devices are on the same network, Syncthing should detect that and ask you if you want to add it, but if it doesn't, you can try manually adding the ID. Do the same on the other device and they should be connected.

Then, click on the name of the folder you want to sync, go to the 'Sharing' tab, and check the box for the device you want to sync that folder with. Click save and check the dashboard on the other device. There should be a popup asking you if you want to add the folder. Click add, set the label and path if you want it to be different on that device, and save.

If you were actually doing this and everything worked, then Syncthing will synchronize the folder you set up between your devices devices, copying the latest files and changes over the network to the other.

Click me to return