Using My Documents Folder with Obsidian
I recently started using Obsidian, and I wanted to acheive a seemingly simple goal – to point it at my Documents folder on my Mac and iPad. I really wanted the simplicity of having a single area for things rather than multiple areas to manage. As usual, it turned out to be more involved, but I was able to get it working.
I was using the iCloud Desktop & Documents Folders option to keep all the contents of my Documents folder in iCloud. At first, I thought I could just point Obsidian to my Documents folder as-is. That worked on macOS, but not on the iOS or iPadOS apps. It appears those are restricted to only access the Obsidian iCloud folder.
After some thinking, I figured out how I could make it work. It's pretty simple, and it still keeps my Documents folder saved in iCloud.
- Disable the Desktop & Documents Folder iCloud option
- Copy existing iCloud Documents to my local Documents
- Move my local Documents folder to the Obsidian iCloud folder
- Link my local Documents folder to the one I moved into Obsidian
Step 1 is done by going to your iCloud settings in macOS and de-selecting the option. Here are the terminal commands for the other steps. They assume that you don't already have an Obsidian vault named Documents.
cd ~ # sync iCloud Documents to local Documents rsync -av ~/Library/Mobile\ Documents/com~apple~CloudDocs/Documents/ Documents/ # allow moving / removing the Documents folder chmod -a 'group:everyone deny delete' Documents # move current documents to Obsidian's iCloud Drive area mv Documents ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/ # link Documents to the new location ln -s ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Documents .
I've been running this way for a few days, and so far it's working out exactly as I'd hoped. When I create a new project folder, it's immediately available for Obsidian notes, Terminal work, Finder, and anything else I want to use.