Syncing your Files Across ALL your Computers via Syncthing

Sdílet
Vložit
  • čas přidán 9. 07. 2020
  • Syncthing is a fantastic utility that allows you to easily synchronize all your files and data across all of your computers. In this in-depth tutorial, I'll show you everything you need in order to get started using Syncthing. This is an update of a previously covered topic for 2020.
    0:00: Introduction
    1:07: Overview
    5:35: Installing Syncthing
    13:24: Installing a systemd unit
    17:06: Syncing and configuration
    Wiki article for this video:
    tinyurl.com/ya8ggfjc
    🙌 Support me on Patreon and get early access to new content!
    ➡️ learnlinux.link/patron
    ☁️ Get $100 in credit toward deploying your very own Linux servers on Linode!
    ➡️ linode.com/learnlinuxtv
    🛒 Affiliate store for Linux compatible hardware/accessories (commission earned):
    ➡️ learnlinux.link/amazon
    💻 Check out the Tiny Pilot KVM for your Homelab (commission earned):
    ➡️ learnlinux.link/tinypilot
    🐦 Follow me on Twitter!
    ➡️ learnlinux.link/twitter
    💬 Official LearnLinux.tv Community:
    ➡️ community.learnlinux.tv
    📖 Check out jay's latest book, Mastering Ubuntu Server 3rd Edition. Available now!
    ➡️ ubuntuserverbook.com
    👨 More about me:
    ➡️ www.jaylacroix.com
    ➡️ www.learnlinux.tv/about-me
    💽 How to create a bootable flash drive for installing Linux:
    ➡️ linux.video/flash-usb
    🐧 Which distro do I use?
    ➡️ learnlinux.link/mydistro
    🔐 How to better secure OpenSSH:
    ➡️ linux.video/secure-ssh
    ☁️ How to create a cloud Linux server with Linode:
    ➡️ learnlinux.link/create-linode
  • Věda a technologie

Komentáře • 95

  • @DanCalloway
    @DanCalloway Před 4 lety +13

    Been using Syncthing for years as well and your approach to installing the application and using it in the home is a clean way of handling file/folder synchronization on a star topology network. Great video!

  • @phillipcifone8974
    @phillipcifone8974 Před rokem +2

    Throwing a comment your way to help the the algorithm:
    You have been my personal Linux instructor lately as I navigate this operating system. I've been using Linux for maybe a little over 6 months now? I was watching other youtubers but they just kind of quickly go through things, but you often take the time to explain what you're doing and why, and for idiots like me it's a huge help. I didn't start really understand what I was doing until I came across your Arch install video (which led me to your channel) and then your homelab podcast. I'm doing things that 1 month ago I would have been scratching my head at. Your channel is indispensable.

  • @vollmacuser
    @vollmacuser Před rokem

    Thank you for this upload, I can only imagine how much work goes into producing a video like this.

  • @yiannisspanos694
    @yiannisspanos694 Před 4 lety +1

    I sure asked about this a few weeks ago. Thanks for the video!

  • @raymondfb
    @raymondfb Před 2 lety

    great video ! thank you for taking the time to make this video. i learned so much.

  • @notpublic7149
    @notpublic7149 Před 3 lety +7

    Thank you! I am very appreciative for this information, the documentation is great, but as with any good docs, it's quite lengthy. This short breakdown of SOHO NAS scenario is very fitting, cheers.

  • @murtadha96
    @murtadha96 Před 2 lety +2

    Great quality video and explanation, very useful!

  • @JuanLopez-db4cc
    @JuanLopez-db4cc Před 4 lety +2

    Thank you very much for making this video. Thanks for telling us more about this tool.

  • @davidvantongerloo1907
    @davidvantongerloo1907 Před 4 lety

    thanks jay, just the thing i was looking for !!!

  • @johncrunk8038
    @johncrunk8038 Před 4 lety +7

    Thank you, Jay, for opening up another rabbit hole. LOL.

  • @ikhtiaramin2578
    @ikhtiaramin2578 Před 3 lety

    Very helpful Jay, thanks.

  • @jim7smith
    @jim7smith Před 2 lety +1

    Well done...I was trying to do what this does automagically using rsync scripts, but this is a lot less work and needs no updating manually. I like it.

  • @keenanblack3958
    @keenanblack3958 Před rokem

    Thanks for the guide Jay! I did in this case have to configure my ufw firewall on the server for certain devices to to connect (home network). Looks like port 21027/udp was the culprit. Instructions taken from Syncthing documentation: "If you’re using ufw on Linux and have installed the Syncthing package, you can allow the necessary ports by running:
    sudo ufw allow syncthing
    If you also want to allow external access to the Syncthing web GUI, run:
    sudo ufw allow syncthing-gui
    Allowing external access is not necessary for a typical installation.
    You can then verify that the ports mentioned above are allowed:
    sudo ufw status verbose "

  • @olis936
    @olis936 Před rokem

    Great video Jay, thank you very very much!

  • @kenrq63
    @kenrq63 Před 3 lety +2

    A good tutorial Jay thank you.

  • @TheBrimurray
    @TheBrimurray Před 3 lety

    This is very usefull. Thank you Jay

  • @ltam168
    @ltam168 Před 2 lety

    Great video. Thanks for sharing.

  • @AtishayKumar
    @AtishayKumar Před 8 měsíci

    Great video. Instructions work

  • @AnzanHoshinRoshi
    @AnzanHoshinRoshi Před 4 lety

    Thank you, Jay.

  • @donjenkins2465
    @donjenkins2465 Před 3 lety

    Great video easy to understand... Only problem was from you show notes I got this: sudo apt install syncthingxx
    I finally figured out that the "xx" wasn't supposed to be there..

  • @philippao8078
    @philippao8078 Před 6 měsíci

    Hello, thanks for the video and explanation. Brazil side ;)

  • @johncrunk8038
    @johncrunk8038 Před 2 lety +2

    Great video. I use Syncthing to save client directories to unique directories on the server. Same idea, just separates the environments.

    • @7atab
      @7atab Před rokem

      Is there is any built-in similar utility to that in Unix-Linux or FBSD?

  • @RobertBrooksiii47
    @RobertBrooksiii47 Před 8 měsíci

    Thank You

  • @deciodasilva3960
    @deciodasilva3960 Před 2 lety

    I am very happy with syncthing compared to nextcloud...I really love it man...thanks man

  • @stalinengoma7680
    @stalinengoma7680 Před 2 lety

    Absolutely genius

  • @BrianThomas
    @BrianThomas Před 3 lety

    Very nice video. I had no idea this even existed before. Question: What if you're working with an off the shelf NAS device? How would you be able to sync from the server to the NAS. I have a very old Netgear NAS. Would this work with something like that?

  • @NovaCayn
    @NovaCayn Před 2 lety

    I use this on docker syncing my photos from my phone. Great way to backup pictures that you dont want to lose.

  • @indigowyrm
    @indigowyrm Před 3 lety

    Thanks good tutorial!
    Do you know if this debian setup works for Raspberry pi 4 as I have an open media vault NAS server with raspbian lite ? Cheers

  • @karloa7194
    @karloa7194 Před 2 lety

    Jay, have you tried to use something like autofs for centralized /home since you are using the star topology?

  • @saulgoodman1390
    @saulgoodman1390 Před 3 lety +2

    Drinking game: Take a shot every time he says "go ahead"

  • @vansantsam
    @vansantsam Před rokem

    Great video.. I have no problem with computers to servers or servers to servers but what I can't get setup is to share the content of datasets from one truenas server to a second truenas server.. I can manually copy and paste the files through my file manager and SMB://, but I want to automate the task with syncthing..

  • @waynenewark5363
    @waynenewark5363 Před 2 lety

    Helpful video. I now have Syncthing running on 4 devices including my Qnap NAS. A combination of Linux and Windows machines.
    BTW The wiki link appears to be broken.

  • @GSHERPA
    @GSHERPA Před 4 lety

    thank you.

  • @jonathanrider4417
    @jonathanrider4417 Před 2 lety

    Great video Jay - however your link below to the wiki page is broken; I will try to find the github page for the file...

  • @fuba44
    @fuba44 Před 3 lety

    How about using it for offsite backups, like set up a raspberry pi or something at my folks and brother to have two points of backup, can it safely sync via the internet?

  • @agung-kurniawan
    @agung-kurniawan Před 3 lety

    looking for sync folder cross platform. it's realy help me
    thanks sir

  • @ak49
    @ak49 Před měsícem

    so you have to keep your devices on? If I have a desktop and a laptop, do I have to have both devices on to syncthing to work?

  • @ausguy4385
    @ausguy4385 Před 2 lety

    Can you have a folder on the nas that is the long term stroage and the folder is accessible on other devices?
    Reason being if sync to nas of photos from phone I can't keep a copy of everything on the phone....

  • @mirkoregina8733
    @mirkoregina8733 Před 2 lety

    Hi, I have a distro based on DEBIAN Q4OS I need to connect 4 hard disks with windows and mac backups and I would like to create a server with raid sharing of all hard disks and including a continuous and incremental backup also of smartphones and ipads in the family ... I was thinking about nextcloud and openmediavault but something else would probably be missing to perfect everything and example the folder search on different file systems I forgot ... I also have nvidia shield which can act as a nas if it would be enough without paying plex .Advice? Thank you.

  • @mon0theist_tv
    @mon0theist_tv Před 3 lety

    23:20 but wait, are you sharing the folder from the second device to the primary device, or vice-versa? I don't understand how this program works

  • @hiranyasarma8886
    @hiranyasarma8886 Před rokem

    Thanks. How can we make this on CentOS 7?

  • @joshjohnson946
    @joshjohnson946 Před 3 lety

    does anyone know if its possible to add in nextcloud to the mix so nextcloud receives an updated file from one of my computers?

  • @halmorgan5693
    @halmorgan5693 Před rokem

    The wiki link for the process that you posted is no longer available. Do you still have it by chance?

  • @jothain
    @jothain Před 10 měsíci

    I got this working now, but question at around 28:43 mark. You're creating fileversioning on the PC-1 computer. Is this now applying only to this computer? I mean at quickly thinking this, shouldn't that change be done on Server if this by device setting and not universal. Other than that, great tutorial 👍
    Experimented a bit and it looks like I'm right. Might be beneficial to note this in the video as I'd assume most want versioning to be in the server, not at 'client' so-to-say.

  • @kalkulusrampage
    @kalkulusrampage Před 2 lety +1

    can be use out of local network?

  • @fg786
    @fg786 Před rokem

    What would I use for a simpler task like the following? I have an ebook reader with an extensive library. The same library is on 2 local PCs. And I want a software that checks whether the folder hirarchy between the Ebook reader and the PC it's connected to is the same, including all files ofc. If not just copy the contents that isn't on one device, reader or PC, to the other and be done. It's like the Ebook reader is the USB stick and I don't want to copy everything all the time but only the difference.

  • @loukask.9111
    @loukask.9111 Před 4 lety

    I'm pretty sure just enabling Shared Clipboard via the "Devices" Tab in VirtualBox allows you to copy paste the commands directly into the VM.

  • @pranayshahare738
    @pranayshahare738 Před 2 lety +1

    Please do make a video on syncthing errors and how to fix them. like path missing,marker missing, out of sync, syncthing disconnected,

  • @grem28
    @grem28 Před 2 lety

    if i have my files at the office, is there a way to sync my home computer with those files. So if i add a file at home, it will reflect at work?

  • @fvgoya
    @fvgoya Před 4 lety

    That’s pretty cool!!! It’s a kind of GUI version of rsync command? Also, with this system, we might need to have lot of extra free space, because of 33:33, correct?

    • @yaajfcomments7171
      @yaajfcomments7171 Před 4 lety

      It is not rsync, it's a BitTorrent Sync's free alternative. Syncthing will not sync files on the same machine and it's way faster then rsync on LAN even with crappy WiFi driver that keeps breaking TCP connections all the time.

  • @liketheduck
    @liketheduck Před rokem

    Love the shirt!

  • @merbst
    @merbst Před 4 lety

    SyncThing and SyncThing Lite are 2 excellent Android apps!

  • @Praxss
    @Praxss Před 3 lety

    Can we do linux as server and windows as client?

  • @BenMitro
    @BenMitro Před 4 lety +2

    Thanks! that was really informative. So much so that it has started a while lot of question!
    It would be good to explain what happens with permissions given each user on the different machines is actually a different user even if they have the same username. While we are on that, what happens if the machines a syncing different users? Let's say I have a file testfile.txt with permissions rw---- on machine1 and user1, after syncing will the synced file replace the permissions so they are rw---- for the machine2 user2?

  • @yaajfcomments7171
    @yaajfcomments7171 Před 4 lety

    Why do you need to download systemd unit manually? It's already included in the package in the official Debian/Ubuntu syncthing repository.

  • @geoffhalsey2184
    @geoffhalsey2184 Před 2 lety

    A painless way to share files. An alternative way to get round the localhost IP issue on a server is to install the docker version. That work quite well for me.

  • @khanhthedag7269
    @khanhthedag7269 Před 3 měsíci

    hi. Thanks
    cd ~/.config. but, I can go to this folder. the answer: No such file or directory
    how can I go to this folder (.config) ?

  • @christopherkevinlee2992

    Hopefully I'm going to use it as backup unity, going to have 2 Ubuntu servers. 1st one is going to be my main file server with raid1 and samba and the 2nd is going to have just raid then use syncthing to sync from 1st server to second server and set it up so its one way sync

  • @MichaelAMalone
    @MichaelAMalone Před 4 lety

    I did find the github systemd page, but I don't see the link in the description.... did I miss something... Lol's

  • @vk0x564b
    @vk0x564b Před rokem

    I have proxy enabled on my network device . What do I do ?

  • @jeffluo9591
    @jeffluo9591 Před rokem

    If I have file server, wouldn't it be better to to access the file directly from the server from everywhere rather than to sync it everywhere?

  • @HidayatLahabu
    @HidayatLahabu Před rokem

    On ubuntu, it is success like what you did ini this video, but on centos7, I don't now why it is fail
    maybe you can help to make a video setup syncthing in centos7

  • @Rbourk252
    @Rbourk252 Před 2 lety

    I have some mini pc’s that I mess around with trying out different distros’. I had one running mint that consistently failed to auto start syncthing on boot. It worked manually. But only after about a 1 minute delay after boot. I discovered that this particular box was set up with encrypted home folder. I’d forgotten that I had. After much searching, months later I discovered the fix. I had to disable my scything service and create a timed service that was linked to it. I enabled the timed service and started it in the same way as with any other service and then when I rebooted, syncthing started successfully precisely 60s after booting up. I learn a new thing every day! Perhaps a small video about this fix would benefit those out there who have the same issue.

  • @blackbarry45
    @blackbarry45 Před 10 měsíci

    22:30 setu up server

  • @sidneyking11
    @sidneyking11 Před rokem

    How to sync the Server's folder path to a different path on the pc? example server = /mnt/vda1/media pc = /mnt/sda1/media

  • @FederationOfLight
    @FederationOfLight Před 2 lety

    Speaking of syncing - can you sync your videos to Odysee, like every other Linux guy that I follow does? A lot of us spend more time over there now, because CZcams sucks.

  • @bitsurface5654
    @bitsurface5654 Před 4 lety +1

    I like this a lot! My Question: Is it possible to use it over Internet without a VPN?

    • @drumpf4all
      @drumpf4all Před 4 lety +1

      Yes there is, multiple ways. You can forward port 22000 on your router and point it to the computer you want to sync (must have syncthing running) OR if you don't want to open up ports on the router you use syncthing's SSH Tunneling feature - check the docs as they are really good.

    • @yaajfcomments7171
      @yaajfcomments7171 Před 4 lety

      Or you can just use relaying which is turned on by default, syncthing service on every paired computer would try to connect locally, if it fails it'd try to connect via relay.

  • @kermitdafrog8
    @kermitdafrog8 Před 3 lety

    What's the difference with syncthing and rsync?

  • @minutesgoals
    @minutesgoals Před 4 lety

    Good

  • @MichaelAMalone
    @MichaelAMalone Před 3 lety

    From what I can tell, scp, rsync, and syncthing all use encryption for transmitting... Is this true?

  • @jothain
    @jothain Před 3 lety

    I don't get it. I can't get this running at all. Service just doesn't launch correctly and ends with error: syncthing@user.service: Failed with result 'exit-code'.
    I've tried this now twice on Proxmox and with Debian and Ubuntu server bases.

  • @dimitristsoutsouras2712

    At part 3 what is the point to download separately the syncthing@.service and place it to the /etc/systemd/system/ .Shouldn 't this file be placed automatically during installation to the appropriate path?
    PS I assume you changed permissions of the file to root because the path /etc/..... is owned by root only and jay doesn't have access there?

    • @5thfloor584
      @5thfloor584 Před 3 lety

      what? You don't seem to understand how this works

    • @dimitristsoutsouras2712
      @dimitristsoutsouras2712 Před 3 lety +3

      @@5thfloor584 If I would what is the point to ask after all? Is your answer helping in some direction which also I dont get ?

  • @aperson1181
    @aperson1181 Před rokem

    What if you don't have a PC that acts as a server? Also, I run Win 11.

  • @stradomus9673
    @stradomus9673 Před 4 lety

    Nice shirt!

  • @knofi7052
    @knofi7052 Před 4 lety +1

    Why would I need Syncthing if I am having already a file-server with central file access for all devices?

    • @gilliangoud
      @gilliangoud Před 4 lety

      With risk of sounding too obvious: You could sync files frequently used on-the-go (outside acces or offline) that get changed on the file server. If your server is accessible from anywhere this wouldn't matter of course... But it would still be valid for keeping important files you cannot afford to lose on more devices.
      I guess some people could come up with more use-cases, but I wouldn't know if your question was rhetorical or not :)

    • @knofi7052
      @knofi7052 Před 4 lety

      @@gilliangoud For that use case it's much better to share your files in encrypted folders on a cloud server. You do not even have to pay for 10-15Gb storage and your files are always up to date for all of your devices.

  • @johnwashifi
    @johnwashifi Před 3 lety

    how to use it from a WAN?

  • @GMAH111
    @GMAH111 Před 2 lety

    "systemctl enable --now" in the future if you want to enable and start something at the same time

  • @liketheduck
    @liketheduck Před rokem

    Your wiki link is no longer working, fyi.

  • @nevoyu
    @nevoyu Před 3 lety

    I wonder if I can setup syncthing to operate via internet as well.... Basically set up my own internet cloud service, lol

  • @philippao8078
    @philippao8078 Před 6 měsíci

    New config folder (~/.local/state/syncthing).

  • @juxuanu
    @juxuanu Před 4 lety +3

    Syncthing is a decentralized way to share files across devices. Doesn't your approach defeat this software's intention?

    • @TheWkd111
      @TheWkd111 Před 4 lety +2

      My interpretation of SyncThing is to "Sync Things". Now I have a file server as well and this is exactly how I would set things up to a) backup to the file server and b) synchronize all my PC's. Do you need to sync to the server? Not unless you are paranoid about losing a file, or perhaps your laptop isn't turned on all the time and you want to make sure you have a backup from your desktop. Just a different way of looking at the solution. If I had files that I just want to back up I would share them with the other machine and if I had files I didn't need to back up I would not bother with the server. I like the flexibility of Syncthing even though I haven't set it up recently, I just rebuilt most of my network and just haven't gotten around to it yet.

  • @davidterceiro
    @davidterceiro Před 4 lety

    It hurts to see someone so experienced and knowledgeable about linux, privacy and all that stuff using Chrome and google search engine
    Oh and he uses nano...

  • @MrMotoX450
    @MrMotoX450 Před 2 lety +1

    Just wasted 3 hours of my life. I have seen quite a few of your videos and really like them. But you failed to mention a major drawback to Syncthing, file ownership. I came across this video and watched the entire thing and it was exactly what I wanted. I spent about 2 hours setting this up across my servers as a Docker container, only to realize that it does not sync file/dir ownership. This makes this software almost useless. My servers do not all share the same UID/GID. And the directories that I want to share are owned by different users. For example, my www folder is owned by www-data, my .ssh folder is owned by my user. If I try to sync these across multiple servers, the ownership is not preserved and application goes down due to file permission issues and shen I try to ssh I am getting .ssh permission errors. A 10 second mention of this would have been helpful.

  • @DblDTheThird
    @DblDTheThird Před 4 lety +1

    lolz ......
    I do feel for folks that put forward the "brand" but always come a "bit short"
    as its always the case with with you Mr Jay ..... no offence .... some observations
    difference and availability of curl / wget in a chosen distribution should really not be a confusion point for a "Linux Guy"
    depth of understanding of "one's tools at hand " i.e. systemd ...if that is your "weapon of choice", should be concise and deliberate Mr Jay.....
    to that end, and for future reference "systemdctl enable --now ....desired service " would enable and start immediately on invocation ...
    overall, just as with most of your content ... you have earned a "participation reward" ... thank you for sharing your experience .. at lest you have not [as far as I'm aware started with pushing WSL 1/2 garbage promotion .. extra trawl points should you ever start that rubbish ....]
    All that said ... watching your stream never fails to put me to zzzzzzzzz...... thank you for that .....

  • @FaLLeNaNg3L82
    @FaLLeNaNg3L82 Před 2 lety

    what the hell is a Bedroom PC? - i mean who needs a PC in their Bedroom? unless you are a student and live in a 1-room-flat.

  • @robkozzu8572
    @robkozzu8572 Před 3 lety +1

    You need to tell people that your promocode is only for those who own creditcard(it is mandatory before one can use your promocode). So your promocode is not equally for all of us, to try linode. This is called false advertizing!