Sync vault between Mac and iPhone using iCloud+

Hello Obsidian community,

What I’m trying to do

My name is Adam, and I have been using Obsidian for several months on my MacBook Pro (2021 M1 chip model).
Recently, I decided to buy iCloud+, and host my Vault on there, so that I could access it from my iPhone (13) as well, instead of using the Apple Notes app on the iPhone, and Obsidian on Mac (creating a shared space for all my notes).
I almost got it working, but I have encountered a Problem.
I have spend quite a lot of time trying to figure this out by chatting with AI, and watching youtube videos, but wasn’t yet able to fix it. I hope someone more experienced than me will be.

Below I try to give a detailed and clear explanation of the current state, The Problem, and Things I Have Tried.
I would have attached more pictures but the forum limits me to just 5 since I am a new user.

Current State:

Vault & Folder Structure & Location

My vault is called ‘Adams_Vault’, and inside are various subfolders, like WORK, School, Training, Other, etc…

Finder View On Mac

In my iCloud Drive folder in the Finder app, I have a folder called ‘Obsidian’, with the logo on it.
This ‘Obsidian’ folder was created automatically, apparently because that’s the only way that the iPhone can locate the vault automatically (AI said).

Inside the Obsidian folder, there is my vault (‘Adams_Vault’), and a folder called ‘.obsidian’

When I go inside my vault, I see all the subfolders, and there is another file called ‘.obsidian’

Technical details - Mac

When I open the ‘Obsidian’ folder in the terminal, I am on this path:
~/Library/Mobile Documents/iCloud~md~obsidian/Documents

This is the tree structure of the folders:
❯ tree -L 3
.
└── Documents
└── Adams_Vault
├── 0 - Config
├── 1 - Rough Notes
├── 2 - Source Material
├── 4 - Indexes
├── 5 - Templates
├── Education
├── Hobbies
├── Other
├── Purpose
├── School
├── Training
└── WORK

This is strange, since the folder that I see as ‘Obsidian’ in Finder, appears to be ‘Documents’ in the terminal with the ‘tree’ command. And also, it appears so in Obsidian itself (see 'In App View on Mac).

Files App (system) View On iPhone

For a complete picture I describe the view of the folders on iPhone, in the Files App.

‘iCloud Drive’
Here I see just the ‘Obsidian’ folder as on Mac.

‘iCloud Drive/Obsidian’:
I see my vault folder. The ‘.obsidian’ folder is not visible here.

‘iCloud Drive/Obsidian/Adams_Vault’:
I see all my subfolders.
The ‘.obsidian’ folder is also not visible in here..

In App View on Mac

When I open Obsidian on Mac,
I see the folder ‘Adams_Vault’ as the parent folder, and underneath it are all the subfolders of my vault. The current vault, appears to be some ‘Documents’ folder, which I don’t see in Finder, however. It is probably an iCloud built-in system folder. See picture below:

In App iPhone View

On the phone, the view of the vault is exactly as it should be. See picture below:

The Problem

This is obviously not the way I would like it to be. I would like the vault on Mac to be highlighted down on the place where the name ‘Doucuments’ now is, and all the subfolders of the vault to be at root level (all parent folders, cannot be hidden). Just as it is on the iPhone. There is a mismatch between what the Mac thinks is the vault, and what the iPhone thinks is the vault.

Why This Is A Problem

I would not mind if I had to have the vault folder on the left side panel on Mac, and be able to collapse all the other subfolders, if it didn’t impair functionality. It is not a purely visual inconvenience, but also a functional one. This is why:

Explanation of The Problem - File Paths

Consider this view of a Base with one note in it (Mac):

The base is stored in ‘Adams_Vault/Education/Reading’, along with all the files that it shows (just 1 right now). The highlight shows that the filter of the base view is set to only show files in this path. And it shows them. However, when it comes to the iPhone view, it does not.
When viewed from the phone, the base is empty, see picture below:

This is because Obsidian on the iPhone, doesn’t recognise any folder named ‘Adams_Vault’, since that is the name of vault itself. Hence, it doesn’t show any notes. This Problem makes me unable to effectively work inside the vault on both the Mac and the iPhone.

Further Context

Faded Folders:

As you could see in the first three pictures all the folders inside the main ‘Obsidian’ folder are faded out. I am not certain why this is the case, but ChatGPT told me that it is because the ‘Obsidian’ folder is created for / by the iPhone, and isn’t compatible with Mac well (or something along those lines). When I try to ‘Open folder as Vault’, I literary don’t see the vault folder inside ‘iCloud Drive/Obsidian’. See picture below:

Right now, I presume this is tied to the issue itself, and will go hand-in-hand with fixing The Problem.

Two ‘.obsidian’ folders

I am aware that I have duplicate ‘.obsidian’ folders, one under ‘Obsidian/’, and one under ‘Obsidian/Adams_Vault’. One of them is surely being created automatically, when I was moving the vault folder (Adams_Vault) in and out of the ‘Obsidian’ folder, during repeated attempts to make it unified on both devices.
Right now, I decided not to touch them further, until I receive external advice.

Further Problems – Not Yet

The Problem which I have described above, is likely just a symptom of a deeper cause. I have some other issues as well, but I don’t want to dive into describing them.
I believe that if we can focus on solving this one problem, we will reveal the root cause, which will solve all the other ones as well.

Things I Have Tried

Vault Relocation

I tried moving the vault around in various different ways. I never reached a location that would fit both the iPhone and the Mac. Either it was like this (like the current state), or there was a second situation that I encountered:
I moved all of the contents of my vault (WORK, School, Training, etc…) directly inside the ‘Obsidian’ folder. That then worked on Mac, but on the phone, each of the subfolders appeared as a separate vault (obviously not the goal).

‘.obsidian’ folder relocation / recreation

I tried to move the ‘.obsidian’ folder around, and even deleted it and created anew. I learned that the latter was a mistake, when I opened the vault and all of my plugins were gone (thankfully, I use just 2 so far so that doesn’t take long to set up).
I know that the ‘.obsidian’ folder is crucial to this whole problem, but I don’t know what I should (or shouldn’t) do with it (and maybe it’s best to leave it alone as I have gathered by now).

Form Search

I searched this forum for anything on syncing with iCloud, but found nothing which resembled this issue exactly.

I will be grateful for any thoughts or ideas from anyone, but primarily long-term, experienced users, as this has bugged me for a while and I really want to solve it :slightly_smiling_face:

Thanks in advance,
Adam.

What I think happened is that on your Mac, you opened the whole dedicated Obsidian folder as a vault, as opposed to just the relevant vault within that folder :blush:

So you basically created “nested” vaults.

The folder following this path on your iPhone:

iCloud Drive/Obsidian/Adams_Vault

… is the folder you should “open as vault” in Obsidian on your Mac.

On Mac, its path would be something like:

/Users/Username/Library/Mobile Documents/iCloud~md~obsidian/Documents/Adams_Vault

… and the normally hidden.obsidian configuration folder you should keep would be the one located under Adams_Vault.

The one you see within the dedicated Obsidian folder in iCloud, on the same level as your vault should be remove or merge with the one that probably exists already in your actual vault.
That’s probably a .obsidian folder created when you open the whole Obsidian folder as a vault :blush: .

Regarding the fact that the hidden .obsidian configuration folder doesn’t appear within the Files app on iPhone: It’s normal :blush: (there’s no way to display hidden folders/files from the Files app like in Finder on Mac)…
That folder is only visible on iPhone/iPad using a different app such as Textastic (paid) or alike :innocent: .

Now, how to solve the issue, I’m not entirely sure as you mentioned that you moved things around :sweat_smile:
All I can say for sure is that your vault, Adams_Vault (and its content, including the .obsidian configuration folder) does need to live within the dedicated Obsidian iCloud folder (the one with the Obsidian icon) to be synced between your devices.

On your Mac, you could try to close the “Documents” vault in Obsidian and re-open the correct one from the “vault manager” or selecting the option Open vault... under File in the menu bar or Open another vault in Obsidian’s command palette.
I would only do that after closing the “Documents” vault as I don’t know how Obsidian could react if you have 2 nested vaults open at the same time :sweat_smile: .

After that, you should be able to look more closely at the .osbidian configuration folders you have and keep the one under the folder Adams_Vault :blush:

Although, on your Mac, you could probably also:

  • Close the “Documents” vault
  • Quit Obsidian
  • Remove the .obsidian configuration folder appearing on the same level as Adams_Vault within the Obsidian folder in iCloud Drive
    iCloud Drive
     └─ Obsidian
         ├─ Adams_Vault
         │   └─ .obsidian     <- to keep
         └─ .obsidian         <- to remove
    
  • Open Obsidian and select the appropriate vault (using the Open folder as vault option in the “vault manager”)
    iCloud Drive
     └─ Obsidian
         └─ Adams_Vault       <- to open
             └─ .obsidian 
    

Before doing anything though, I would strongly suggest you to make a copy/backup of your vault (and its full content) … just in case :blush: !

I hope this helps you a little to get things sorted out :innocent: .

Hi Pch,

Thank you for your quick answer.
I have created a backup as you suggested.

To your point about deleting the .obsidian file, and opening the right folder as a vault (Adams_Vault).
That exactly doesn’t work. I have said it in the post but perhaps it was too long and unclear.

Steps

  1. I delete the redundant ‘.obsidian’ folder
  2. I go to ‘Open folder as vault’
  3. I don’t see Adams_Vault inside the ‘Obsidian’ folder. See the picture below:
  • This is surely because the folder appears faded in Finder, but I don’t know the cause.
  1. I can only open the ‘Obsidian’ folder as a vault, which automatically creates the ‘.obsidian’ folder again.

I have the same issue, more or leas. Frustrating that this doesn’t work better out of the box. You’d think that the two apps would look in the same place for vaults and they don’t.

1 Like

Hmmm :thinking: … That’s strange :face_with_raised_eyebrow:
(I indeed missed that info in your post earlier… sorry :sweat_smile: )

On your Mac, in the Settings > Apple account > iCloud > Drive > Apps syncing to iCloud Drive, does Obsidian appears in the list and is it enabled ? :thinking:

Would you happen to have 2 Obsidian folders in iCloud Drive ?
Is the Obsidian folder fully downloaded in iCloud Drive ?
Do you use a profile (work/school…) on any of your devices ?
(I’m mentioning this because I saw someone somewhere having issues with iCloud while using different profile but I can’t remember where I saw that :see_no_evil_monkey: )
Are you sure you’re logged in with the same iCloud account on all your devices ? (just in case :innocent: )

Have you tried creating a new empty vault in the Obsidian folder to see if both devices would see it ? :thinking:

I’m sorry, I’m a bit thinking out loud here :blush:
I’ve been syncing my vaults through iCloud since ± 2021 and never really encountered this kind of issues :sweat_smile:

1 Like

Hi, sorry for the late reply.

I tried to create a new vault on the Mac and it seems to have fixed the issue!

  • Both devices see the vault folder as they should.
  • I tested the syncing back and forth with different tasks, and it worked! It just needs some time before it syncs

So then, I just moved the contents of my main vault to a temporary location, deleted the old, created a new one, pasted the contents, and it worked!!

The timeless way of just restarting (or starting over), has fixed the issue :slightly_smiling_face:

Thank you for you time and have a great day!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.