Flatpak

Create a Flatpak app for your Electron app using Electron Forge.

Flatpak is a packaging format for Linux distributions that allows for sandboxed installation of applications in isolation from the rest of their system. In contrast, typical deb or RPM installation methods are not sandboxed.

Requirements

You can only build the Flatpak target if you have the following installed on your system:

You will also need to add the Flathub remote repository to flatpak to access runtimes necessary to build your application:

flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo

Installation

npm install --save-dev @electron-forge/maker-flatpak

Usage

To use @electron-forge/maker-flatpak, add it to the makers array in your Forge configuration:

module.exports = {
  makers: [
    {
      name: '@electron-forge/maker-flatpak',
      config: {
        options: {
          categories: ['Video'],
          mimeType: ['video/h264']
        }
      }
    }
  ]
};

Configuration options are documented in MakerFlatpakConfig.

Debugging

For advanced debug logging for this maker, add the DEBUG=electron-installer-flatpak* environment variable.

Last updated

Was this helpful?