Google Drive (GDrive) and other cloud storage alternatives such as Dropbox and Microsoft Ondrive all have the serious drawback of keeping one's information in a third party cloud repository. Privacy and security are generally compromised this way, even when paying for storage (as opposed to having an advertising model, which is worse in many ways).
The challenge is to have an equally robust service that can effectively, and efficiently (regarding resource requirements) sychronize files across multiple devices. Remain on our own devices. And remain open source. In our case we have three different operating systems on four devices to support:
- Android 7.1.2 (Nougat)
- ChromeOS Dev distribution (using Chrome, Android, or Linux apps)
- Debian Linux 9 (stretch) (server and desktop)
Options such as OwnCloud don't work because of the high overhead needed to get the services to work, in terms of memory and processing on a server.
Syncthing for File Synchronization
File synchronization is not backup, though with versioning there is a sort of backup-lite going on.
Syncthing is available from repositories and directly from Github. There are ports and other configuration issues to enable for routing. There is also an Android app, so that is what will be used on Android and ChromeOS.
Install Syncthing on Debian
Add PGP key
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
Add the "stable" channel to your APT sources:
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt update
sudo apt install syncthing
Edit the .xml file
sudo nano ~/.config/syncthing/config.xml
127.0.0.1 address to
0.0.0.0 to enable access from anywhere
Allow Ports on Debian
Had to punch holes through lightsail networking and also add rules for UFW
- https://18.104.22.168:8384/ (server)
- http://127.0.0.1:8384/ (workstation)
Install Syncthing on Android
For Android and ChromeOS devices, install Syncthing for Android from the Play Store.
Configure Syncthing to Turn on Automatically
Need to get synchthing to turn on automatically try this:
Note that this includes Debian and Android apps for auto-on functionality needed.
Some Issues with Synchronizing
The main thing is to think out one's synchronization policies and plans. One-way synchronization, two-way sinchronization, master and slave device replication, etc. There are many options. Some files one will want to keep everywhere, with version control. Other files one will want only in one or two locations (large files/repositories).
The best approach is to partition into folders so that different folders contain different content that will be sychronized differently. Some examples:
- Images/Photos folder on a mobile device
- Should be synchronized but also allow for repository of more images on a backup location.
- Workflow: sync mobile folder to desktop. On desktop, move images to a second folder (removing them from mobile via synchronization), and then have the second folder synchronized to a server. That server folder can have SFTP for remote access and also provide two-way synchronization back to the desktop for things such as editing images that are on a web server.
It is important to have a manual workflow as well (or semi-automated) so that things are easier to manage.
Synchronization vs. SFTP
Synchronization is useful, but is not a replacement for SFTP which should be seen as on-demand push/pull. For example, a large repository can be synchronized between two larger-capacity devices (e.g, Debian server and Debian workstation), but also allow access via SFTP for smaller-capacity devices (ChromeOS/Android).
For a desktop, add to Startup Applications
/usr/bin/syncthing -no-browser -home="/home/user/.config/syncthing"
For a server, create a service, or something like that.
Value of Syncthing for the Enduser
Ultimately, Syncthing lets the enduser take full control over their data on their devices in terms of files that are synchronized with other devices. Along with SFTP on a server, and possibly something like AWS S3 and Glacier, it appears to provide a useful protocol, gui admin console, and applications that can do everything that GDrive/Dropbox/OneDrive offer in terms of synchronization. Since disk space is already something that can be managed at the level of S3/Glacier and local devices, it provide a key element in a resource-efficient, open source package.