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

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!

3 Likes

Mac + iPad + Android phone here. Syncthing-Fork’s worked wonderfully for Mac + Android, adding in an iPad has complicated things.

Mobius Sync Pro + the instructions here have got me partway. My issue is that on iPad, the external folder sync can only upload files to the “root” external folder (e.g. On My iPad/Obsidian) and not to a folder inside the external folder (e.g. On My iPad/Obsidian/Vault1). This is undesirable, b/c Obsidian on my iPad sees every folder in my vault as its own, separate vault.

My current workaround is to move all my vault’s contents into an intermediary folder (e.g. middleman), and finally the vault structure’s preserved on iPad. That vault on iPad takes that folder’s name to be the vault name though. It’s annoying to have an extra folder in the filepath only on some devices (e.g. Vault1/middleman/note1.md on Mac & Android, middleman/note1.md on iPad), but better than a broken syncing.

If there’s a cleaner solution it’d be much appreciated :folded_hands:

I’ve used these Syncthing solutions on iOS before and I always run into the same problem. iOS/iPadOS will eventually completely freeze any app running in the background unless you bring it to the foreground every once in a while. I use Moebuis Sync for years, and don’t really have a need to ever open it once I set it up. But eventually the OS will freeze the app, and it wills stop syncing. Sometimes it happens in the next day, sometimes it happens in a few days, sometimes it happns in a week or two. It’s very random.

My workaround was to create a Shortcut to pop the app twice a day (7:30 AM and 7:30 PM). This seemed to keep it running in the background, but the syncing was always still random.

Another shortcut I tried was to create a Shortcut that opens Moebius sync, waits 15 seconds and then opens Obsidian.

Both of these also solve the problem with Moebius Sync not running after you reboot your device.