Electron Forge
  • Getting Started
  • Importing an Existing Project
  • CLI
  • Core Concepts
    • Why Electron Forge?
    • Build Lifecycle
  • Configuration
    • Configuration Overview
    • TypeScript Setup
    • Plugins
      • Webpack Plugin
      • Vite Plugin
      • Electronegativity Plugin
      • Auto Unpack Native Modules Plugin
      • Local Electron Plugin
      • Fuses Plugin
    • Makers
      • AppX
      • deb
      • DMG
      • Flatpak
      • pkg
      • RPM
      • Snapcraft
      • Squirrel.Windows
      • WiX MSI
      • ZIP
    • Publishers
      • Bitbucket
      • Electron Release Server
      • GitHub
      • Google Cloud Storage
      • Nucleus
      • S3
      • Snapcraft
    • Hooks
  • Built-in Templates
    • Webpack
    • Webpack + Typescript
    • Vite
    • Vite + TypeScript
  • Guides
    • Code Signing
      • Signing a Windows app
      • Signing a macOS app
    • Custom App Icons
    • Framework Integration
      • React
      • React with TypeScript
      • Vue 3
    • Developing with WSL
  • Advanced
    • Auto Update
    • Debugging
    • Extending Electron Forge
      • Writing Plugins
      • Writing Templates
      • Writing Makers
      • Writing Publishers
    • API Docs
Powered by GitBook
On this page
  • Requirements
  • Installation
  • Usage
  • Debugging

Was this helpful?

Edit on GitHub
  1. Configuration
  2. Makers

Flatpak

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

PreviousDMGNextpkg

Last updated 11 days ago

Was this helpful?

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:

  • eu-strip (usually part of the package)

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

Flathub provides separate for each supported Linux distribution. Please refer to their documentation for additional information.

Installation

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

Usage

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

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

Debugging

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

Configuration options are documented in .

Flatpak
flatpak
flatpak-builder
elfutils
installation instructions
Forge configuration
MakerFlatpakConfig