Snapcraft support

How about a snap package for Joplin
I think snapcraft have a good support for electron based desktop apps

AppImage is really painful, even with the provided shell script its always better to have an automated solution for updates

How about an apt repository for debian users?


I want to get Joplin running as a snap in the long run. But currently I'm already failing in building the example electron app following the snapcraft tutorial. :joy:

Here is the corresponding post in the snapcraft forum: Error on Electron example - snapcraft -

If You want to participate or have any suggestions, please let me know.

Is there anyone else here who is interested in getting Joplin distributed as a snap?

Greetings, Peter

@kornava and @onlygecko, I don't exactly remember why Snaps aren't supported yet, but there was a discussion awhile back on the forums here. I seem to recall it had something to do with a dependency that Joplin couldn't support or fulfill without breaking something, but I could be wrong.

EDIT: I stand corrected. It was the Flatpak version that was having an issue with Electron.

One possible solution is for either one of you to learn how to use Snap and create an unofficial version for those that need it or to request an official version to me made with snap package repository. I'm not on an OS that supports them but am always a proponent of getting software into as many users' hands as possible. :smiley:

My current plan is, to rebuild an existing snap of an electron app and then try to build the Joplin app. I let you know about the progress. :wink:

Awesome. I’m currently installing Ubuntu in a Virtual Machine to see if maybe I can get it figured out myself.

I did just find this

I just want to let you know that James Carroll managed to create a snap! :grinning:

sudo snap install joplin-james-carroll

Hello world!

I did manage to get Joplin going in Snap, and like everyone else, I struggled to get it going with the Electron-Builder tools and whatever else Snapcraft has actually dedicated to the problem. Fortunately I’ve done a few other Snaps so understand the rough outline of the Snap system, which makes the problem a lot easier by avoiding the Electron specific tools and just treating it as a native-like install, and piggyback on the existing NPM build system.

If upstream is happy to adopt Snap, I’m happy to remove the Snap currently versioned to my username. I think Snap makes a lot of sense for Joplin, and although it might receive less attention from the developer orientated community than Flatpak, I wouldn’t say this implies it has less support from “normal users” at all, as you can see from this graph from my builds current metrics page. That’s a nice amount of users in 10 days from an unotherwise unadvertised build.

Important considerations for Snap therefore include:

To actually claim the “joplin” package name, you’ll have to go through an authentication process on the Snapcraft forums, as Joplin is considered a reserved package that only the official developers should be able to register. Unfortunately, it’s not possible to automatically make joplin-james-carroll users joplin users.

The WebClipper extension probably won’t work, I’m not sure how trivial the fix is for this, but the KeePassXC browser extension does have a workaround that might work for Joplin (with modifications) in a Snap build too, though I haven’t looked into it.

The Chrome sandbox is disabled in my build. This is expected for Electron apps on Snap because use of the Chrome sandbox is considered privileged. It could be possible to reenable it in an official build via asking for permission on the Snapcraft forum, given the Joplin is a well known entity unlike myself and considered trustable. (The Snap sandboxing still runs as is mandatory!), this would be at the discretion of the Snapcraft admins.

The automatic update (and manual update checking) functionally is intentionally broken with a simple sed script in the build process. This is because there’s no way to update a Snap without pushing a new Snap revision, so it’s useless functionality in the Snap environment. Preferably, the UI would be updated better to reflect this.

If upstream decides this is worthy of adoption, it can make use of the Snapcraft build service hosted by Canonical to integrate with a GitHub webhook that would build and publish a Snap for every single commit, released to the Edge channel that can be pushed to the stable channel at will.

Finally, Electron hasn’t yet integrated patches that enable XDG-Desktop-Portal functionality available, as used in Flatpak, to enable arbitrary access of the computers filesystems in a secure manner. Effectively this means that by default, the snap is confined to $HOME, and cannot access USB sticks (without enabling the removable-media sandbox interface), and potentially arbitrary FUSE filesystems. When Electron integrates the patches upstream, this limitation should disappear on supporting systems.

Otherwise, I’ll keep on pushing updates myself to my unofficial build for the foreseeable future, although I’ll look into automating it at some point.