Sync Files and Folders Between Two Machines

by March 18, 2015 0 comments

A free and open source software called Syncthing let’s you automatically sync files and folders between two machines. We show you how to do it between Windows and Ubuntu based machines

Syncthing is an open-source file synchronization client/server application, written in Go, implementing its own, equally free Block Exchange Protocol (BEP). There are many programs capable of keeping files in sync between different computers. Syncthing is a compelling new option that is cross platform, completely open source, very flexible, and easy to use. Here we will show you how to get started using Syncthing to synchronize data between Ubuntu 14.04 server and Windows. This will allow you to seamlessly sync files between these servers based on configured ‘watch’ directories.
You will need access to two or more machines. Here we are using two machines — one with Ubuntu 14.04 and the other with Window 7. These two machines equally sync or mirror files once you install and configure  Syncthing on them.
Installing/Configuring Syncthing on Ubunty 14.04
Step 1: Download Syncthing by using the following command or download it from the Syncthing website.
tar -xvf syncthing-linux-386-v0.10.1.tar.gz
cd syncthing-linux-386- v0.10.1
tar -xvf syncthing-linux-amd64- v0.10.1.tar.gz
cd syncthing-linux-amd64- v0.10.1

Step 2: Now on your http://localhost IP:8080 you get a web based GUI interface of Syncthing.


Step 3: By default, the Syncthing web interface is only available to connections from the same computer. To connect it from a remote server, you need to make some changes in its configuration. Right click on the top right side Setting icon and click on Setting in its Dashboard. Go to GUI Listen Addresses and change the default ip to and save it.



Step 4: After saving the configuration, you get a pop-up command to restart. Click on the Restart button.


Installing Syncthing on Windows

Step 1: Just download Syncthing from their site, unzip and run the syncthing.exe file and automatically a web based GUI of Syncthing will open in your default web browser. Do the same configuration which was done in step 3.
Synchronizing Ubuntu and Windows Machines
Step 1: On the Ubuntu machine, open the Syncthing GUI and click on Setting icon -> Show ID

Step 2: Copy the ID from the above step and open Syncthing GUI on the Windows machine. Click on Add Device option and paste the copied ID in Device ID box. Also give the Device a name and enter its IP address.



Step 3: Repeat the same step of entering the device ID of the Windows machine into the Ubuntu machine.

Step 4: By default you will get a folder which is ready to sync the file on both the servers, but if you want to add it manually, then click on the Add Folder option, which you will find on Syncthing dashboard. Once you click on it, a pop-up window will open in which you give Folder ID – whatever you want but enter the same Folder ID/name on every machine which syncs this folder. Copy the path of the folder which you want to sync and paste it in the Folder Path box and check the share device box at bottom.


Step 5: After a while (up to a minute) connect to the other node and follow the step 4 in other machine, give the same Folder ID and local folder path where you want to sync file in the folder path box.

Step 6: The given screenshot is from windows machine in which folder ID is default and sync files from Ubuntu machine. But at this point the two nodes share an empty directory. Adding files to the Sync directory on either node will synchronize those files to the other side. Each node scans for changes every sixty seconds, so changes can take longer than a minute to propagate to the other side.



No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.