Home / GitHub Page

"Missing Master Key"

Unfortunately, my notes have all disappeared, I moved my joplin sync folder into a different directory and then my notes all disappeared in the client, I changed the directory in the settings to the new directory but my notes were still gone, the client appears to have synced and made my sync folder empty, however luckily I backed up this sync folder in a drive so I have a copy but I’m not sure how to import the notes again.

I import the MD directory but all the notes are shown encrypted, and in the encryption settings it says the masterkey is missing, but I have a file with the same name as the masterkey .md in that directory yet it still says missing.

Was I correct to backup the joplin folder (that contains a bunch of md files and a resource and sync folder) or are my notes not in this? There are 59 files in it so I’m guessing they are my notes that are encrypted, or are all my notes gone? Also I’m using linux mint

Well, it’s a month later but if you’re still looking for an answer…

if you have a populated joplin-desktop folder – which does contain the tmp and resources folders, along with the database.sqlite file, which is perhaps more important that the md files – then running joplin should open up the sqlite database file and you’d be golden. But I think the sync of the empty sync folder killed the local DB. File System sync is dangerous if the sync destination goes missing, the notes go, too. Copiously documented and many threads about it. Wouldn’t be my choice, but I understand the logic of it.

Also, I don’t think the joplin-desktop folder contains .md files (unless you’re using an external editor and then they’re temporary and named edit-*.md). To me, it sounds like you have/had the same folder for the desktop files and as the sync folder. Probably not the best idea.

There is a way to manually decrypt individual md files from the comandline, but that’s time-consuming and if you have a copy of your sync folder and your notes are in there, this is simple…

  1. make another copy of that sync directory, “just in case”.
  2. you need to have a completely empty local folder: ~/.config/joplin-desktop
  3. when you start up joplin, it will see the empty folder and re-create the “intro” notebook and notes.
  4. immediately, go into settings and enter in the CORRECT sync folder.
  5. ctrl-S to sync
  6. you should see the notes sync in. since you’re using encryption, they will show “encrypted” everywhere.
  7. Tools | Encryption options, enter in your password for the master key, click Save.
  8. On that screen, it will show the decryption counts in real-time as they’re processed.
  9. Click Back and you’ll be back at the home screen with, hopefully, all your notes restored.