RT Cunningham

Syncthing Once Again – Because FTP isn’t Reliable Enough

I wrote about Syncthing here, a little less than three months ago.

Not long after that, I decided to switch to FTP. A single PHP script was in control. I have since reverted to Syncthing, with a slightly different setup. FTP didn’t work out for me.

Syncthing instead of FTP

There was nothing wrong with the PHP script I used to upload files to my server. The problem was that the connection would time out for various reasons.

I’m in the Philippines and my server is in San Francisco, California, USA. I’m positive periods of latency caused the timeouts, along with my low upload bandwidth. It’s a DSL connection, not fiber.

Even with only two WiFi connections (the cell phone and the laptop), uploads of any kind would cause problems. Syncthing doesn’t suffer from low upload bandwidth. It picks up right where it left off.

Installing and Configuring Syncthing

The instructional article at LinuxBabe.com is a good guide for both the desktop and the server, except for the web browser bit with the server.

The last time I set it up, I wasted time by setting up an Nginx proxy. All I had to do was change the IP address for the GUI in the configuration file from “127.0.0.1” to “0.0.0.0”. I could then use my server’s IP address followed by a colon a port number. The configuration file is here:

/home/[user name]/.config/syncthing/config.xml

The GUI line is pretty easy to find.

Syncthing and Security

I’m now using Syncthing to synchronize my web server directories. The only hurdle I had to jump over was making sure the directories matched. That wasn’t easy to do with the directories I use for my static site generator.

I haven’t set it up yet, but I’ll be using it for my backups as well. When I last checked, I had 22 gigabytes of my 25 gigabytes disk quota remaining. If I don’t rotate the backups properly, I could probably eat up all that space in short order. Luckily, I only have to rotate them in a specified local directory and Syncthing will take care of the rest.

I’m using the GUI for the server with HTTPS, with a very strong password (which is stored as a Bcrypt hash). I’m using the GUI on my laptop computer, but I’m not going to bother with HTTPS on it since I’m the only person who uses this machine.


May 5, 2018
Technology

You May Also Like: