Skip to main content

How to Install Flatpak on Ubuntu (Step-by-Step Guide)

In this guide we show you how to install Flatpak on Ubuntu 18.04 LTS and above to unlock a world of new and updated software via Flathub.
Recent versions of Ubuntu come with support for Snap apps out of the box — but Snaps aren’t the only universal package format on the scene.
Regular readers will have noticed an uptick in the number of Flatpak apps we mention on these very pages. Indeed, it was a reader who asked if I could put together a step-by-step guide on how to install Flatpak in Ubuntu, how to set up the Flathub repo, and how to install Flatpak apps.
The official Flatpak website has a great setup guide covering multiple distributions. The guide that follows is adapted from that, but with added screenshots, background details, and tips.

What is Flatpak?

the spotify linux app flatpak running on ubuntu
Spotify is available as a Flatpak app
Flatpak is a ‘next-generation’ Linux app format developed by Red Hat and used in Fedora.
It’s similar to Snappy in many ways: apps are sandboxed; come bundled up with everything they need to run; and support automatic updates in the background.
Because these technologies allow Linux users to install apps regardless of which distro or package manager they use, more and more software developers are choosing to distribute apps using these new methods.
Build once, run everywhere is a strong sell. Dependencies were the main headache in packaging software for different Linux distributions, something Flatpak (like Snaps) ‘solves’.
And by using OSTree Flatpak enables developers to create a complete app bundle that contains all of the dependencies, libraries and other files needed to run their program.
Because Flatpak apps are run in isolation from the rest of the system, it’s possible to run multiple versions of the same program at the same time (e.g., nightly and stable).
Flatpak apps also have to ask for permission before they can access hardware (e.g., web cam); read or open files outside of the sandbox; or use location detection technologies like geoclue. In all, Flatpaks gives you far greater control over the software you run.
So why use Flatpak? There are a few key reasons:
  • No dependency incompatibilities
  • More control over what apps can do
  • Get app updates sooner
  • Access a wider range of software
  • Get updates direct from app developers
There are plenty of other reasons why you might want to use this new-fangled app format, so feel free to expand on this in the comments section.

How to Install Flatpak on Ubuntu 18.04 LTS +

If you run Ubuntu 18.04 LTS or later you can install Flatpak on Ubuntu using the Ubuntu Software tool — though you can’t search for it by name.
Instead, hit this button:
A small prompt will appear asking you to OK the installation:
It's easy to install Flatpak in Ubuntu
Click ‘Install’ and let it do its thing!

Get the latest version

One ‘catch’ to installing the version of Flatpak available to install through Ubuntu Software is that it’s (often) out of date.
New versions of Flatpak are released regularly but these updates are not pushed out to Ubuntu users automatically.
So if you want to install the latest version of Flatpak on Ubuntu (and chances are you do) add the following official Flatpak PPA to your software sources. The PPA supports Ubuntu 16.04 LTS and above:
sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt update && sudo apt install flatpak
But you’re not done yet…

Install the software plugin

To install Flatpak apps without needing to use the command line you need to install the Flatpak plugin for Ubuntu Software:
sudo apt install gnome-software-plugin-flatpak
This plugin allows the Software app to handle .flatpakref files, which are sort of like .torrent files: they don’t contain the download itself, but where to get it from.
Which leads us on to…

How to Use Flathub on Ubuntu

Flathub is the leading app store for Flatpak apps. More and more developers are choosing both Flatpak and Flathub as a primary distribution method, making it a real no-brainer: you’ll want to add this.

What is Flathub?

Canonical’s Snappy is proving a big hit with developers and users alike. Part of its success is in its simplicity. It has a single, centralised ‘app store’ (of sorts) where devs upload their Snap apps to, and users download Snap apps from.
Snapd (the tool for installing and managing snaps on Linux) is configured to use this store by default, ensuring that every Ubuntu user has access to hundreds of apps out of the box.
The good news is that Flatpak also has an ‘app store’ of sorts, called Flathub. Like the Snap store, Flathub acts as a centralised repository that any user can install Flatpak apps from, and any app developer can add their apps to.

How to add Flathub Repo

To install Flathub on Ubuntu run this command:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
You’ll be prompted to enter your password to authorise the change.
And then… That’s almost it! All you need to do now is restart your computer so that all the necessary components lock into place correctly.
When your system comes back up you’ll be set; you have everything you need to install Flatpak apps on Ubuntu using Ubuntu Software or the Flathub website.

How to Install Apps from Flathub

If you installed the Flatpak software plugin mentioned earlier in this guide then you’re all set: you can install Flatpak apps by searching in the Ubuntu Software center.
The downside is you may find it difficult to tell which apps are Flatpaks, and which apps are Snaps or regular repo software.
Keep an eye out for the “source: flathub.org” text in Software search results:
Ubuntu Software Flatpak
You can also browse and install apps from Flathub using a web browser. Just point your browser towards the Flathub website to get started.
Here you can browse apps on Flathub based on their category (Utility, Games, etc) or search for apps by name (e.g., ‘GIMP’, ‘Spotify’, etc).
When you find an app you want to install all you have to do is click through to its store listing page and click the “Install” button (1).
You’ll see a dialog asking you which app you want to open the .flatpakref file with. Make sure that “Software install (default)” is selected (2):
open flatpakref file in ubuntu software
This will start installation of the Software:
install flatpak ubuntu software
Ubuntu Software will open up and you’ll be able to see the pgoress of  installation.
This is how you can enable Flatpak and install Flatpak apps from Flathub in Ubuntu.

Comments

Popular posts from this blog

Using Windows 7 or Vista System Restore

Windows 7 and Vista has a feature called System Restore that automatically backs up registry and system files whenever you install new software or drivers. This feature is useful when you install evil software that makes your computer run really slow. But don’t worry, System Restore won’t remove Windows Vista. Using System Restore in Windows There are two places that you can use the system restore feature from. From within Windows, you can just type restore into the Start menu search box, and you’ll immediately see System Restore at the top of the start menu: Or you can type rstrui into the search box and hit enter. Your choice. You will immediate see a screen where you can choose to roll back the system to the last restore point. You can select “Recommended restore”, and just click next, or you can choose a different restore point.   If you do choose a different restore point, you will see a list of restore points that you can choose from. How many times ...

How To Recover Passwords Using Ophcrack LiveCD

Ophcrack LiveCD 3.4.0 is a completely self contained, bootable version of Ophcrack 3.4.0 - the easiest and most effective tool that I've ever found to "crack" your forgotten Windows password. For a quick overview of Ophcrack, see my complete review of Ophcrack 3.4.0 . Ophcrack is a free software program that recovers passwords so the first step you'll need to take is to visit Ophcrack's website . When the Ophcrack website loads as shown above, click the Download ophcrack LiveCD button. Note: Since you obviously can't get into your computer right now because you don't know the password, these first four steps will need to be completed on another computer that you have access to. This other computer will need to have access to the Internet and the capability to burn a disc (like a CD, DVD, etc.). Another Note: The instructions I've put together here walk you through the entire process of using Ophcrack LiveCD to recover your password. If you...

Share Registry Editor Favorite Keys Across Computers

if you spend a lot of time inside your registry editor, you might already know that you can use the Favorites feature to add in a bookmark to a specific key in the registry, saving you immense amounts of time when you need to check a bunch of different keys. But did you think about exporting that list so you can use it on any computer? Here’s the menu I’m talking about: For instance, here I’m adding in a favorite for the local machine’s Run key, used to launch applications across all users. Now when I use the menu item, it will navigate me instantly to that key in the registry, no matter where I currently am. As I added a few favorites, it occurred to me that I should figure out where those menu items are being stored… Now browse down to this registry key to find the favorites list: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\Favorites And there’s the favorite we just saved… so how does this help you? If you export this r...