Synchronizing data between computers and mobile devices using Syncthing
Node Network
After you have transmitted the settings to all the nodes involved, the next step is to introduce the devices to one another. The 46-digit individual device ID that was generated from the information in the certificate for each device when it was first launched is used for this purpose; it can be accessed via the Show ID sub-item.
You can transmit this ID either in the form of a text file using a USB flash drive, load it using a smartphone and a barcode scanner (Figure 4), or distribute it by email or various other web services. Then, enter the ID in Syncthing's front end via the Add Device button together with the previously specified device name. Using the Introducer option in the Edit Node dialog, choose whether all nodes that are entered on the distribution system should also be used on the new device.
Using the ID and the unique device name, you can now keep data on your devices in sync and share content with colleagues and friends. You can configure the Syncthing GTK graphical interface in the UI Settings window via the Syncthing icon at the top left. There, you can, among other things, integrate the service into the file manager in Gnome, Cinnamon, or Mate.
Adding More Directories
When it's first started, Syncthing creates the ~/Sync
folder in the home directory of each device by default. It automatically incorporates all files stored here and recursively all contained subdirectories, including their contents, in the data synchronization. However, when larger volumes of data need to be synchronized, you can add further folders with their own settings to the Syncthing configuration.
After clicking Add Folder or Add Shared Folder from the Syncthing GTK menu (Figure 5), enter the folder's unique name in the dialog for Folder ID and then navigate to the target directory. The directory must be set up on all computers, and the ID must be identical. The respective target directory can, however, have a different name on each device.
The Folder Master option stands out among the other settings. If you enable this setting, Syncthing protects the corresponding folder against changes made on other devices. However, Syncthing still transfers changes made on this device to the rest of the network. A file only disappears from other devices once it has been deleted in one of the protected folders.
The Search Interval option (Rescan Interval in current versions of the application) determines how often Syncthing searches for new or changed data. You can, by all means, extend the predefined rest period of 60 seconds on inefficient systems. If necessary, load all directories concerned by clicking Check All (Rescan All) at any time.
Syncthing provides different modes for creating and organizing backups of data managed using Syncthing under the File Versioning item [11]. Depending on your needs, you can either completely forgo backups or use a Simple versioning in which Syncthing keeps a fixed number of copies of deleted or changed files in the hidden directory .stversions
. Even the expiration date for versioned copies can be determined in the Staggered versioning variety. An external command writes the backup copy for external versioning.
If the data for the added folder is on a filesystem with no administrative rights (e.g., FAT), you can make sure that the changes to file permissions fall by the wayside using the Ignore Permissions option. Next, select the Syncthing devices with which this directory will be synchronized in Share With Devices. If necessary, you can exclude subdirectories from synchronization using the menu item Ignore Patterns. After sharing the new folder, you need to confirm the integration of the connected computers (Figure 6).
Android App
The Syncthing Android app (Figure 7) is still in the early stages of development; however, it can already be used in a meaningful way. The app innately enables the folder where the smartphone or tablet camera stores images. As with the desktop counterpart, the app also shares further directories with the Syncthing network as needed. The configuration is analogous to the PC version. Additionally, the app offers the option to become active only when WiFi is available or when the cellphone is charging.
![](/var/linux_magazin/storage/images/issues/2015/180/syncthing/figure-7/658540-1-eng-US/Figure-7_large.png)
The app's power hungriness is one of its greatest weakness. If the mobile phone is set up to search constantly for changes and synchronize new data (Figure 8), Syncthing remains active the whole time, meaning that the smartphone used in the test heated up significantly and the battery life degraded noticeably. It is therefore advisable to launch Syncthing only when it is needed, instead of running the daemon in the background.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.