# Flatpak

[Flatpak](https://flatpak.org/) 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](/config/makers/deb.md) or [RPM](/config/makers/rpm.md) installation methods are not sandboxed.

## Requirements

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

* [`flatpak`](https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak)
* [`flatpak-builder`](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-builder)
* `eu-strip` *(usually part of the* [*`elfutils`*](https://sourceware.org/elfutils/) *package)*

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

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

{% hint style="info" %}
Flathub provides separate [installation instructions](https://flathub.org/setup) for each supported Linux distribution. Please refer to their documentation for additional information.
{% endhint %}

## Installation

```sh
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](/config/configuration.md):

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

Configuration options are documented in [`MakerFlatpakConfig`](https://js.electronforge.io/interfaces/_electron_forge_maker_flatpak.MakerFlatpakConfig.html).

## Debugging

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.electronforge.io/config/makers/flatpak.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
