Syncthing on openSUSE

posted 18 Apr 2017

As part of my quest for my illusion of freedom, I have been looking for an alternative to Dropbox and Google Drive to backing up and synchronizing the bulk of my data between machines. I am a user of Dropbox and Google Drive via Insync, that won’t change for many of my needs. I still have a need to share data easily with other individuals.

I also decided to stand up a replacement primary openSUSE machine to replace my nearly 10 year old Dell Latitude D630. I have done all that I can do to make this thing as fast as possible but it is time to change its role to a home-station only machine.

I want to keep the old machine synchronized with the new machine so that I don’t always have to pull the new one out of the bag and turn it on to do work. I don’t want to sync everything up to Google Drive or Dropbox because, well, I’m not wiling to spend that much per month for synchronizing large volume, low churn data. I looked at several solutions but this Syncthing looked very promising and the more I acquainted myself with it, the more solutions I can see this fulfilling.

Setup and Install

Like everything on openSUSE, it’s real easy. My old machine is running Leap due to the need for the proprietary graphics driver as it doesn’t not play well with the open source version. The new machine is running openSUSE Tumbleweed, the rolling release, as I would like to play with the newer software available.

For openSUSE Leap it was as simple as going to the openSUSE Software site and searching “Syncthing.” Since I want the handy applet that sits in my system tray and not use a browser to interface with it, I am utilizing the syncthing-gtk version. I found it to be super straight forward to setup and use.

For openSUSE Tumbleweed, it was completely the same. The only difference, ensure you are downloading the “Tumbleweed” version as opposed to “Leap 42.2.” Both versions are in their respective repositories. Thank you openSUSE for making it so straightforward and easy to install software!

Alternatively, if you like playing around in the terminal, which I of course like to do, you can type this:

sudo zypper in syncthing-gtk

Since this is in the Official Repository, you can be assured of updates.

Once installed run Syncthing from the menu. It greets you with a real nice “first run wizard” to get you started and also makes a note to tell you that your configuration files are in ~/.config/syncthing folder. If you would like to manage the Syncthing remotely, you can set up a username and password to protect from unauthorized access.

For my purposes, I am just having it listen to “localhost” only but if I were setting this up on a headless server, would chose to set up a username and password. I also wanted to open up port 21027 on my machines for local network discovery so communication would be more direct and not being relayed anywhere.

Start up and synchronizing my first folder

Since I was new to this software but not new to similar services, I already had some expectations and understanding of how it should work.

For testing purposes, I wanted to synchronize a rather large folder on my system called “Projects” between my old and new computers. There is far too much data in this folder to put on Google Drive or Dropbox unless I wanted to shell out a lot more cash per month. I also figured, if I’m going to break this application, this would be the folder that would do it. A pretty good mixture of large and small files mixed in a lot of folders.

After several hours everything synchronized, everything worked great. I didn’t test every single file on the machine to receive the files but what I did test and local scan on the folder indicated that the number and size of files were the same on both machines.

Since that went so well, I decided to sync my files to a third machine and see how that would go.

Adding a new device is also very straight forward. Just add the “Device ID”, give it a name and select which folders you want to share with it. Be patient it will take a little bit for the machines to tell each other “hello.”

This machine was on a different network at a remote site. Although a bit slower, for obvious reasons, it also worked flawlessly. Same results on the number and size of files. No errors that I could detect. After that, I just went crazy and added numerous folders between machines and it has all just been a really positive experience.

The next task, see how it runs on my mobile and replace a third party service for backing up pictures. The Google Play store has Syncthing available for installation. Truthfully, I didn’t have high expectations for this as they were far exceeded. I am very happy with the setup process, the performance and the time it takes to get new pictures from the phone to the computer. I set up the Camera folder as well as my Pictures folder on the phone to see how that would go. Again, works flawlessly. I do notice, that my phone will go “offline” according to the my other machines. Presumably this occurs only when it is on mobile network or the battery is low. I haven’t fully tested all the conditions but my pictures are quickly available on my openSUSE machines.

What I like

I have control over the location of my data. I know what machines are actually hosting my personal data. I don’t have to worry about where some other company is storing my data, what they are doing with it and how they are looking to benefit from mining my information.

I have very fine control of what I share with what device or what person. In this case, I don’t have a folder that is shared with a server and I am selecting what folders or files are shared with someone else. Though, that model does have advantages and has its place, this method of sharing a specific folder on my computer with a series of machines or a group of people and I know who it is I am sharing my data with.

I greatly appreciate that I don’t have to sign up for a service to use this software. No company or organization is controlling access to this service for any systems or individuals. You can set up your own relay server if you so desire and for any synchronization on your own LAN, a relay server isn’t even necessary. You truly don’t have to be reliant on any external service.

The fact that the size of shared folder limited only to the physical space on your systems is also a great bonus. Hard drive space is really pretty cheap today which also bodes well for this backup strategy.

It’s great that local network discovery is possible when the proper port is open on the machines. I also find that the transfer rates are much quicker when they are talking directly to each other as opposed to through a relay server.

Associating your mobile device is quick and easy by scanning a QR code of the Device ID. You really can’t ask for much simpler than that. If there was only as quick of a way to scan a QR code from my laptop… I’ll have to look into that.

Another note, the Device ID itself is not a security risk to give out, as Syncthing still requires approval of each device to allow access. No one that has your ID can just access folders. Not only do you have to approve the device access you also have to approve the folder to be shared.

What I don’t like

This is not a straightforward “dislike” as I realize the design intent behind this software but desire the ease of use of a service like Dropbox or Google Drive. Your data is not available in a “cloud” out there so I can’t just browse the data of which I am synchronizing between machines. You can create a method of accessing one of these machines remotely, but that is outside the scope of this article and Syncthing.

This does have a greater learning curve than aforementioned services but once you understand how it works, you are good to go. The basics of this service is, you are creating a bridge to another computer or series of computers to a specified folder on your file system, that is it. Once you understand basic workings it is very simple to expand your “hive” of machines sharing data.

Use Cases

My primary use case is keeping my “home station” computer with my “mobile” computer synchronized. I have many gigabytes of information that I want to stay synchronized between the machines. It would NOT be cost effective for me to use Google Drive or Dropbox for this purpose.

Another place where I can see this being a useful Community of people sharing a pool of data, such as educational resources where Google Drive or Dropbox may be too cost prohibitive for all users to have an account. Also, if any members of the community have philosophical issue with utilizing a 3rd party service for storage of data, Syncthing is likely to fit the bill.

I am one of those that still buys CDs and have accumulated a large repository of music. I much prefer to rip my CDs and share them among my personal machines and this too is a case where you would get flagged by Google Drive or Dropbox.

Keeping a collection of family pictures shared between computers is another case I find Syncthing to be valuable. This is another case where I have many gigabytes of pictures that would be cost prohibitive to utilize a 3rd party service.

Final thoughts

I would not stop using Google Drive or Dropbox entirely and replace it with Syncthing but it is another tool for backing up my data and it does change how I keep redundant copies of my data. Most importantly using this for the redundant storage of family pictures and events that I want to remember. I can keep a LARGE collection of pictures synchronized between multiple computers that I do not want to lose. I also have a selection of documents that I don’t feel comfortable storing on someone else’s computer and just feel better about keeping on computers that I own.

Everyone has there own acceptable levels of control by external forces. This is an area where I feel a sense of control and freedom over my data and I see this as another solution to get closer to that ideal of personal empowerment and self determination.

External Links

Syncthing Home Page

Syncthing Getting Started Documentation

openSUSE Syncthing Package

Google Play Syncthing Download