Sync Obsidian Vault Across Apple Devices Using iCloud

December 31, 2022
obsidian note-taking icloud productivity

How to set up Obsidian and sync across iOS and MacOS using iCloud Drive?

  1. Start on iOS
    1. It’s important to start on iOS instead of MacOS. as you cannot choose the location of the vault in iCloud Drive.
    2. Create a new Obsidian Vault and choose “Store in iCloud”. You can name it anything. I chose Notes for simplicity.
    3. This creates a new Obsidian directory in iCloud Drive where Obsidian notes and config files will be stored. The directory can be found using the Files app. In the Files app, go to “iCloud Drive -> Obsidian”. You’d find the vault name as a directory. If you used the example above, it would be “Notes”.
  2. Move on to MacOS
    1. Ensure that your iCloud drive has completely synced and the Obsidian directory created from iOS is now present in your MacOS file system. This will be located in ~/Library/Mobile Documents/iCloud~md~obsidian/Documents
    2. Open Obsidian app on Mac, and open the Vault you created above.

At this point, Obsidian is good to go. Read on for additional set up to be able to access notes easily from the terminal.

Given that Obsidian uses plain markdown files, I want to have the ability to interact with the file system directly in a terminal. For example, I would like to easily copy markdown files, or cat the content of a note to clipboard. It is not very easy to work with iCloud drive path because it is deeply nested in ~/Library. To make life easy, we can create a symlink in the home directory, called ~/Notes.

ln -s ~/Library/Mobile\ Documents/iCloud\~md\~obsidian/Documents/Notes/ ~/Notes

Now we can easily interact with the files in ~/Notes directory.

I have an existing vault in iCloud, how do I sync with iOS?

If you have an existing vault stored in iCloud, it might seem challenging to share it with iOS because the Obsidian app on iOS does not allow you to create a vault from an existing iCloud directory.

You can work around this by following the same step above to create a new vault from iOS. Once the vault directory is synced to MacOS, you can easily move the content from the old vault directory to the new vault directory.

mv path/to/old/vault/* /path/to/new/vault

Going Mouseless - Mastering the Keyboard for Productivity

Tools and techniques to be productive using only a keyboard.
hack vim keyboard mouseless productivity