Choosing a format
Most upstreams publish the same release several ways. Pick one download, and the runtime follows from what that download brings with it.
Prefer the tarball (or zip). It is the build upstream made to run from its
own directory on any distribution, so it unpacks into one tree that works where
it lands. A .deb is the next choice: usually the same files, laid out for a
distribution. An AppImage carries the most with it and needs an extra tool to
open, so it comes last, with one exception: Qt apps, where the AppImage is
often the better choice.
| Format | Unpack | Runtime it usually needs | Page |
|---|---|---|---|
| tar / zip | bsdtar |
Whatever the app links: freedesktop for Electron and self-contained builds, GNOME for GTK and WebKitGTK | Tarballs and zips |
.deb |
bsdtar twice |
Same; GNOME for Tauri | Debian packages |
| AppImage | appimage-tools from prebuilt |
freedesktop: it brings its own toolkit | AppImages |
.rpm |
bsdtar |
Same as .deb |
Debian packages |
The Qt exception
A Qt app’s tarball or .deb is linked against a system Qt, so it needs
org.kde.Platform. That is a large runtime most users don’t have, and few
apps in the catalog use it. Worse, a Qt binary built for a distribution often
crashes on the KDE runtime’s Qt (see the details below). If upstream also ships
an AppImage that carries its own Qt, unpack that instead and run it on
org.freedesktop.Platform: nothing Qt comes from the runtime, and the app needs
only the small base every Flatpak user already has.
The reference package is Decodium (Qt 6); its manifest and unpack script explain each choice.
For agents
Choosing the runtime
| The payload | Runtime | Examples |
|---|---|---|
| Electron or another bundled Chromium | org.freedesktop.Platform 26.08 + base: org.electronjs.Electron2.BaseApp |
Folo, Electerm |
| Self-contained (its own toolkit or Qt) | org.freedesktop.Platform 26.08 |
Mark Shot, Compass |
| GTK 3/4, libadwaita, WebKitGTK (Tauri, Wails) | org.gnome.Platform 51 |
Tabularis, Grab |
| Linked to a system Qt, no self-contained build | org.kde.Platform 6.11, only after testing |
HeidiSQL |
| IDEs, editors, coding agents, and other development tools that run git or a toolchain | The Sdk matching the Platform above: org.freedesktop.Sdk, org.gnome.Sdk or org.kde.Sdk (below) |
Claude Desktop, Trae CN, Cline, OpenModelica |
Find what the binary links before choosing: unpack the download and run
readelf -d <binary> | grep NEEDED on the main binary and its bundled
libraries. Every NEEDED library has to come from the runtime, the
payload, or flatpark/prebuilt. Choose the smallest runtime that covers them;
GNOME and KDE are both much larger than freedesktop, and an app is only worth
one if it uses what they add.
Development tools
An IDE, an editor or a coding agent whose features run git or a toolchain
(a repository panel, diffs, an agent task that commits, a build) takes the Sdk
that matches the Platform it would otherwise use: org.freedesktop.Sdk for
Electron and self-contained payloads, org.gnome.Sdk for GTK and WebKitGTK
(Tauri) ones. The Platform runtimes have no git; the Sdk ships it, with
ssh, python3, make and the compilers, inside the sandbox. Tools from the
Sdk work the same on every host and need no permission to leave the sandbox.
The freedesktop one is shared with VS Code and the other freedesktop 26.08
development packages, so most users already have it, and the larger download
is worth it for an app that uses these tools. An app that doesn’t stays on the
Platform.
Such a package:
-
doesn’t bundle its own
git(from Debian packages or elsewhere): the Sdk’s is maintained, and works on both architectures; -
doesn’t write a host bridge: no scripts on
PATHthat forward commands throughflatpak-spawn --host, and no--talk-name=org.freedesktop.Flatpakfor that. A bridge makes the app’s tools whatever the host happens to have, and on an Sdk runtime the sandbox’s own copies would quietly win anyway (running commands on the host); -
grants git its settings read-only, and the host’s SSH agent, as Claude Desktop does:
finish-args: # git identity and settings for the Sdk's git. Read-only: `git config # --global` writes by rename, which a bind-mounted single file can't take. - --filesystem=~/.gitconfig:ro - --filesystem=xdg-config/git:ro # git over SSH with the host's agent. - --socket=ssh-auth
Test it through the app before submitting: open a repository in its git panel, or have the agent run a task that commits, and push to an SSH remote.
Some older packages forward every host command through a script of their own instead. They stay as they are for now and will move to the Sdk later; don’t copy them.
Why a distribution’s Qt binary fails on the KDE runtime
A Qt executable built by a distribution carries R_X86_64_COPY relocations for
QCoreApplication::self and for the staticMetaObject of QObject, QWidget
and the app’s own classes. The KDE runtime’s Qt reads and writes its own copies
of those instead of going through the GOT, so the two diverge: the process dies
in QApplication’s constructor, and once past that, qobject_cast inside the
Qt libraries stops matching — windows close as soon as they open. Environment
variables don’t reach it. A self-contained payload never consults the runtime’s
Qt and is unaffected.
HeidiSQL works on the KDE runtime because it is a Lazarus app talking to Qt
through libQt6Pas, not a C++ Qt program. Corvus works because upstream
builds its payload against the same KDE runtime.
Things to check in a self-contained AppImage
- Which Qt platform plugins it ships. Many carry only
xcb. Then use--socket=x11(notfallback-x11, which withholds X11 on a Wayland session) and--env=QT_QPA_PLATFORM=xcbinfinish-args: a session-wideQT_QPA_PLATFORM=waylanddoesn’t reach the app, and a user override still wins (environment variables). Qt 5 bundles often ship the Wayland plugin withoutlibQt5WaylandClient, which fails the same way; pin those toxcbtoo. - What it deliberately leaves out. AppImages leave the display, GL, fonts, glib and audio stacks to the host. Those are exactly what the freedesktop runtime provides, which is why it is enough.
- Whether its launcher sets library paths. Some AppImages rely on
AppRunto setLD_LIBRARY_PATHorQT_PLUGIN_PATH. Read it, and reproduce the same variables in the wrapper; don’t runAppRunitself unless it is a plain shell script that only sets variables.
When upstream ships something else
- Only an installer script or
.runfile: extract what it would install without running it (many are a shell header on a tarball). If it can only be run, running it unmodified at first launch is not a change; if it only works with parts stood in for (a fakedf, a patched check), the package is Modified and closed-source only. - Only a Windows installer: packaged on top of Cellar, FlatPark’s Wine runner.
- Only source: not packageable here; see the limits.
A whole /app tree as extra-data
When a build repository builds the app’s entire Flatpak tree, the package can carry it as extra-data and stay a small shell. Five constraints shape the layout:
- In
apply_extraonly/app/extrais writable, so the tree lives there and/apppoints into it. - Nothing can be bind-mounted back onto
/app: a nestedbwrapis blocked. /app/liband/app/sharemust be real directories (flatpak-builder makes extension mount points in them); symlink their subdirectories one by one.- A 32-bit compat extension needs
/app/lib/i386-linux-gnuexactly there; the runtime’s/lib/i386-linux-gnulink is fixed. - Add the tree’s
sharetoXDG_DATA_DIRS(--env=XDG_DATA_DIRS=/app/extra/<name>/share:/app/share:/usr/share:…), or icons, GSettings schemas and MIME data inside it aren’t found.
Absolute RUNPATHs pointing at /app/lib/… are rewritten to $ORIGIN-relative
ones in the release build. The release CI should publish the layout it
produced so a pin refresh can check it hasn’t drifted.