$/home/emma/random

You want offline sync for Obsidian?

I know Obsidian is quite popular among users of BearBlog. No doubt some of you are using Obsidian primarily on a smartphone or tablet, and want to open the same vault on a laptop. For some reason, I'm not able to do this over a USB connection, and I don't want to use an online synching service.

I ended up using Syncthing on my laptop, and Syncthing-Fork on the Android device, which isn't the most elegant solution, as both programs need to be running to open the vault on my laptop.

The following assumes the vault we want to sync is on the Android device.

Android Setup

On the Android device, we want to install Syncthing-Fork. After opening that application, add a folder. Use 'Create Folder', give it a label, click the icon next to 'Directory' and select the directory containing all the vault's files.

Also important is the 'Ignore Patterns' field at the bottom of this screen. Add '.obsidian' to the ignore patterns - the desktop version of Obsidian cannot use the vault files if the .obsidian directory is synched.

Laptop Setup

First you'll need Syncthing. I've seen guides that recommend SyncTrayzor, but we'll go for the standard Syncthing .zip download.

Starting syncthing.exe, we get a command line program that starts a local sync server and a Web interface.

Syncthing doesn't fetch any files from the Android device unless we create the target directory using the GUI. In the Web GUI, click 'Add Folder', giving it a label and a folder path. We also want to add '.obsidian' to the Ignore Patterns field here also, because we definitely don't want that copied over.

After we click 'Save', the target directory should be ready.

Linking Devices

In the Web GUI on the laptop, click 'Actions' and 'Show ID'. A QR code should be displayed.

In Syncthing-Fork, on the Android device, go to the 'DEVICES' tab, press the Add Device button, and click the QR code icon near the top-right.

The Android device and the laptop should be linked after the QR code is scanned.

Directories

On the Android device, go back to the 'FOLDERS' tab, select the entry for the Obsidian vault, and select the laptop's name from the Devices section.

The notification should appear in the Syncthing GUI on the laptop. When accepting this, select 'Add Folder', and enter the target directory's location in the Folder Path field.

Everything should sync fine from this point.

#obsidian #sync