What about iCloud sync?

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.

  1. Make sure Joplin IS NOT RUNNING

  2. 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.

  3. Go to “iCloud Drive” in the Finder and click on it

  4. You should see a few folders here. Create a new one and name it Joplin

  5. Start Joplin and go to Settings…

  6. Go to Preferences and Synchronization

  7. Set the Synchronisation target to File System.

    Set Directory to synchronise with (absolute path) to the follow:

    /Users/YOURNAMEHERE/Library/Mobile Documents/com~apple~CloudDocs/Joplin

    Replace YOURNAMEHERE with the name of your home directory (you will see a little house in Finder next to your home directory).

  8. 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.

  9. In Joplin exit the Preferences and sync.

  10. 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.

  11. 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.

Cheers!