Skip to content

Flatpak

Single-file Flatpak bundles

Currently electron-builder does not support publishing apps to Flatpak repositories like Flathub. This means the Flatpak support in electron-builder is limited to generating single-file bundles which have various limitations compared to app bundles installed from a repository.

For what it’s worth, there are some plans to make it easier to publish Electron apps to Flathub. When that happens, it should be easier to create a Flathub publisher for electron-builder (which would work similary to the other publishers).

The top-level flatpak key contains a set of options instructing electron-builder on how it should build a Flatpak bundle.

Build dependencies

The flatpak and flatpak-builder packages need to be installed in order to build Flatpak bundles.

Troubleshooting

If the Flatpak build process fails with an error message like “flatpak failed with status code X”, setting the DEBUG="@malept/flatpak-bundler" environment variable should provide more context about the error.

Enable Flatpak build debug logging

env DEBUG="@malept/flatpak-bundler" electron-builder build --linux flatpak

Configuration