 Okay, we're gonna take a look today at Sync Thing. Sync Thing is decentralized peer-to-peer file synchronization program that can sync files between devices on local networks or over the internet. It's completely free, open source, very actively developed and very secure. While it does synchronize files similar to own cloud or Dropbox, it does so without the need for a server. It is more or less an open source version of the BT Sync tool, but has a lot more features. Each device that you share with the folder will keep the same copy of the files that you sync. Now, Sync Thing supports Linux 32-bit, 64-bit, ARM, ARM64, Solaris, Windows, Mac, and Android. As of September 2016, we're at 0.14.6 version, secure, private, open development. A lot of great reasons to use this. Now, it's built on a framework referred to as the Block Exchange Protocol. And this is really, really well-written. This is not just well-written, it's well-documented. So this entire Block Exchange Protocol is the base that all of this runs on top of. Now, this whole project, I can't believe the level of documentation it has for it. I'm still gonna do a video on it, even though it's not hard to follow documentation to get things set up, but I just kinda wanna show it in action. So I got my demo machines fired up here and I already have it on here downloaded on a Linux box. I'm gonna quit Firefox and just show you how you open it up. So once you download Syncthink, you just have to run it. There's no config file you really have to do. There's plenty of options you can do, but we're just gonna start with the basics of just kicking it off and run. So you download, run, no wizard, Syncthink just starts. It's not running in a background. The first thing it does is launch a window directing your browser to HTTP, essentially local host or 127.001 with no username or password. It can only be accessed by you locally. It cannot be accessed against your external IP. So it's still secure, even though there's no login credential. Now from here we can go over to the settings and we can start customizing it. We can create a authenticated username if we want, authenticated password, use HTTPS, and you can pick your IP address to bind to so it can be externally accessible. Now if you wanted to do this on a headless server that does not have a web browser, can you launch Syncthink on a Linux box or a Windows box with a command line option telling it which IP to bind to and then go in and change all these settings to the web interface and customize it. Or you can edit the config.xml file directly, which is in Linux located under .config slash Syncthink.config.xml. And on Windows it's your username, local app data, Syncthink, and it's actually the same config.xml file. Now you can also set your rate limits, your outgoing limits, internal limits. So if you wanted to not have it saturate your bandwidth, you can do that. You can give your device a specific name. It's just gonna pull the name of the computer. This is a virtual box installation called Thomas Virtual Box. You can change the default listen address. Now this is some neat options here. So natural, virtual, global discovery, local discover, and relaying. What these things do is if you don't have a way to map your firewall and you wanted to connect devices and you just want it to be discoverable, you can use, and this is the default, their own discovery servers. Now your data does not pass through these discovery servers per se. The discovery servers just allow Syncthink's instances to sync with each other by registering with a global discovery server, sharing out your IP address to the global discovery server, and then allowing other people to connect to you. Now they can't just connect. They do need to use a key. So it's not like it's an unencrypted connection. And they do not need your username and password. They just need your unique key. And then even once they have the key, I'm gonna show you how you accept the share. So we have Syncthink running right here, and here is the default share folder, which is a unique folder ID that's randomly generated on here. Now whenever you're doing a share, you can call the folder label whatever you want. Default folder, whatever. But you have to leave the folder ID unique upon creation. It can't be changed. So once these are set, they're set. And we're gonna save and we can call this, this one's now referred to as default folder, whatever. Other options on these folders, you have a lot of different, how often you wanna scan it, you can take it whether or not this is a normal or master folder. A normal folder means whatever's in this folder is synced with all the other devices. And I say all. It's not just one or two devices you can sync with. It's many, many. Some of these people have a thousand devices that they're syncing with. Other option is master. And if you set it up as a master, anything you put in here just gets propagated to all the clients that connect to it and changes they make, don't go upstream back to this one. So we're gonna leave it here normal. File, pull order. You can say pull the newest, oldest, random or alphabetic list. So that's how, if you have a lot of them that are sync, which order do you want them to sync in? The file versioning is pretty cool. Now trash can versioning is pretty simple, which means when a file is deleted, throw it in the trash can. Now this is very important. If you're sharing this with someone else and they delete a file and they're completely synced with your folder, it deletes it on your computer too. But then you have an option to say throw that into the trash can. Now the downside of trash can versioning is you can set the number of days that it goes in there, but let's say we have a file called tom.txt and we delete it. Then we create another file called tom.txt and we delete it. It goes and overwrites it. That's where staggered file versioning, there's an option where it also synchronizes every incremental change and we'll show how that works. So we're gonna set this one to staggered file versioning. We're gonna go ahead and leave the days at 365. We'll leave the version path at default, but this is a neat option. You can take and have the staggered file versioning sent somewhere else. Now there's also simple file versioning, which just keeps five versions of the files. So every five edits of a file, it deletes the six edit. And full external versioning is you can set up a series of commands to execute every time a file is moved or deleted. And then that just gives you another level of customization. We're gonna use staggered for our demonstration here. So save. All right, now we're gonna fire up the same thing on our Windows machine. So here's Windows, already have syncing downloaded here. Here is the location, users, username, app data, local sync thing. There's the config XML file, just like we have on the Linux machine under config. So much the same there and it runs and launches the web browser. Actually, to make this easier, I'm gonna go ahead and allow access to the other machine. So we do that by doing this. What's the IP address of this? 192.168.103. So we go into the settings and change this to 192.168.103. Save. Now, it's gonna warn me of the danger because there's no password on this and it says people can easily access Hackersbury, blah, blah, blah, I don't care. All right, so now we have it over on this device here. So this is our Windows machine and this is our Linux machine. We're going to show the device ID. Now, these devices are absolutely unique. You should keep them protected. That's one of the reasons I'm doing this in a virtual machine because knowing my device ID would be the step in towards accessing my existing machine. So we're gonna copy this and then we're going to add a device and what's the device ID? We're gonna give it that and it's the Windows 7Vbox. Now, if I knew the address, which we know, it's TCP colon IP colon port. Now that's how you connect directly. We're gonna go ahead and let it figure out what to do. We're also gonna go ahead and tell it to share this right away. So we're gonna hit save here and this will allow this device, which is the Linux box, to find and discover. And we're gonna go ahead and let it use the discovery servers and local discovery so it's gonna hit save. Now it's looking for it. Now this does not happen instantaneously. It's gonna take a second. And on here, we're gonna wait and we're gonna see a prompt come up that the devices wanna talk. Right now they're going through in a block exchange protocol is slowly pinging out and finding the other devices and syncing them up. And it's verifying with TLS security the keys that were generated and the way it verifies that we actually are trying to access this is because of that long ID when we into actions and show ID. And of course, if you're doing this with a phone, that's why it's got a QR code as well. So now the device is on a new device. This virtual box with this ID from here wants to connect. I like to add this device. I can say ignore it or add it or deal with it later. So it wants to know, okay, it's a dynamic address. This is fine. Do I wanna share the folder? I'm not gonna share my folder but they're gonna share it with them. So we're gonna hit save and we're gonna call this the Linux box. So we know that's the Linux one because we can have whatever device name we want. So save. Now it's gonna take a second because now the devices are connected with each other and we're gonna see this show up and turn here. This is on our Linux box and this is our Windows 7 box. This does not happen absolutely instantly. So I'm gonna go ahead and show you the delay. It does take sometimes 60 seconds before the two devices really start talking to each other. That is normal. Now it's found that says, hey, look, they want to share this folder. So we're gonna go ahead and add the folder. Now the folder path is pretty cool. I like the way this works. So you can say share it on C. What do we wanna say? We're gonna type users that auto completes for you. It is case sensitive. Whoops, users. Tom's. And we're gonna call it the Linux share. And if it does not have the folder, it creates the folder on there. Default folder, whatever. That was what we called it on the Linux machine. Default folder, whatever, from a Linux box. Then we're gonna go to advanced settings. Now the trash can setup is per device. So I set up a trash can for that share on the Linux machine, but we didn't set up yet on here. And so it's per device, per share, per folder share. So we're gonna go ahead and say we're gonna just do something simple here. Trash can file and versioning, keep 11 days worth and hit save. All right, now we have a share. And it says it's up to date. So this one's still unshared. And we're just gonna, for simplicity, we're gonna delete, because you don't need to have the default share. You don't have to have any share. You can just share with this. So we're gonna have, here's from the Linux box. It's under the Linux share. And here's my virtual box. Here's my folder for it. Now let's actually look what's in the folder. Let's put something in a folder. So we got desktop sync thing. Home, sync, right now it's empty. So we'll do this. And it's gonna rescan and find some files. I can force it to it now by default. It's set to every seconds, 37 files. And in a few seconds when this rescans, I'm gonna go ahead and force it to speed things up. It now has them indexed. It's gonna take a second and goes, hey, we're not up to date. This happens a little bit slow when you first connect them. Once they've been connected for a while, this happens instantly. It also happens faster if you specify the TCP ports. We've now transferred over to this one, 37 items, 11.8 megs. The protocol itself is using delta syncing within the block exchange protocol. And what that means is it syncs on the delta. So if you had a one gigabyte file and you change only a few bits into one gigabyte file, it can sync in 128 kilobit chunks the delta changes of that file. So the protocol is actually really fast. So now that these two machines are completely talking to each other and fast, let's go in and make some changes. On the Windows machine, let me drag it back over here. Here's the Linux share. And let's go ahead and just delete something like this. So we'll delete it out of here. Let me go back to the Linux machine. And now it's deleted out of here. So it's synced up and it's deleted. And now this, like I said, I've just turned on so we can see the hidden. Here's that ST versions folder. And there's that folder we deleted. So this is how it controls the versioning is for every share, there's an ST versions folder. And depending on the type of versioning you have set up, that's where the files go. So let's go ahead and create another file. So we have the readme text, make another copy of it and rename it just testing. Now let's make some edits on this. Some edit from the Linux box. Save the file. Go ahead and force a rescan now. By default it's set to 60 seconds. I'm not gonna set it to one second because it makes it kind of file intensive at that point. And we can last file receive updated testing.text. That means on our Windows box, which we'll bring back over here. There's our testing.text file. Some edit from the Linux box. Some edit from the Windows box. Save, oh, force a rescan real quick. Rescan files, make sure it's up to date. Yep, this one updated it. Some edit from the Windows box. So now you can go back and forth and as you save these. Now if we create a file conflict by doing that, it will automatically create a conflict. So we're gonna say start conflicting from Linux. Say, oh, don't wanna save it. So here's an edit ready to be saved and we're gonna simultaneously edit and save over here before they can do anything. So just make some edit here and we're gonna jump real quick and hit save, save. Then we're gonna force them both to sync and it's gonna give me a list of failed items because I tried to edit the same file at the same time. This one's synced first. This one's saying out of sync and trying to figure it out. All right, now for the version conflicts, I still saved them so fast that it did create it and here it is. We have a conflict one. So it tells you about the conflict of this. It doesn't do anything to the file itself. It just creates another version. So we can look here and see we have testing sync.conflict and it tells you the time that the conflict occurred. So we still have our original file and now we have one called conflict. Now also what was going on behind the scenes is in the version folder, we have another version from when we saved over the same file. So it tells you the date and timestamp of this version of that file. So if we edit this file again, so we're gonna go over here to the windows machine again and we're gonna open up that testing.text file and let's just clean it up. So let's get rid of all the crap inside of it, delete it. Now it is mostly blank. File, exit, save. Then we'll go ahead and move this out of the way and we're gonna force a resync on these. Rescan, rescan. Go into our sync folder, look for this testing.text file. Now it is mostly blank. Go back to the actual root of the folder, look at this hidden stversions folder and here's the different variations. So if I wanna go back and look at what it was here or what it was here, it now kept all the version histories of them. So I synced it from, I edited it persistently on the windows machine and it creates all of these hidden ones. This is the staggered versioning. Definitely a great way to do it. That way everything happens to your files or something gets edited on one of the other computers. You need to go back. They're all nice and date stamped. So that's kind of the basics of how the syncing works. You just share that on there. This concludes sync thing for kind of a quick overview of how to get started and how to get it working. Now I'm gonna do another video. There's gonna be a follow up to this, taking a deeper dive in it, but this is just kind of an overview to get you started on this sync thing. It's a great tool. I really like it. It's definitely been a solid performer for me having all the files that I have in there. Thank you for watching this review of sync thing. If you like the content here, like and subscribe and I love to hear feedback of how you're using sync thing or any other tools that I talk about. Thank you.