r/FlutterDev • u/gumdum1975 • Oct 09 '26
Discussion How do you distribute Flutter desktop apps on Linux? Snap, Flatpak, AppImage, or .deb/.rpm?
I’m building a cross-platform Flutter app and have the other platforms sorted:
- iOS: App Store
- macOS: App Store + DMG
- Windows: Microsoft Store + installer
Linux is where I get stuck. There are so many packaging options and distros that I’m not sure where to start.
For those of you shipping Flutter apps on Linux:
- Which format(s) do you ship, and why?
- Which distros do you actually test on?
- Any gotchas with Flutter specifically (dependencies, sandboxing, auto-updates)?
Appreciate any real-world experience. Thanks! 🐧
16
Upvotes
8
u/vazark Oct 10 '26
Appimage/Flatpak is a safe bet.
As a user, flatpak on flathub would be the place I would be looking to first, since it also allows automatic updates.
7
u/KayJune001 Oct 09 '26 edited Oct 09 '26
AppImage and/or Flatpak. That’s what you’ll want to package it as if you want it just work on most distros.
I build my app as an AppImage using an Ubuntu Podman container, statically linking most dependencies, with one or two dynamically linked. Super portable, relatively low file size, not a lot of hassle. If you want it in repos and showing up in distro stores, package it as a Flatpak and put it on Flathub.
I develop pretty much exclusively on Fedora 44, Gnome 50, but test on Fedora 44 KDE 6.7 and Ubuntu 22.04.
3
u/XSM909 Oct 10 '26
we skipped all of those for now, ship a plain tar.gz and a small install.sh that puts it in ~/.local/lib (no root) or /opt with sudo. mostly because the app updates itself by swapping its own folder, so it has to live somewhere it can write. havent tried flatpak so cant say how that plays with it. its a file manager too so a sandbox would defeat half the point anyway
one flutter specific thing that bit me: old gpu drivers. on nouveau impeller drew images as dark garbage with the default FilterQuality.medium, forcing low on linux fixed it. so test on a box with an open/old driver too, not just a fresh ubuntu
2
u/sauloandrioli Oct 10 '26
Do you want your app to be available just on Ubuntu based distros or do you want it to be more accessible on other distros?
Usually, if your main goal is to be Ubuntu based, go Snap. If you want your app to run in any Linux, go AppImage or Flatpak.
I'm a Linux user and nowadays most of the apps I run are via Flatpak. I only snaps if there's nothing on flathub
2
u/source-drifter Oct 10 '26
i dont use canonical stuff. i never liked flatpack. i use appimage. download doubleclick, delete download newer doubleclick
2
u/noobjaish Oct 10 '26
Flatpak 90% of the time
deb/rpm/pkg.tar.zst 10% of the time when a Flatpak won't make much sense
2
u/EchoEllet Oct 10 '26
My application is still in MVP status, but I think Flatpak/Snap support should be taken into account from early development.
I would recommend Flatpak/Flathub. Snap is optional for Ubuntu users who don't want to set up Flathub, but most Linux desktops now default to Flatpak, including Linux Mint, Fedora, SteamOS, Pop! OS, Elementary OS, and Zorin OS.
Yes, Flathub requires apps to build without network access. All dependencies must be declared in the manifest and downloaded beforehand.
You may consider Flatpak Flutter, which helps solve this issue. Here is my Flatpak manifest.
Usually on my installed Linux distribution, but it depends on the app and its platform capabilities. You can test using WSL if you prefer Windows (keep in mind some services/APIs such as the Secret Service API won't be available, and you may need a fallback).
Generally, Flathub may require apps to use XDG Desktop portals instead of direct D-Bus access (especially when there is a portal that does what you are trying to do): https://docs.flathub.org/docs/for-app-authors/requirements#permissions
For example, if you use
package:connectivity_plus, it won't work on Flatpak without adding explicit D-Bus permission. And because there is already an XDG desktop portal for this, Flathub reviewers may be hesitant to accept your app submission. In this case, I have createdconnectivity_plus_linux_portal, which solves this specific problem.XDG Desktop Portals are designed with security and sandboxing in mind. For example, accessing the Secret Service may allow you to read secrets stored by other applications, whereas the Secret Portal gives you a master secret that you can use to encrypt secrets in a file.
If you use
flutter_secure_storageand you don't want to require users to install system native dependencies, and you want Secret Portal support, you could consider these alternatives: https://pub.dev/packages/flutter_secure_storage#alternative-implementationsDisclaimer: I'm the maintainer of
flutter_secure_storage_linux_secret_serviceandflutter_secure_storage_linux_portal, so I'm biased of course, but the general idea is similar. You can take a look at the source code of these packages and use them as a reference.See also this comment: https://github.com/TheAppgineer/flatpak-flutter/issues/104#issuecomment-4503420863
The hard part is preparing the Flatpak manifest (with an offline build) and ensuring that the Flutter plugins you use support the XDG Desktop Portals when applicable.
For example,
file_selectoruses GTK on Linux, which can use the File Chooser Portal when needed.1
u/gumdum1975 Oct 10 '26
I used snap once on a server for an app that was only available as a snap. Pretty simple process, but that's about all my exposure to it. Good point on rollouts and rollbacks, though. That's the piece the other replies said is hard to get without a store. Have you shipped a Flutter app as a snap? If so, how'd the snapcraft setup go for you?
4
u/XyploatKyrt Oct 10 '26
As a user, AppImage is usually my favourite for anything that isn't coming straight from my distro's software package manager.
2
u/SwiftScoutSimon Oct 10 '26
I just release as .tar.gz on GitHub release then host a script for user to curl and run it. You can see the raw script at http://lumide.dev/install.sh
2
u/finxapp Oct 13 '26
For Maxint, I use .deb and universal Flatpak. The latter is great many Linux users easily discovered and signed up to use the app, with no $ spent on marketing.
For testing WSL, Ubuntu, MInt and Arch.
3
u/DropbearJr Oct 09 '26
My vote is for snaps, it’s technically a great solution and well supported but some parts of the Linux community have an incredibly illogical hatred of them but you pick up the ability to distribute your app via the snap store and it handles a lot of things you probably haven’t thought about like rollouts, rollbacks, Distribution, updates etc
6
u/[deleted] Oct 09 '26
[removed] — view removed comment