Hi. This is my first post and in it I will try to explain how to sync with iCloud using macOS. You do not need to use CloudKit (that was some time ago). Instead, macOS now allows you to read/write files to what appear to be folders. This has also been moved to iOS (although there is a little setup that is beyond the scope of this post).
How to Make Joplin work with iCloud on MacOS
DO NOT SKIP: READ ALL THE DIRECTIONS FIRST.
This isn’t a router where it’s literally plug and play, there are many a slip twixt the cup and the lip.
Make sure Joplin IS NOT RUNNING
Go to the Joplin file location. Duplicate the folder (it should be ~/.config/joplin-desktop). This should result in joplin-desktop copy — this is an important step because you want a back up in case things go south.
Go to “iCloud Drive” in the Finder and click on it
You should see a few folders here. Create a new one and name it Joplin
Start Joplin and go to Settings…
Go to Preferences and Synchronization
Set the Synchronisation target to File System.
Set Directory to synchronise with (absolute path) to the follow:
Replace YOURNAMEHERE with the name of your home directory (you will see a little house in Finder next to your home directory).
RESIST THE URGE TO PUT BACKSLASHES IN THE ABSOLUTE FILE PATH. IT WILL NOT WORK AND AT BEST YOU WILL HAVE TO START ALL OVER (as well as clean up the mess you created when you try to sync unsuccessfully). Trust me on this. IT DOES NOT WORK THE WAY YOU THINK IT WORKS.
In Joplin exit the Preferences and sync.
If you did it correctly, the sync will just work and you will be able to see the iCloud/Joplin folder now has stuff in it.
If you did it INCORRECTLY you will get an error on sync (ENOENT is one of many errors you could encounter) and/or all the contents of your Joplin notebooks will disappear. Yes, THAT is why I said make a back up.
ADDENDUM: There is also what appears to be a bug that if the Sync has been set up once before changing the location messes things up. It will not sync and throws a bug about the Empty flag (do NOT touch that flag — no good comes from it and you will lose data). I’m not sure how to fix it. Perhaps someone wiser than myself can address that issue.
So that is it in a nutshell.
I tested this with macOS Ventura 13.4.1 on a 2017 iMac Pro.
Please see my directions. They are a little involved but don’t require more skill than using the Finder (and knowing the name of your home directory!).
Hi Cat, thanks for the instructions. I'm looking at trying Joplin and I already have a paid iCloud account, so don't want to use/pay for another service, and I therefore want to know that Joplin will sync using iCloud before I bother investing time in it.
So will setting up sync with iCloud as you've described allow me to open notes I've made on MacOS in my Joplin iOS app? How quickly does the sync work - can you make a note on desktop and then open it up on your phone right away?
No. That requires a few build changes in the iOS version.
I believe there is a plist change that need to be made for permissions
They need to allow the iPhone app to use folders (they again are under the mistaken impression iOS apps cannot do this — they can, it just requires permission IIRC).
I have not spent the time and effort to do this because a) I am at my desktop almost all day b) when I do need note-taking it is usually for my writing so I do it with Pages c) I have more projects than I have time.
How quickly does the sync work - can you make a note on desktop and then open it up on your phone right away?
As for how fast the sync works, I moved about 18 mbytes in around seven seconds over a 60 megabit connection.
But until the iOS app is changed, this will only work with macOS (two macs can access the same iCloud).
EDIT: Making this all very user friendly wouldn’t take more than an afternoon of work by the Devs — I have literally outlined what has to happen. It’s insanely trivial. I spent five hours getting it to work (putting backslashes in the folder location REALLY screwed me up good: hence step 8. Finding and cleaning up the mess was not fun).
Damn, that's a pity. I've set up my Logseq and Obsidian to both sync across my iPhone and Mac using iCloud, and they're both using the same folder of notes - the notes are .md so both apps can read & edit the notes. From my brief research I think Joplin can also handle .md files? So actually you could use all three apps as different methods for accessing and writing your one collection of notes! (yes of course there's caveats, like you have to be careful to not edit using two apps at the same time)
Yeah, about that… What Joplin does is writes a .md files instead of copying the sqlite file (why?). It’s not what I would have done had I designed the app. However they are not exactly the same as your standard .md file (they put in their own meta-data as well as other non-standard things).
So you MIGHT be able to read those .md files, but I think you will be surprised at the results.
EDIT: Technically, it would be trivial to access these files and turn them back into “normal” .md files. What you might lose is the folder hierarchy (I didn’t dig deep enough). Now if they will just let my iOS app talk to the iCloud folders, I would be happy.
I read all the posts under that topic and the conclusion is : sync Joplin either iCloud is not easy on macOS, quite impossible on iOS, and in the trial you may lose you data.
That’s not really good. As I sync lot of apps with iCloud, and I pay for that, I really would like to think all my Joplin app this way. Joplin is now the only reason I maintain a very old Dropbox account that I would shutdown.
Please, someone in the dev team can do something about that ? Is it ideological (but why authorize OneDrive then)?
Can we have an explanation on this ?
Thanks in advancs
I think there's just not enough interest in it so no developer is willing to add this. Since that was discussed someone added S3 sync for example because that's more popular. If someone wants to add iCloud sync I'm fine with it, but so far nobody tried as far as I know.
This is where I disagree with the devs. The design on macOS is radically different than it is on iOS. Why? No idea. I, personally, dislike reinventing data storage. It results in, well, this kind of problem. People wanting to use iOS or iPadOS with macOS and not being able to share.
Had I designed it, there would be no difference. Locking the files would be trivial (you only need to lock and unlock during changes). Yes, it does require a little more thought (for example, attempting lock at the same time requires another read to see who actually got the lock — yes it is a race condition that is easily resolved and becomes a “so what?”) I’ve designed and implemented real time kernels and race conditions CAN be handled. Truly.
Now, if you wanted to go a different route, I’m sure there are packages designed for databases that exist in the cloud (not my cup of tea). My only guess is that no one wants to take on the responsibility of writing the conversion code to fix this. Fair.
It’s not that it can’t be done, there are no technical roadblocks that prevent it, it just takes a willingness to decide, “Okay, we’re going to fix this once and for all land when we are done, EVERYONE can read and write regardless of the hardware they are using”
I think hardware (i.e. platform) isn't the same as cloud storage which (in most cases) can be accessed using different platforms. That's especially true for Joplin as it doesn't require a OneDrive client (for example) because it connects directly to this particular service.
But I agree: The fact that it works with Dropbox and OneDrive, but not with iCloud seems rather arbitrary. It does work with a universal standard like WebDAV, however. Well, maybe this standard isn't as universal as it should be when I read the reports of problems with various implementations of WebDAV on this forum...
I just followed the step by step instructions, and the sync worked on the first try - thanks @feloneouscat !
2 comments just in case for others:
a) the comment about BACKSLASHES - I had to ponder a few times, but this is referring to the space character in the path "Mobile Documents", which in a terminal needs the backslash escape, "e\ D" in the path. I followed the instructions and did NOT add the backslash and all worked as described.
b) After creating the iCloud sync (from 1st MacBook Air M2 Ventura), I went to a fresh installation of Joplin on an older Intel mac (2015 MacPro Monterey), downloaded, followed the instructions above again (except I didn't make a copy of the empty .config/joplin-desktop), but I set the Synchronization target to File System with the same path, clicked sync, and my notes that I sent up to the cloud came down to my 2nd mac. I can also see notes syncing back and forth between both macs (at the timed interval as well as when I "Synchronize" manually).
Very nice - this syncing is also critical to my workflow (working on a laptop and desktop depending on in office or work-from-home).
I'm testing out Joplin to see if this may become my standard note taking app for typed notes. The syncing was essential so I was glad to find this very easy way to use iCloud.
Hi everybody,
I followed the instruction for iCloud sync. On Mac 1 it works, data went into iCloud and synced.
On Mac 2 I did basically the same, opted for synching as file system. The notebooks were synced, but now Joplin is always crashing, when I am not in safety mode.
Synching works in safety mode.
Does anybody have an idea what could be wrong?
Joplin crashed and shows only notebooks between A-D, after E nothing. Then a bit later the error message: Window is unresponsive appears.
I installed the latest version of Joplin. Only the MacOS Joplin plugin is active.
Thank you
Edit: I removed the macOS plugin. Now Joplin does not crash , at least for the moment