Update 2023: Starting August of 2023, Joplin has supported Apple Silicon Natively! Downloads are available at their GitHub page. Due to this, the following post will no longer be updated.

While there are no Joplin ARM apps for desktop, it possible to compile it yourself. With Joplin being based on Electron it has the capacity to run on Arm processors, the main hurdle is lack of prebuilt binaries for Joplin desktop. This article will go over the process needed to compile one for M1 Macs.

For those who don’t know, Joplin is a multi-platform note taking app available for Windows, Linux, iOS, Android, and Mac. Unfortunately, Arm64(Aarch64) is only available for mobile OSes, leaving out a chunk of Chromebook, Raspberry Pi, and Mac users.

I discovered that there are instructions for how to compile for Arm Linux, but none for Mac. Hopefully this will fill in the gap for those with M1 and future Apple CPUs.

Note: This has only been tested with a M1 Mac running Ventura. Additionally this guide has not been updated since August of 2023.

1) Install Homebrew and dependencies

Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Joplin Dependencies

brew install cocoapods
brew install python
brew install vips
xcode-select install

Ensure node / npm / yarn is up to date

node -v, npm -v, yarn -v

As of writing, I successfully compiled with these versions:

Node: v18.17.1

Npm: 9.8.1

Yarn: 3.6.3

2) Prepare Files

Clone Joplin repo

git clone https://github.com/laurent22/joplin.git 
cd joplin

Change target architecture

You will need to update a couple .json files to change the target arch from x64 to arm64 in app-desktop/package.json. See: this PR for what to change

Install npm packages

# Enable codepack for Node/Yarn
corepack enable
npm install sharp
npm install Keytar —build-from-source ## For some reason npm will throw errors if not done beforehand
# npm install -g @dennisameling/keytar-temp@7.4.99 ## Alt keytar if above does not work
# npm install sqlite3@4.1.0 —build-from-source ## Might not be necessary, run if build fails in step 3

Set npm config flags

export npm_config_arch=arm64
export npm_target_arch=arm64
export sdkroot=macosx
npm config set python python3 ## sqlite3 errors if not set beforehand

3) Running Joplin

Build Joplin

yarn install
cd packages/app-desktop
yarn start 
# if it runs successfully, time to package
yarn run dist --publish=never --mac --arm64

Optional: you may also run yarn test to run Joplin’s built-in unit tests to check stability.

Delete old install

There will be conflicts if you don’t delete the old x64 install of Joplin.

In order to uninstall it, move the previous joplin.app to the trash. Then delete the data folder.

# Delete Joplin data folder: make sure you backup everything you need beforehand
rm -r ~/.config/joplin-desktop

Install new dmg

A .dmg file should be in joplin/packages/app-desktop/dist as generated by yarn run dist command. Extract it and run it as you would the normal x64 binary.

Open activity monitor to verify that it is using the right CPU architecture. If all goes well, you should see Joplin’s CPU type being “Apple” instead of “Intel”.

Updating Joplin

When the Joplin app notifies you of an update, you will have to repeat the above process. Run git pull origin to fetch the latest changes, then rebuild using yarn. Additionally if using the End-to-End encryption feature, you may be prompted about Joplin storing it’s master password securely in your Mac’s keychain. If so, click always allow.

Conclusion

joplin-cpu-screenshot

Having used this for over a year, I have yet run into any problems so far, but keep in mind that no guarantees are given. Since this is not actively supported by the official project, don’t pester Joplin’s maintainers with any errors encountered in the process. If you do notice anything wrong, share the issue on GitHub, and I can try and help.

Note: due to Apple’s strict notarization and code-signing, shared prebuilt binaries will fail to boot unless you compile them yourself.

I provide my personal unsigned binary on my GitHub. This won’t work out of the box, but was informed it can be as simple as removing the Quaratine flag once downloaded using xattr -d com.apple.quarantine <path to joplin.app> (Thanks Isaac for the tip).

Troubleshooting

  • Make sure your NodeJS arch is ARM64: node -p "process.arch".
  • Be sure to read through yarn error logs from start to finish.
  • Macs sometimes have a bug that cause it to throw enotempty errors. A possible fix is running: ulimit -Sn 4096.
  • Between failed attempts: Try deleting all node_modules folders. rm -rf node_modules, and then run npm i --package-lock-only to update packages.
  • Run npm audit fix, npm run clean, and other commands listed in the Joplin troubleshooting repo.

If all fails, feel free to contact me if you need any help, and I’ll try to respond as soon as possible.