the future of application distribution


The days of chasing multiple Linux distributions are over. Standalone apps for Linux are here!

Find Out How

Flatpak is the new framework for desktop applications on Linux


Distributing applications on Linux is a pain: different distributions in multiple versions, each with their own versions of libraries and packaging formats. Flatpak is here to change all that. It allows the same app to be installed on different Linux distributions, including different versions. And it has been designed from the ground up with security in mind, so that apps are isolated from each other and from the host system.

 

How it works


image/svg+xml LIBRARY LIBRARY LIBRARY SANDBOX PORTAL OPERATING SYSTEM DATA CODE APPLICATION LIBRARY LIBRARY LIBRARY LIBRARY LIBRARY LIBRARY RUNTIME (SHARED) PORTAL PORTAL

Runtimes

Runtimes contain the dependencies that are used by apps. They are always the same, whatever Linux distribution is being used. It means that apps no longer have to be updated to keep pace with distribution changes.

Bundled Libraries

Dependencies that aren't in a runtime can be bundled as part of the app. This makes it possible to use dependencies that aren't in a distribution, and to use a different version of a dependency than the one that's in a distribution.

Sandboxes

Flatpak isolates apps from the host OS as well as from other applications. This provides security for users and a predictable environment for developers. (Some of these features are work in progress)

Install and Run a Flatpak


With Flatpak, applications can be safely updated on a running system, without fear of conflicts occuring. Flatpak also allows multiple versions of the same application to be installed at the same time, which is great for testing development or testing versions. And in the future, Flatpak's security first approach guarantee greater privacy and peace of mind.

Various applications are available as Flatpaks, including stable and nightly GNOME applications, and a collection of nightly builds of graphics applications like GIMP, Inkscape and MyPaint. See the apps page for more details.

In the near future, you will be able to install flatpaks painlessly from graphical tools such as GNOME Software. Until then, you can use the commandline tool to install and update flatpaks.

1. Install Flatpak

Before you can install applications with Flatpak, you need to install Flatpak itself. Currently this has to be done using the command line. This section contains instructions for installing Flatpak on Fedora or Ubuntu. Details on how to install Flatpak on other distros are available on the getting Flatpak page.

With Fedora 23 or later, run:

$ sudo dnf install flatpak

On Ubuntu, Flatpak is available through a PPA. To install it, run:

$ sudo add-apt-repository ppa:alexlarsson/flatpak
$ sudo apt update
$ sudo apt install flatpak

2. Add repositories

Flatpak allows you to install software from remote repositories. For this example we're going to use two repositories: one which contains GNOME apps, and one which contains the runtime that provides the dependencies they need.

$ wget https://sdk.gnome.org/keys/gnome-sdk.gpg
$ flatpak remote-add --gpg-import=gnome-sdk.gpg gnome https://sdk.gnome.org/repo/
$ flatpak remote-add --gpg-import=gnome-sdk.gpg gnome-apps https://sdk.gnome.org/repo-apps/

3. Install a runtime

The runtime provides the dependencies needed by the apps in the GNOME repository.

$ flatpak install gnome org.gnome.Platform 3.20

Once this is complete, you're all set to install some apps!

4. View, install and run apps

To view which apps are available in the gnome-apps repository, just run:

$ flatpak remote-ls gnome-apps --app

To download and install an app, like gedit, run:

$ flatpak install gnome-apps org.gnome.gedit stable

Installed applications should appear in the usual place in your desktop. You can also run them from the command line:

$ flatpak run org.gnome.gedit

Get Involved


Flatpak is Free Software and is developed in the open, as a part of the Freedesktop project. To get in touch, use the xdg-app mailing list or #flatpak IRC channel on Freenode. Code can be found on Github (along with a wiki) and issues are tracked on Github Issues.