Chapter 13. Managing Flatpak repositories in Satellite
Flatpak allows users to install, manage, and run portable applications on Satellite, primarily for desktop environments. In Satellite, you can integrate Flatpak repositories to distribute and control Flatpak applications across managed hosts. By configuring Flatpak repositories, you ensure that systems have access to the necessary application packages while maintaining centralized control over application deployment.
Flatpak repositories function similarly to other content repositories in Satellite. You can synchronize, manage access permissions, and assign repositories to specific lifecycle environments to control which applications are available to systems. You can also use Hammer CLI to manage Flatpak repositories.
For more information, see Installing applications using Flatpak.
13.1. Creating a Flatpak remote by using Satellite web UI Copy linkLink copied to clipboard!
You can create a Flatpak remote to access and manage Flatpak repositories in Satellite web UI.
Prerequisites
-
Your Satellite account has a role that grants the
create_flatpak_remotespermission.
Procedure
- In the Satellite web UI, navigate to Content > Flatpak Remotes.
- Click Create new.
- In the Name field, enter a name for the Flatpak remote.
-
In the URL field, enter the URL of the Flatpak remote. For example, to use the Red Hat Flatpak index, enter:
https://flatpaks.redhat.io/rhel/. -
If the Flatpak remote requires authentication, enter the required credentials. For example, synchronizing Red Hat Flatpaks from
registry.redhat.iorequires authentication. For more information, see Creating Registry Service Accounts. - Click Create.
13.2. Creating a Flatpak remote by using Hammer CLI Copy linkLink copied to clipboard!
You can create a Flatpak remote to access and manage Flatpak repositories by using Hammer CLI.
Prerequisites
-
Your Satellite account has a role that grants the
create_flatpak_remotespermission.
Procedure
Create your Flatpak remote:
hammer flatpak-remote create \ --name My_Flatpak_Remote_Name \ --organization-id My_Organization_ID \ --url My_Flatpak_Remote_URL
$ hammer flatpak-remote create \ --name My_Flatpak_Remote_Name \ --organization-id My_Organization_ID \ --url My_Flatpak_Remote_URLCopy to Clipboard Copied! Toggle word wrap Toggle overflow For example, to use the Red Hat Flatpak index, enter:
https://flatpaks.redhat.io/rhel/.If the Flatpak remote requires authentication, enter the required credentials. For example, synchronizing Red Hat Flatpaks from
registry.redhat.iorequires authentication. For more information, see Creating Registry Service Accounts.
13.3. Scanning a Flatpak remote by using Satellite web UI Copy linkLink copied to clipboard!
You can scan a Flatpak remote to fetch metadata about the repositories it provides. Scanning a Flatpak remote creates remote repository artifacts for the repositories hosted by the Flatpak remote. If new repositories are added to the Flatpak remote, scan it again to pull in the changes.
Prerequisites
-
Your Satellite account has a role that grants the
view_flatpak_remotesandedit_flatpak_remotespermissions.
Procedure
- In the Satellite web UI, navigate to Content > Flatpak Remotes.
- Select the Flatpak remote that you want to scan.
- Click Scan.
13.4. Scanning a Flatpak remote by using Hammer CLI Copy linkLink copied to clipboard!
You can scan a Flatpak remote to fetch metadata about the repositories it provides. Scanning a Flatpak remote creates remote repository artifacts for the repositories hosted by the Flatpak remote. If new repositories are added to the Flatpak remote, scan it again to pull in the changes.
Prerequisites
-
Your Satellite account has a role that grants the
view_flatpak_remotesandedit_flatpak_remotespermissions.
Procedure
Scan your Flatpak remote:
hammer flatpak-remote scan --id My_Flatpak_Remote_ID
$ hammer flatpak-remote scan --id My_Flatpak_Remote_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow
13.5. Viewing Flatpak remote details by using Satellite web UI Copy linkLink copied to clipboard!
You can view a list of the repositories a scanned Flatpak remote provides.
Prerequisites
-
Your Satellite account has a role that grants the
view_flatpak_remotespermission.
Procedure
- In the Satellite web UI, navigate to Content > Flatpak Remotes.
- Click the name of the Flatpak remote you want to view.
- The page displays a list of repositories available from the scanned Flatpak remote.
13.6. Viewing Flatpak remote details by using Hammer CLI Copy linkLink copied to clipboard!
You can view a list of the repositories a scanned Flatpak remote provides.
Prerequisites
-
Your Satellite account has a role that grants the
view_flatpak_remotespermission.
Procedure
View details of your Flatpak remote:
hammer flatpak-remote info --id My_Flatpak_Remote_ID
$ hammer flatpak-remote info --id My_Flatpak_Remote_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow
13.7. Mirroring remote Flatpak repositories to Satellite products by using Satellite web UI Copy linkLink copied to clipboard!
You can mirror a Flatpak repository from a Flatpak remote into an existing product in Satellite to make it available for content management and distribution.
This action creates a new repository inside the product you selected. You can now synchronize the repository to pull down its content. Flatpak repositories are container repositories and you can add them to content views like other container repositories.
Flatpak applications require a corresponding runtime environment, which the Flatpak remote also provides. To make the Red Hat Enterprise Linux 10 Mozilla Firefox Flatpak available to a host, ensure that the host can access the matching rhel10/flatpak-runtime repository.
Prerequisites
-
Your Satellite account has a role that grants the
view_flatpak_remotesandedit_flatpak_remotespermissions. -
Ensure that Flatpak runtime repositories are available to hosts alongside application repositories. Flatpak applications, such as
rhel9/firefox-flatpak, depend on the runtime for installation. - You have created a custom product on Satellite.
Procedure
- In the Satellite web UI, navigate to Content > Flatpak Remotes.
- In the list of Flatpak Remotes, click the name of the remote you want to mirror.
- In the list of remote repositories, locate the repository you want to mirror.
- Select the Mirror Action menu on the row of the repository.
- In the Mirror window, select the existing product where you want to create the new repository.
- Click Mirror.
13.8. Mirroring remote Flatpak repositories to Satellite products by using Hammer CLI Copy linkLink copied to clipboard!
You can mirror a Flatpak repository from a Flatpak remote into an existing product in Satellite to make it available for content management and distribution.
This action creates a new repository inside the product you selected. You can now synchronize the repository to pull down its content. Flatpak repositories are container repositories and you can add them to content views like other container repositories.
Flatpak applications require a corresponding runtime environment, which the Flatpak remote also provides. To make the Red Hat Enterprise Linux 10 Mozilla Firefox Flatpak available to a host, ensure that the host can access the matching rhel10/flatpak-runtime repository.
Prerequisites
-
Your Satellite account has a role that grants the
view_flatpak_remotesandedit_flatpak_remotespermissions. -
Ensure that Flatpak runtime repositories are available to hosts alongside application repositories. Flatpak applications, such as
rhel9/firefox-flatpak, depend on the runtime for installation. - You have created a custom product on Satellite.
Procedure
Mirror a Flatpak repository into your product:
hammer flatpak-remote remote-repository mirror \ --flatpak-remote-id My_Flatpak_Remote_ID \ --id My_Flatpak_Repository_ID \ --product-id My_Product_ID
$ hammer flatpak-remote remote-repository mirror \ --flatpak-remote-id My_Flatpak_Remote_ID \ --id My_Flatpak_Repository_ID \ --product-id My_Product_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow
13.9. Enabling the Flatpak remote by using Hammer CLI Copy linkLink copied to clipboard!
This procedure configures and manages Flatpak repositories by using Hammer CLI.
Prerequisites
-
Your Satellite account has a role that grants the permissions
view_flatpak_remotes,create_flatpak_remotes,edit_flatpak_remotes, anddestroy_flatpak_remotes. - Set up Flatpak. For more information, see Setting up Flatpak.
-
Flatpak applications rely on Flatpak runtimes. For example,
rhel9/firefox-flatpakdepends onrhel9/flatpak-runtime. - Ensure that runtime repositories are available to clients alongside application repositories for installations to work.
Procedure
Enable a Flatpak remote on the Satellite Server by using standalone Red Hat Enterprise Linux systems or Red Hat Satellite:
hammer flatpak-remote create \ --name=My_Flatpak_Remote_Name \ --organization=My_Organization \ --url=My_Flatpak_Remote_URL
$ hammer flatpak-remote create \ --name=My_Flatpak_Remote_Name \ --organization=My_Organization \ --url=My_Flatpak_Remote_URLCopy to Clipboard Copied! Toggle word wrap Toggle overflow You can include authentication details by using the options
--username=My_User_Name --token=My_Token.You can generate a Red Hat official token at Registry Service Accounts.
Update the Flatpak remote with authentication credentials:
hammer flatpak-remote update \ --id My_Flatpak_Remote_ID \ --token=My_Token \ --username=My_User_Name
$ hammer flatpak-remote update \ --id My_Flatpak_Remote_ID \ --token=My_Token \ --username=My_User_NameCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: List and view information about the Flatpak remote:
hammer flatpak-remote list --organization-id My_Organization_ID hammer flatpak-remote info --id My_Flatpak_Remote_ID
$ hammer flatpak-remote list --organization-id My_Organization_ID $ hammer flatpak-remote info --id My_Flatpak_Remote_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow Scan the Flatpak remote:
hammer flatpak-remote scan --id=My_ID
$ hammer flatpak-remote scan --id=My_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow List repositories in the Flatpak remote:
hammer flatpak-remote remote-repository list --flatpak-remote-id=My_ID
$ hammer flatpak-remote remote-repository list --flatpak-remote-id=My_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow Mirror a Flatpak remote repository to a Satellite product:
hammer flatpak-remote remote-repository mirror \ --id=My_Remote_Repo_ID \ --product-id=Satellite_Product_ID
$ hammer flatpak-remote remote-repository mirror \ --id=My_Remote_Repo_ID \ --product-id=Satellite_Product_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
--idin this command refers to the Flatpak remote repository ID, not the standard Satellite repository ID.You can view the repository under the selected product in Satellite web UI. Set the Include Tags field to latest.
Synchronize the Satellite repository:
hammer repository sync --id=My_Repo_ID
$ hammer repository sync --id=My_Repo_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow The
--idin this command refers to the standard Satellite repository ID, not the Flatpak remote repository ID.
13.10. Installing Flatpak applications on Satellite hosts Copy linkLink copied to clipboard!
Use the command line to install selected applications from the enabled Flatpak remotes.
Prerequisites
- Flatpak is installed on the host.
- Set up Flatpak on the content host that consumes applications from Satellite Server. For more information, see Setting up Flatpak.
-
Ensure that Flatpak runtime repositories are available to hosts alongside application repositories. Flatpak applications, such as
rhel9/firefox-flatpak, depend on the runtime for installation. - The Red Hat Flatpak remote is enabled.
- Ensure that Podman is installed on the host.
-
To install Flatpak applications from Satellite, ensure that your Satellite account has the
view_lifecycle_environments,view_products, andview_content_viewspermissions, unless the lifecycle environment allows unauthenticated pull. -
Your Satellite account has a role that grants the
create_personal_access_tokenspermission to generate an access token for authentication. The token generates automatically when you runpodman login.
Procedure
On the managed host, add your Satellite Server as a Flatpak remote:
flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci katello oci+https://satellite.example.com/
$ flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci katello oci+https://satellite.example.com/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Log in the host to the container registry using one of the following methods:
Certificate authentication
- When registering a host to Satellite or Capsule, select the Set up container registry certs checkbox.
-
If the host is already registered, run the Flatpak - Login to registry via podman job template on the host. Set Set up certificate authentication to
trueand enter the URL of your Capsule as the registry URL.
Using Podman
Log in using Podman:
podman login satellite.example.com
$ podman login satellite.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Install your application. For example, to install the Mozilla Firefox Flatpak:
flatpak install firefox
$ flatpak install firefoxCopy to Clipboard Copied! Toggle word wrap Toggle overflow Additional resources
- For more information about launching Flatpak applications, see Launching Flatpak applications.
- For more information about updating Flatpak applications, see Updating Flatpak applications.
13.11. Setting up Flatpak remote for Capsule Copy linkLink copied to clipboard!
Configure Capsule Servers to synchronize and distribute Flatpak repositories to managed hosts.
Capsules synchronize Flatpaks and make them available to all hosts, but not organizations, content views, or lifecycle environments. Clients receive the latest Flatpaks synchronized on the Capsule globally.
Prerequisites
- Synchronize Flatpak repositories to the Capsule. For more information, see Section 4.7, “Synchronizing repositories”.
Procedure
On the managed host, add the Capsule as a Flatpak remote:
flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci katello oci+https://capsule.example.com/
$ flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci katello oci+https://capsule.example.com/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Log in the host to the container registry using one of the following methods:
Certificate authentication
- When registering a host to Capsule, select the Set up container registry certs checkbox.
-
If the host is already registered, run the Flatpak - Login to registry via podman job template on the host. Set Set up certificate authentication to
trueand enter the URL of your Capsule as the registry URL.
Using Podman
Log in using Podman:
podman login satellite.example.com
$ podman login satellite.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow For more information about logging in using Podman, see Section 12.4, “Configuring Podman and Docker to trust the certificate authority”.
You might need to log in to the registry again if you have not saved your credentials.
Optional: Save your credentials permanently using one of the following options:
To save the credentials for the current user:
cp $XDG_RUNTIME_DIR/containers/auth.json $HOME/.config/flatpak/oci-auth.json
$ cp $XDG_RUNTIME_DIR/containers/auth.json $HOME/.config/flatpak/oci-auth.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow To save the credentials system-wide:
cp $XDG_RUNTIME_DIR/containers/auth.json /etc/flatpak/oci-auth.json
$ cp $XDG_RUNTIME_DIR/containers/auth.json /etc/flatpak/oci-auth.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Install your application. For example, to install the Mozilla Firefox Flatpak:
flatpak install firefox
$ flatpak install firefoxCopy to Clipboard Copied! Toggle word wrap Toggle overflow
13.12. Importing and exporting content to Satellite Server for Flatpak Copy linkLink copied to clipboard!
Use Hammer CLI to transfer Flatpak content to Satellite Server in environments with disconnected Satellite Server instances.
Prerequisites
- Enable the Flatpak remote. For more information about enabling the Flatpak remote, see Section 13.9, “Enabling the Flatpak remote by using Hammer CLI”.
- Use download policy Immediate to synchronize Flatpak content to Satellite Server. For more information, see Section 4.11, “Changing the download policy for a repository”.
Procedure
On your connected Satellite Server, export your Flatpak repository:
hammer content-export complete repository \ --id My_Repository_ID
$ hammer content-export complete repository \ --id My_Repository_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow Transfer the Flatpak repository from your connected Satellite Server to your disconnected Satellite Server. Ensure that the
pulpuser can read and write the directory and place it under/var/lib/pulp/imports/.For more information, see Chapter 9, Synchronizing content between Satellite Servers.
On your disconnected Satellite Server, import your Flatpak repository:
hammer content-import repository \ --organization-id My_Organization_ID \ --path /var/lib/pulp/imports/My_Exported_Flatpak_Repository/
$ hammer content-import repository \ --organization-id My_Organization_ID \ --path /var/lib/pulp/imports/My_Exported_Flatpak_Repository/Copy to Clipboard Copied! Toggle word wrap Toggle overflow On your host, add the disconnected Satellite Server as a Flatpak remote:
flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci katello oci+https://satellite.example.com/
$ flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci katello oci+https://satellite.example.com/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Log in using Podman:
podman login satellite.example.com
$ podman login satellite.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow Install your application. For example, to install the Mozilla Firefox Flatpak:
flatpak install firefox
$ flatpak install firefoxCopy to Clipboard Copied! Toggle word wrap Toggle overflow