In this blog, I’ll guide you through setting up file syncing between Linux and Android using Syncthing. You can also use this pseudo-guide to set up syncing between other types of machines.
Syncthing is an open-source decentralized peer-to-peer file synchronization app built using Go lang, with privacy, security, and user control in mind. Its decentralized approach removes the need for relying on any cloud storage.
Syncthing can operate both on LAN and over the internet. It also comes with very easy-to-use, simple (yet powerful) interface and is supported across various platforms. Syncthing is also available as an app on Android. However, it’s worth noting that iOS is not supported (reason here).
Here is its FAQ that answers many questions that you may have.
When there is a direct connection between syncing devices, like lets say within a LAN, Syncthing simply connects each device with the other and synchronizes files. When there’s no direct connection, like lets say over the internet, it uses ‘Relay servers’ to bounce traffic between sync devices. Therefore, transfer rates are much lower compared to LAN setting. There are many public relay servers available and maintained by the community. You can also host your own private rely servers too.
So, Syncthing sometimes relies on ‘some server’ to sync. What about privacy, you ask? Well, Syncthing uses end-to-end encryption to securely transfer data. Fear not, your data is protected through the power of crytography, and it’s open source you can vet the source code for leaks, unlike commercial closed-source solutions.
Each device is identified using Syncthing-specific ‘Device IDs,’ which are unique to each device. While these IDs are unique, they are not sensitive. Only in “very” limited scenarios can a device’s IP be reverse-engineered using its ID (when Global discovery is enabled), but it can’t be used to connect to your devices or peek over the curtain.
Syncthing, similar to many torrenting protocols, divides the files into many chunks, and each chunk is synced between devices at a time. So, like torrents, when you have many devices syncing the same files, transfer rates tend to be faster with load sharing.
Debian-based distributions typically include Syncthing in their apt repositories. To install, simply run sudo apt install syncthing -y. If it’s not available in apt, follow the instructions provided here
Syncthing is available both on Google Play Store and on F-Droid. Install it from one of these stores.
Prominent distros like Arch and Fedora include Syncthing in their package managers, providing an easy installation. In case it’s not available, you can download the binary from Syncthing’s Site, extract it, and manually add it to your PATH.
Download the installer from Syncthing’s Site and install it like other apps. Grant necessary permissions when prompted, especially firewall permissions.
After installation, on Debian/Ubuntu distros, Syncthing usually doesn’t get added to autostart by default, so you’d have to do it manually. On Windows, as far as I know, the installer takes care of it.
For Android, check the Syncthing app’s optimizations and ensure it has the necessary permissions to autostart.
I’ve used Linux Mint for this setup, but these steps shouldn’t be much different on other Debian distros like Ubuntu.
.desktop file and add it manually. Use the below command to find itfind /usr/share/applications -name syncthing-start.desktop
syncthing.On Linux
http://127.0.0.1:8384/. You should see something similar to the screenshot below:

On Android
Also, make sure to turn off battery optimization for Syncthing. As it’s a file syncing app, it requires full permission to run in the background. Don’t worry; resource usage is minimal unless you’re constantly syncing things.

+, enter the Device ID you copied, and give it a suitable device name.On Linux



In the above screenshots, Linux and Windows represent the labels that I have assigned, not the
respective Operating systems
+Add Folder button.
Folder LabelFolder IDFolder Path, for example, /home/manjunath/workspace/test/sync-folder-in-linux.
Sharing tab, Enable the device you want to sync with. In our case, it should be the Android’s device label that we gave during pairing process and Click Save
On Android
+ button
Folder LabelFolder ID from Linux settings that was noted down earlier (In my case its dr7zy-nauf7)Linux) and click on the ✓ button as shown below
Thats it! you shoud now have sync-folder-in-linux in Linux machine synced with
sync-folder-in-android on Android.
User section and a Strong Password in Password section.