Clavem

Selling and licensing a Linux app with Stripe

A Linux app can be sold with Stripe and a license key, but the format you ship changes what works. Flathub allows paid apps under a monetisation policy, Flatpak blocks the network until you ask for it, and a minimal desktop may have no keychain to store the key in.

Which format you ship decides the answer

There is no single Linux store, so there is no single answer. Here is how the common formats affect licensing.

Format Who delivers updates What it means for keys
Flatpak on Flathub Flathub Allowed under its monetisation policy; the app needs the network permission; you cannot gate the update itself
AppImage or tarball from your site You Full control: gate downloads on the key and check for updates yourself
.deb or .rpm from your own repository The package manager The repository is public unless you restrict it; a key check in the app gates features
Snap, distro packages The store or distribution Check that store’s terms for paid apps first; a key check in the app still works

The Flathub rules are the most specific. Its requirements apply a monetisation policy to any app that “directly requires payment from the user”, which includes buying the app and paying for features. Under it, the paid benefit must be clear and not trivial, the terms must be disclosed up front, and reviewers must be able to test the app’s full functionality during review. A trial build, or a review key you supply, is one way to meet the last point. Donations are excluded from the policy.

What is specific to Linux

Network access in a Flatpak. Flatpak’s documentation lists “no access to the network” among the default restrictions of its sandbox. Add the network permission to the manifest. A missing permission looks like a server outage from inside the app, so test activation in the sandboxed build, not only from your terminal.

No guaranteed keychain. A GNOME or KDE desktop usually has a secret service, but a window manager on its own, a server or a container may not. Try the secret service first and fall back to a file in the user’s config directory with mode 0600. Say so in your privacy notes.

No dependable hardware id. Machine identifiers differ by distribution, by container and by sandbox. A simple and reliable choice is a random id that your app generates on first run and keeps next to the license. Send it as fingerprint. Reinstalling the app without removing its config keeps the same seat; wiping the config takes a new one, and the customer frees the old seat on the device page.

Users who dislike licensing. Many Linux buyers will read your code and your network traffic. Say what you send: the key, a device name and a fingerprint, nothing else. Offer a trial long enough to judge the app, and make offline use work, which signed tokens allow.

Headless and remote use. Your app may run over SSH, in a container or on a server with no display. Offer yourapp activate KEY on the command line as well as a dialog.

Setting Suggested value Why
License type Perpetual with paid major versions, or a subscription Matches what Linux users already pay for in other tools
Device limit 3 Workstation, laptop, and a machine that gets reinstalled
Trial 30 days or a feature-limited free tier Linux buyers want to test for longer before paying
Updates Releases endpoint for AppImage and tarball; the store for Flatpak You cannot gate an update that Flathub ships

Doing this with Clavem

Create a product, connect Stripe and map the Stripe product. After payment, Clavem issues the key, emails it and publishes an order page where the buyer downloads your build. Upload each file with a platform label such as linux, and let your app ask for the latest release with GET /v1/releases/:productId/latest?platform=linux and the key in the X-License-Key header. A valid key returns a signed download link that lasts one hour.

Licensing code for Linux apps is usually written in Go, Rust, Python, C++ or Qt. The Go guide and the Rust guide show validation with Ed25519 verification; the offline page explains the token fields. If you ship the same app on other systems too, start from desktop apps.

Guides to follow

Questions

Does Flathub allow paid apps and license keys?

Flathub's requirements include a monetisation policy for apps that require payment, including paying for features. The benefit must be clear, terms must be disclosed up front, and reviewers must be able to test the full functionality. Read the current policy before you submit.

Will a Flatpak app be able to reach the License API?

Only if its manifest grants network access. Flatpak's default sandbox has no network, so add the network permission, or every activation and validation call fails.

Sources

  1. Flathub requirements, monetisation policy (checked November 2026)
  2. Flatpak sandbox permissions (checked November 2026)