How to install Flatpak on Fedora 36

Flatpak is a utility for software deployment and package management for Linux. Flatpak offers a sandbox environment in which users can run application software in isolation from the rest of the system.

Flatpak can be used by all types of desktop environments and aims to be as agnostic as possible regarding how applications are built.

Flatpak runtimes and applications are built as OCI images and are distributed with the Fedora registry

Flatpaks are a new way of deploying applications.

In this tutorial, we are going to learn how to install Flatpak on Fedora 36.

Advantages of using Flatpaks on Fedora

  • Applications can easily be updated without rebooting the system
  • Applications can easily be installed on Fedora silverblue
  • Flatpaks works along all supported Fedora versions
  • Flatpaks can be run by all users running on other distributions.

Prerequisites

  • Have Fedora 36 workstation up and running
  • User with sudo privileges
  • Have basic knowledge of terminal commands

Related Articles

Install Flatpak on Fedora 36

1. Install updates

The first thing for any system is to update its repositories in order to make them up to date.

$ sudo dnf update -y

2. Install Flatpak on Fedora 36

Now we can install Flatpak

$ sudo dnf install flatpak-module-tools

Check the version of the installed Flatpak

$ flatpak --version
Flatpak 1.12.7

3. Add the user to the mock group

Mock is a tool for a reproducible build of RPM packages. It is used by the Fedora build system to populate a chroot environment which is then used in building a source RPM.

To add the user to the mock group use the following command

$ sudo usermod -a -G mock $USER

Restart your system for the changes to take effect.

4. Install Flatpak runtime environment

Flatpak runs as a container in the Fedora platform, therefore we are supposed to enable remote testing on our system.

Add remote testing

$ flatpak remote-add fedora-testing oci+https://registry.fedoraproject.org#testing

Enable remote testing

$ flatpak remote-modify --enable fedora-testing

Test Flatpak

To know if it’s working try the following command.

$ flatpak install fedora-testing org.fedoraproject.Platform/x86_64/f35
Looking for matches…


        ID                                    Branch           Op           Remote                   Download
        ID                                    Branch           Op           Remote                   Download
 1. [✓] org.fedoraproject.Platform            f35              i            fedora-testing           653.4 MB / 653.4 MB

Installing… ████████████████████ 100%  130.7 MB/s  00:00

5. Enable Flathub

Flathub is an app repository in Flatpak. It’s like Dockerhub for docker images. So to install any app you want to use run the following command.

$ sudo wget https://flathub.org/repo/flathub.flatpakrepo

For some reason, the following command can work alone on GNOME and KDE Fedora installation. If it fails for some reason add Fathub remote manually with the following command.

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

6. Install the app with Flathub

Let’s look at an example of how to install an application using Flathub. Let’s install steam

$ flatpak install flathub com.discordapp.Discord

You will see the following

Looking for matches…
Required runtime for com.discordapp.Discord/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/21.08) found in remote flathub
Do you want to install it? [Y/n]: y

com.discordapp.Discord permissions:
    ipc            network       pulseaudio      x11      devices      file access [1]      dbus access [2]
    tags [3]

    [1] xdg-download, xdg-pictures:ro, xdg-videos:ro
    [2] com.canonical.AppMenu.Registrar, com.canonical.Unity.LauncherEntry, com.canonical.indicator.application,
        org.freedesktop.Notifications, org.kde.StatusNotifierWatcher
    [3] proprietary


        ID                                             Branch            Op           Remote            Download
 1. [✓] org.freedesktop.Platform.GL.default            21.08             i            flathub           131.0 MB / 131.3 MB
 2. [✓] org.freedesktop.Platform.Locale                21.08             i            flathub            17.7 kB / 325.8 MB
 3. [✓] org.freedesktop.Platform.openh264              2.0               i            flathub             1.5 MB / 1.5 MB
 4. [✓] org.freedesktop.Platform                       21.08             i            flathub           164.1 MB / 200.3 MB
 5. [✓] com.discordapp.Discord                         stable            i            flathub            80.4 MB / 81.7 MB

Installing 5/5… ████████████████████ 100%  20.1 MB/s  00:00

To run steam do the following

$ flatpak run com.discordapp.Discord

Conclusion

We have successfully installed Flatpak on Fedora 36. To learn more about Flatpak, use its documentation. I hope you enjoyed and learned something new.

About Mason Kipward

I am a technology enthusiast who loves to share gained knowledge through offering daily tips as a way of empowering others. I am fan of Linux and all other things open source.
View all posts by Mason Kipward →

Leave a Reply

Your email address will not be published.