Skip to content
Zillode edited this page Jan 3, 2015 · 24 revisions

Introduction

For this guide lets assume you have two machines that you want to sync files between. In keeping with syncthing terminology they are going to be called "devices" in the rest of the documentation. The "local device" is the one you are configuring, viewing status for, etc while the "remote device" is the other machine.

The best way to follow this guide is to do the install on both machines and configure them in parallel. If both machines aren't accessible simultaneously that's fine, the results will just be a little less immediately obvious.

Installing

Grab the latest release of Syncthing for your operating system at https://github.com/syncthing/syncthing/releases/latest and unpack it. There will be a binary called syncthing (or syncthing.exe on Windows). Start this in whatever way you are most comfortable with; double clicking should work in any graphical environment, but I'll use the terminal to better illustrate what happens. At first start, syncthing will generate a configuration and some keys and then start the admin GUI in your browser. Something like the following will be printed on the terminal:

$ syncthing
[monitor] 15:56:58 INFO: Starting syncthing
15:56:58 INFO: Generating RSA key and certificate for syncthing...
[ANSMX] 15:57:05 INFO: syncthing v0.10.14 (go1.4 darwin-amd64 default) jb@syno 2014-12-31 12:08:37 UTC
[ANSMX] 15:57:05 INFO: My ID: ANSMXYD-E6CF3JC-TCVPYGF-GXJPHSJ-MKUXBUQ-ZSPOKXH-RG4SOAL-5447KQW
[ANSMX] 15:57:05 INFO: No config file; starting with empty defaults
[ANSMX] 15:57:05 INFO: Edit gs1/config.xml to taste or use the GUI
[ANSMX] 15:57:05 INFO: Starting web GUI on http://127.0.0.1:8080/
[ANSMX] 15:57:05 INFO: Loading HTTPS certificate: open gs1/https-cert.pem: no such file or directory
[ANSMX] 15:57:05 INFO: Creating new HTTPS certificate
[ANSMX] 15:57:05 INFO: Generating RSA key and certificate for syno...
[ANSMX] 15:57:07 INFO: Starting UPnP discovery...
[ANSMX] 15:57:13 INFO: UPnP discovery complete (found 0 devices).
[ANSMX] 15:57:13 INFO: Starting local discovery announcements
[ANSMX] 15:57:13 INFO: Local discovery over IPv4 unavailable
[ANSMX] 15:57:13 INFO: Starting global discovery announcements
[ANSMX] 15:57:13 OK: Ready to synchronize default (read-write)
[ANSMX] 15:57:13 INFO: Device ANSMXYD-E6CF3JC-TCVPYGF-GXJPHSJ-MKUXBUQ-ZSPOKXH-RG4SOAL-5447KQW is "syno" at [dynamic]
[ANSMX] 15:57:13 INFO: Completed initial scan (rw) of folder default

At this point syncthing will also have set up a folder called default for you, in a directory called Sync in your home directory. You can use this as a starting point, then remove it or add more folders later.

Configuring

The admin GUI starts automatically and remains available on http://localhost:8080/. It should look something like this:

img/gs1.png

On the left is the list of "folders", or directories to synchronize. You can see the default folder was created for you, and it's currently marked "Unshared" since it's not yet shared with any other device. On the right is the list of devices. Currently there is only one device, the computer you are running this on.

For Syncthing to be able to synchronize files with another device, it must be told about that device. This is accomplished by exchanging "device IDs". A device ID is a unique, cryptographically secure identifier that is generated as part of the key generation the first time you start Syncthing. It is printed in the log above, and you can see it in the web GUI by selecting the "gear menu" (top right) and "Show ID".

Two devices will only connect and talk to each other if they both know about the others' device ID. Since the configuration must be mutual for a connection to happen, device IDs don't need to be kept secret.

To get your two devices to talk to each other, click "Add Device" at the bottom right on both, and enter the device ID of the other side. You should also select the folder(s) that you want to share with this device. The device name is optional, but you can set it to something that makes sense for you to remember what device this is.

img/gs2.png

On you click "Save" the new device will appear on right side of the GUI (although disconnected) and a prompt will be shown to indicate the need for a restart.

img/gs3.png

Syncthing needs to be restarted for some configuration changes, like sharing folders with new devices, to take effect. When you click restart syncthing will first restart:

img/gs4.png

... then come back up and after a while (up to a minute) connect to the other device. Remember though that you need to do the above process on both devices, and only once you've done this on both they will be able to connect.

img/gs5.png

At this point the two devices share an empty directory. Adding files to the Sync directory on either device will synchronize those files to the other side. Each device scans for changes every sixty seconds, so changes can take a bit over a minute to propagate to the other side.


Good luck and have fun! There is more documentation and if you run into trouble feel free to post a question in the support forum. If you have problems getting this to connect, first take a look at Firewalls and Port Forwards, then look at any error messages in the GUI or on the console and if necessary move on to Debugging.

Clone this wiki locally