Sync Mac/PC and iOS using Syncthing + Möbius Sync

@PaulDickson Thank you for taking the time to put this together. I adapted slightly to sync between a Mac mini, Chromebook, iPad and iPhone and it works perfectly with macOS in place of your server

1 Like

That’s great to hear @northerncyclist - thank you for letting me know it’s working well with all your devices.

I was surprised at how easy it was to get everything working

The sync-conflicts in the .json config files was the only annoyance but at least syncthing keeps both copies so it’s easy to compare once everything is setup

For those who don’t want to use Mobius another option is Synctrain. I stumbled across it a little while back and it’s now available on the iOS app store instead of only via Testflight. I haven’t used it extensively yet or at all with Obsidian but the paid Obsidian sync isn’t working for me anymore so my plan for today is to configure Synctrain with Obsidian in iOS.

1 Like

Thank you Cyber Vulture will check Synctrain out :wink:

I’ve been testing with Synctrain since I made my last post and its pretty robust and very fast if you configure it properly. Unfortunately Apple limits background functionality pretty heavily but I’ve got it working the way I need it to right now. There are two keys to realtime updates for services like Obsidian. I’ve also got it working for syncing PDF annotations with Goodreader and PDF Expert and pushing any changes to my file structure using the Files app.

The first is enabling the “Watch for changes” option under Folder Settings -> Advanced folder settings -> Watch for changes for whatever folder your vault is in. The second is using shortcuts to create a pseudo-while loop to keep the sync task alive while using any app you want to sync. Here is the shortcut I’m using, if any of these apps are currently open the Synctrain “sync for awhile” shortcut runs then the shortcut calls itself recursively. I also have a shortcut to run “sync for awhile” whenever these apps are opened or closed. This seems to result in nearly real time synchronizing between my devices without any real penalty in battery life, at least with how I use my devices. I haven’t really had any sync conflicts this way as long as I’m not actively editing a file on both devices concurrently. This means waiting the approximately 5 seconds it takes for changes to propagate before editing on another device but that’s fine with me.

The recursive shortcut seems to time out after 10-15 minutes and start crashing (in the shortcuts app) if you leave a trigger app open and the screen on that whole time but realistically this isn’t a factor because whenever the device locks or you change apps the shortcut exits and reinitializes when the app is reselected.

3 Likes

How did you manage to link the Synctrain folder to the Obsidian folder? I’m only able to create a folder inside Synctrain’s sandbox, and I can’t seem to select the Obsidian folder properly.

Here’s what I’ve done:
1 - on PC, I created a folder for a new Obsidian vault, and added a test.md file in it.

2 - Shared this folder with my iPhone running Synctrain.

3 - When adding the folder above, on the “Add folder” screen, I try picking “Existing folder…”, navigating to the Obsidian folder, then inside I create a new folder.

4 - Then, when clicking “Add folder”, it creates an empty folder inside the Obsidian folder, and another folder inside the Synctrain folder, this one containing the test.md file.

I can only sync files inside the Synctrain sandbox, and I’m not sure how to sync Obsidian. I see that for Mobius, OP mentions the following:

“Add a folder, choose “Pick external folder” (this is the tricky bit), browse to the Obsidian folder, create a new folder to use (does not need to be an existing vault, Obsidian will still pick it up). This adds a “bookmark” which is a reference to the Obsidian sandbox folder. Leave the default options for now.”

Is there anything I’m missing that has to be done similarly with Synctrain?

I found a fix for this. On iOS, I had the “Require Face ID” option turned on for Obsidian, which seems to block access to the Obsidian folder by Synctrain. Leaving this option ON only seems to work with Möbius Sync, and Synctrain needed it OFF for it to work and not fallback to its own folder.

I’m not sure if this is common knowledge, but I thought I’d mention it in case someone else encounters this issue and is a bit lost.

Also, Synctrain is awesome with its “Sync for a while” iOS shortcut. I haven’t done anything with shortcuts yet, but adding the “Sync for a while” to the home screen means I only need to tap it, then open Obsidian, then tap it again once I’m done, without having to keep opening Synctrain like I did with Möbius.

Any iOS shortcut suggestions are appreciated!