Skip to content

Syncthing

Syncthing is a continuous file synchronization program. It’s free to use.

  • When using the web interface, I highly recommend setting a password. Your browser can remember it for you, and it prevents other people using your machine or network from accessing Syncthing.
    • The web interface seems to listen on 0.0.0.0 by default, meaning you can set up Syncthing on your machine and then access it via IP_ADDRESS:8384 from any other machine on your network.

Seeing your own Syncthing activity

Section titled Seeing your own Syncthing activity

Click “Recent Changes”: Pasted image 20240206090649.png

You’ll see all of the modifications you made that get synced: Pasted image 20240206090724.png

moussx said this over Discord (reference):

I’ve just watched the Obsidian video and the section about handling conflicts with syncthing. I’ve had the same issue with logseq, and Adam mentions in his notes that he resolves conflicts in VSCode, but someone thought "it’s a boring task" and made a script to do it: [https://gist.github.com/solarkraft/26fe291a3de075ae8d96e1ada928fb7d](https://gist.github.com/solarkraft/26fe291a3de075ae8d96e1ada928fb7d) basically it:
- listens for filesystem events in the vault
- finds conflicted files using a pattern on filenames (that’s the logseq specific part that can be adapted)
- runs `git` locally to merge all conflicts when its algorithm finds compatible changes
I run this on my "always on" syncthing node (in a "small" docker image), and since I’ve done this the number of conflicts I need to manually deal with went down to zero basically. Just wanted to share the tip, maybe someone else will be interested. Also might fit the code jam theme if someone wants to add extra fluff to the basic script, but it might be too late for ideas

I tried this myself:

  • Save this as main.py
  • Make requirements.txt alongside it with the word watchdog as its only contents
  • python3 -m pip install -r requirements.txt
  • cd YOUR_NOTE_DIR
  • python3 /path/to/main.py
  • Then, for any existing conflict files, you need to touch them
  • At this point though, the script didn’t do anything since there were no back-up candidates found, which I assume requires some Syncthing option to be set .
  • brew services start syncthing
    • (note: brew info syncthing will show you this command)