1. Access Foreman from Foreman web UI

After Foreman has been installed and configured, you can use a browser to log in to the Foreman web UI.

1.1. Log in to the Foreman web UI

The Foreman web UI is a browser-based user interface that you can use to manage and monitor your Foreman infrastructure. To access Foreman web UI, use your web browser to navigate to the Foreman web UI login page and enter your credentials.

Procedure
  1. Access Foreman server using a web browser pointed to the fully qualified domain name:

    https://foreman.example.com/
    Note

    If your browser displays a warning about an untrusted connection, the Katello root CA certificate is not installed in your browser. For more information, see Import the Katello root CA certificate by using browser.

  2. Enter the user name and password created during the configuration process. If a user was not created during the configuration process, the default user name is admin.

Next steps

1.2. Import the Katello root CA certificate by using browser

After the first login to Foreman web UI, you might see a warning that you are using the default self-signed certificate. To ensure a successful connection, locate the root CA certificate on Foreman and import it into your browser truststore.

Prerequisites
  • Your Foreman is installed and configured.

Procedure
  1. Identify the fully qualified domain name of your Foreman server:

    hostname -f
  2. Access the pub directory on your Foreman server using a web browser pointed to the fully qualified domain name:

    https://foreman.example.com/pub
  3. When you access Foreman for the first time, an untrusted connection warning displays in your web browser. Accept the self-signed certificate and add the Foreman URL as a security exception to override the settings. This procedure might differ depending on the browser being used. Ensure that the Foreman URL is valid before you accept the security exception.

  4. Select katello-server-ca.crt.

  5. Import the certificate into your browser as a certificate authority and trust it to identify websites.

1.3. Import the Katello root CA certificate by using command line

After the first login to Foreman web UI, you might see a warning that you are using the default self-signed certificate. To ensure a successful connection, locate the root CA certificate on Foreman and import it into your browser truststore.

Prerequisites
  • Your Foreman is installed and configured.

Procedure
  1. On your Foreman server, copy the katello-server-ca.crt file to the machine you use to access the Foreman web UI:

    scp /var/www/html/pub/katello-server-ca.crt username@hostname:remotefile
  2. In the browser, import the katello-server-ca.crt certificate as a certificate authority and trust it to identify websites.

1.4. Set a custom message on the Foreman web UI login page

You can change the default text on the login page to a custom message you want your users to see every time they access the page. For example, your custom message might be a warning required by your company.

Procedure
  1. In the Foreman web UI, navigate to Administer > Settings.

  2. Select the General tab.

  3. Enter your custom message in the Login page footer text field.

  4. Click Submit.

Verification
  • Log out of the Foreman web UI and verify that the custom message is now displayed on the login page.

1.5. Tips for working in Foreman web UI efficiently

The Foreman web UI includes search, bookmarking, keyboard shortcuts, and various settings to help you work more efficiently.

1.5.1. Notable keyboard shortcuts and navigation tips

Use these keyboard shortcuts and techniques to navigate and search more efficiently in the Foreman web UI.

Ctrl + Shift + F focuses the vertical navigation search bar

After pressing this shortcut, you can start typing in the vertical navigation search bar.

/ focuses the page search bar

After pressing this shortcut, you can start typing in the page search bar.

Saving searches as bookmarks

You can save a search you frequently use as a bookmark. After entering your search query in the search field, click the arrow next to the Search button and select Bookmark this search. You can then give the bookmark a name and choose whether to make it public or private.

To manage all bookmarks, navigate to Administer > Bookmarks.

Compact table mode

Navigate to the user menu in the top bar and select My account. Under the UI Preferences tab, you can enable compact table mode. With compact table mode enabled, Foreman web UI displays table rows with less space between items.

Instance title setting

If you have multiple Foreman instances, you can configure Foreman web UI to always show a banner with the instance title in the top bar to help you identify which instance you are currently using. To set an instance title, navigate to Administer > Settings, and edit the Instance title setting on the General tab. To set a color for the instance title banner, edit the Instance color setting.

1.5.2. Foreman web UI search query reference

Use search query syntax and operators in the Foreman web UI to filter lists of resources on Foreman web UI pages. Parameter-based queries help you find the resources you need faster and more precisely than free-text search in large inventories.

Search queries in the page search bar follow the pattern:

parameter operator value

To search text with whitespaces, enclose it in quotes:

hostgroup = "Web Servers"

Typing without specifying a parameter searches across multiple fields simultaneously, also known as free-text search. For example, typing 64 in the search bar on the hosts page displays all hosts that have 64 in their name, IP address, MAC address, and architecture.

Note

Free text search is slower and less accurate than parameter-based queries. Use specific parameters whenever possible for better performance and precision.

The search bar supports multiple date and time formats, including the following:

  • "10 January 2017"

  • "10 Jan 2017"

  • 10-January-2017

  • 10/January/2017

  • "January 10, 2017"

  • Today, yesterday, and similar keywords

Table 1. Comparison operators accepted by search
Operator Short Name Description

=

EQUALS

Accepts numerical, temporal, or text values. For text, exact case sensitive matches are returned.

!=

NOT EQUALS

~

LIKE

Accepts text or temporal values. The search is not case-sensitive. Accepts the following wildcards: _ for a single character, % or * for any number of characters including zero. If no wildcard is specified, the string is treated as if surrounded by wildcards: %rhel7%

!~

NOT LIKE

>

GREATER THAN

Accepts numerical or temporal values. For temporal values, the operator > is interpreted as "later than", and < as "earlier than". Both operators can be combined with EQUALS: >= <=

<

LESS THAN

^

IN

Compares an expression against a list of values, as in SQL. Returns matches that contain or not contain the values, respectively.

!^

NOT IN

HAS or set?

 

Returns values that are present or not present, respectively.

NOT HAS or null?

 

Table 2. Logical operators accepted by search
Operator Alternative Notations

and

&

&&

<whitespace>

or

|

||

 

not

–

!

 

1.5.3. Useful search examples

The following examples demonstrate useful ways to filter and find resources in Foreman web UI. Use them as starting points to build your own searches that match your specific needs.

These search examples show how to filter hosts and are based on host attribute search parameters. You can use them on Foreman web UI pages that list hosts, such as Hosts > All Hosts. You can apply the same syntax to filter other resources on other Foreman web UI pages.

Find hosts by host global status and sub-status

Hosts that have an OK global status:

global_status = ok

Hosts that have an Error or Warning global status:

global_status = error or global_status = warning

Hosts that have at least one pending resource:

status.pending > 0

Hosts that restarted some service during last run:

status.restarted > 0

Hosts that have an interesting last run that might indicate something has happened:

status.interesting = true
Find hosts that need attention

Hosts with security updates available:

errata_status = security_needed

Hosts that have email notifications for configuration errors enabled and are in a failed state:

status.enabled = true AND status.failed = true

Hosts that have not generated a report recently:

last_report < "7 days ago"
Find hosts by configuration, environment, or registration date

Hosts in production that belong to a host group whose name includes a variation of the word "webservers":

environment = production AND hostgroup ~ webservers

Hosts registered in the last month:

registered_at > "30 days ago"

Hosts registered between specific dates:

registered_at > 1-January-2026 AND registered_at < 31-January-2026
Exclude specific results

All hosts except hosts in a host group named "exceptions":

NOT hostgroup = exceptions

Hosts that are not compliant with policies:

compliance_status != compliant

This search query requires the OpenSCAP plugin.

Use wildcards for flexible matching

Hosts with names that include the strings "web" and "prod":

name ~ web*prod*

Host groups starting with a specific prefix:

hostgroup ~ rhel%

2. Set up a content pipeline

After installing Foreman, to become productive synchronizing and distributing your content, import initial content into your Foreman server and set up a content delivery pipeline to distribute that content to your hosts.

2.1. Create a product and a repository

A product in Foreman groups repositories, and a repository in Foreman mirrors an upstream content source. Create a product and add a repository so that Foreman has content to synchronize.

This example adds a repository with CentOS content.

Procedure
  1. In the Foreman web UI, navigate to Content > Products.

  2. Click Create Product. To configure the new product:

    1. In the Name field, enter a name for the product. For example: CentOS Stream.

    2. Click Save.

  3. On the product page, click New Repository. To configure the new repository:

    1. In the Name field, enter a name for the repository. For example: BaseOS.

    2. From the Type list, select the required repository type. For example: yum.

    3. In the Upstream URL field, enter the URL of the upstream repository. For example: https://mirror.stream.centos.org/10-stream/BaseOS/x86_64/os/.

    4. From the Download Policy list, select a download policy. For example: Select On Demand to save disk space. With this policy, Foreman downloads only the metadata during synchronization and fetches the actual packages when a host requests them.

    5. Click Save.

Verification
  • In the Foreman web UI, navigate to Content > Products. The Products page now shows the new product. The new product contains the new repository.

Next steps
  • Follow Synchronize your content to synchronize the new repository so that Foreman downloads its metadata and makes it available for distribution.

2.2. Import a subscription manifest and enable Red Hat repositories

To distribute Red Hat content, you must first import a subscription manifest that entitles your Foreman server to download content from the Red Hat CDN. After that, you enable the specific Red Hat repositories you want to synchronize.

Prerequisites
Procedure
  1. In the Foreman web UI, ensure the context is set to the organization you want to use.

  2. Navigate to Content > Subscriptions. To upload the manifest:

    1. From the options menu, select Manage Manifest.

    2. In the Manage Manifest window, click Choose File. Upload the manifest file.

    3. After the manifest imports successfully, close the Manage Manifest window.

  3. Navigate to Content > Red Hat Repositories. To enable repositories:

    1. Search for the repository you want to enable. You can toggle the Recommended Repositories option to view repositories that are used in a typical setup.

    2. Expand the repository set and click the Enable icon next to the base architecture and release version that matches your hosts.

Verification
  • The repository you enabled is listed in the Enabled Repositories list.

Next steps
  • Follow Synchronize your content to synchronize the new repository so that Foreman downloads its metadata and makes it available for distribution.

2.3. Synchronize your content

Synchronization downloads metadata and packages from an upstream source into Foreman. Until you synchronize a repository, Foreman has no content to distribute to your hosts.

Procedure
  1. In the Foreman web UI, navigate to Content > Products.

  2. Select the product that contains the repositories you want to synchronize.

  3. Select the checkboxes next to the repositories you want to synchronize.

  4. Click Sync Now.

    Depending on the repository size and your network speed, the sync can take from a few minutes to over an hour. The first time you synchronize a repository, the sync typically takes longer.

Verification
  1. In the Foreman web UI, navigate to Content > Sync Status.

  2. Expand the product to see the synchronization result for each repository.

  3. Verify that the synchronization completed successfully and that the repository shows a package count.

Next steps
  • After the sync finishes, your content is stored in the Library environment. Library is the default lifecycle environment where all content lands first. Next, follow Define lifecycle environments to create additional lifecycle environments to stage content through a promotion path.

2.4. Define lifecycle environments

Lifecycle environments represent stages in your content promotion pipeline. By adding lifecycle environments, you define the stages through which you will be promoting your content as you test it.

Every Foreman deployment starts with an initial Library lifecycle environment that holds all synchronized content. From there, you create a lifecycle environment path that matches the stages your content passes through before reaching your hosts.

For example, consider a team managing web servers. They want to test package updates in a development environment first, then validate them further in a testing environment, and only then promote the packages to production. The resulting lifecycle environment path looks like this: Library > Development > Testing > Production.

In this example, you create that path.

Procedure
  1. In the Foreman web UI, navigate to Content > Lifecycle > Lifecycle Environments.

  2. Add an environment path:

    1. Click Create Environment Path to start a new lifecycle environment path.

    2. In the Name field, enter Development.

    3. Click Save.

  3. Extend the environment path with a testing stage:

    1. Click Add New Environment next to the Development environment.

    2. In the Name field, enter Testing.

    3. Ensure that the Prior Environment dropdown list value is set to Development.

    4. Click Save.

  4. Extend the environment path with a production stage:

    1. Click Add New Environment next to the Testing environment.

    2. In the Name field, enter Production.

    3. Ensure that the Prior Environment dropdown list value is set to Testing.

    4. Click Save.

Verification
  • In the Foreman web UI, navigate to Content > Lifecycle > Lifecycle Environments. Review your new lifecycle environment path.

Next steps

2.5. Publish and promote a content view

A content view is a curated collection of your repositories. When you publish a content view, Foreman takes a point-in-time copy of the selected repositories. This snapshot, called a content view version, is delivered to hosts through promotion to a lifecycle environment.

In this example, you create a content view, publish the first version, and promote it to the Development environment.

Prerequisites
Procedure
  1. In the Foreman web UI, navigate to Content > Lifecycle > Content Views.

  2. Create a content view:

    1. Click Create content view.

    2. In the Name field, enter a name. For example: My Content View.

    3. Ensure Content view is selected as the type.

    4. Click Create content view.

  3. Define the properties of the new content view:

    1. On the Repositories tab, select your preferred repository type from the Type list.

    2. Click Show repositories, an select the repositories you want to include.

    3. Click Add repositories.

  4. Publish a new version of the content view with the selected repositories:

    1. Click Publish new version.

    2. Optional: In the Description field, enter Initial version.

    3. Toggle Promote, and select the Development lifecycle environment.

    4. Click Next, and review the details.

    5. Click Finish, and wait for the publishing task to complete.

Verification
  • In the Foreman web UI, navigate to Content > Lifecycle > Lifecycle Environments. Click the Development lifecycle environment. On the Content Views tab, you can see that My Content View is listed.

  • Navigate to Content > Lifecycle > Content Views. Click the My Content View content view. On the Versions tab, you can see the version of the content view that is published and the environments associated with My Content View. Hosts registered to these environments with this content view will receive exactly the packages from this snapshot.

Next steps
  • Follow Create an activation key to create an activation key that maps new hosts to this content view and lifecycle environment.

2.6. Create an activation key

An activation key assigns a lifecycle environment, content view, and other settings to hosts during registration. Every time you reuse the key to register a host, Foreman applies the same settings to the host.

In this example, you create an activation key that points to the Development environment and the My Content View content view.

Procedure
  1. In the Foreman web UI, navigate to Content > Lifecycle > Activation Keys.

  2. Create an activation key:

    1. Click Create Activation Key.

    2. In the Name field, enter a name. For example: My Development Key.

    3. Ensure the Unlimited hosts checkbox is selected.

    4. On the Content view environments card, click Assign content view environments.

    5. Select the Development lifecycle environment.

    6. Select the content view you created, for example My Content View.

    7. Click Save to save the content view environment.

  3. Click Save to create the activation key.

    You now have an activation key that you can use to register hosts. Each host registered with this activation key will automatically receive content from the Development lifecycle environment and the My Content View content view.

2.7. Register a host and test package delivery

Register a host to Foreman and verify that it receives packages from your content view. Registration connects the host to Foreman server and assigns the lifecycle environment and content view from the activation key.

Important

After registration, all content requests from the host are served by Foreman server rather than by external repositories.

Prerequisites
  • You have root access to the host.

  • The host and your Foreman server can communicate over the network.

Procedure
  1. In the Foreman web UI, navigate to Hosts > Register Host.

  2. From the Activation Keys list, select the required activation key.

  3. If you have not deployed a CA-signed certificate on Foreman server, select the Insecure option for the purposes of this tutorial.

  4. Click Generate to generate the registration command.

  5. On your host, run the registration command as the root user.

Verification
  • The registration command succeeds.

  • On the host, install a package that is provided through the content view:

    dnf install My_Package_Name

    Verify that Foreman server delivers the package instead of external mirrors.

    Your content pipeline is now working end to end. Hosts registered with your activation key will receive packages from the content view snapshot most recently promoted to the Development lifecycle environment.

3. Set up and run a simple remote execution job

To get started with remote execution and run your first remote job, ensure that your user account has the required permissions and your hosts are configured to run remote jobs.

3.1. Permissions for remote execution

You can control which roles can run which jobs within your infrastructure, including which hosts they can target.

The remote execution feature provides two built-in roles:

  • Remote Execution Manager: Can access all remote execution features and functionality.

  • Remote Execution User: Can only run jobs.

You can clone the Remote Execution User role and customize its filter for increased granularity. If you adjust the filter with the view_job_templates permission on a customized role, you can only see and trigger jobs based on matching job templates. You can use the view_hosts and view_smart_proxies permissions to limit which hosts or Smart Proxies are visible to the role.

The execute_template_invocation permission is a special permission that is checked immediately before execution of a job begins. This permission defines which job template you can run on a particular host. This allows for even more granularity when specifying permissions.

You can run remote execution jobs against Foreman and Smart Proxy registered as hosts to Foreman with the execute_jobs_on_infrastructure_hosts permission. Standard Manager and Site Manager roles have this permission by default. If you use either the Manager or Site Manager role, or if you use a custom role with the execute_jobs_on_infrastructure_hosts permission, you can execute remote jobs against registered Foreman and Smart Proxy hosts.

The following example shows filters for the execute_template_invocation permission:

name = Reboot and host.name = staging.example.com
name = Reboot and host.name ~ *.staging.example.com
name = "Restart service" and host_group.name = webservers

Use the first line in this example to apply the Reboot template to one selected host. Use the second line to define a pool of hosts with names ending with .staging.example.com. Use the third line to bind the template with a host group.

Note

Permissions assigned to users with these roles can change over time. If you have already scheduled some jobs to run in the future, and the permissions change, this can result in execution failure because permissions are checked immediately before job execution.

Additional resources

3.2. Configure a host to use the pull client

For Smart Proxies configured to use pull-mqtt mode, hosts can subscribe to remote jobs using the remote execution pull client. This does not use SSH and hosts do not require opening up any incoming firewall ports.

Prerequisites
  • You have registered the host to Foreman.

  • The Smart Proxy through which the host is registered is configured to use pull-mqtt mode. For more information, see Configure pull-based transport for remote execution.

  • Foreman Client repository for the operating system version of the host is synchronized on Foreman server, available in the content view environments of the host, and enabled for the host. For more information, see Enable and disable repositories on hosts.

  • Your host has access to the default operating system repositories.

  • The host can communicate with its Smart Proxy over MQTT using port 1883.

  • The host can communicate with its Smart Proxy over HTTPS using port 9090.

Procedure
  • Install the katello-pull-transport-migrate package on your host:

    • On Enterprise Linux 10, Enterprise Linux 9, and Enterprise Linux 8 hosts:

      dnf install katello-pull-transport-migrate
    • On Debian/Ubuntu hosts:

      apt install katello-pull-transport-migrate
    • On openSUSE/SUSE Linux Enterprise Server hosts:

      zypper install katello-pull-transport-migrate
Verification
  1. Determine which version of the yggdrasil package is installed on the host:

    • On Enterprise Linux hosts:

      rpm --query yggdrasil
    • On Debian/Ubuntu hosts:

      dpkg-query --show yggdrasil-mqtt
    • On openSUSE/SUSE Linux Enterprise Server hosts:

      rpm --query yggdrasil
  2. Check the status of the Yggdrasil services:

    • If your host has yggdrasil version 0.4.z or later installed:

      systemctl status yggdrasil com.redhat.Yggdrasil1.Worker1.foreman
    • If your host has yggdrasil version 0.2.z or earlier installed:

      systemctl status yggdrasild

If the services are running, you have successfully configured the host to use the pull client.

3.3. Distribute SSH keys for remote execution

For Smart Proxies in ssh mode, remote execution connections are authenticated using SSH. By default, global registration deploys Smart Proxy SSH public keys to hosts automatically. You can disable this through the Setup REX option.

Prerequisites
  • The SSH service is enabled and running on the hosts.

  • Any network or host-based firewalls are configured to enable access to port 22.

  • If the hosts are running on Amazon Web Services, enable password authentication. For more information, see New User Accounts.

Procedure

3.4. Execute a remote job by using Foreman web UI

You can execute a job that is based on a job template against one or more hosts from the Foreman web UI.

Note

Ansible jobs run in batches on multiple hosts, so you cannot cancel a job running on a specific host. A job completes only after the Ansible Playbook runs on all hosts in the batch.

Procedure
  1. In the Foreman web UI, navigate to Monitor > Jobs and click Run job.

  2. Select the Job category and the Job template you want to use, then click Next.

  3. Select hosts on which you want to run the job. If you do not select any hosts, the job will run on all hosts you can see in the current context.

    Note

    If you want to select a host group and all of its subgroups, it is not sufficient to select the host group as the job would only run on hosts directly in that group and not on hosts in subgroups. Instead, you must either select the host group and all of its subgroups or use this search query:

    hostgroup_fullname ~ "My_Host_Group*"

    Replace My_Host_Group with the name of the top-level host group.

  4. If required, provide inputs for the job template. Different templates have different inputs and some templates do not have any inputs. After entering all the required inputs, click Next.

  5. Optional: To configure advanced settings for the job, fill in the Advanced fields.

  6. Click Next.

  7. Schedule time for the job.

    • To execute the job immediately, keep the pre-selected Immediate execution.

    • To execute the job in future time, select Future execution.

    • To execute the job on regular basis, select Recurring execution.

  8. Optional: If you selected future or recurring execution, select the Query type, otherwise click Next.

    • Static query means that job executes on the exact list of hosts that you provided.

    • Dynamic query means that the list of hosts is evaluated just before the job is executed. If you entered the list of hosts based on some filter, the results can be different from when you first used that filter.

    Click Next after you have selected the query type.

  9. Optional: If you selected future or recurring execution, provide additional details:

    • For Future execution, enter the Starts at date and time. You also have the option to select the Starts before date and time. If the job cannot start before that time, it will be canceled.

    • For Recurring execution, select the start date and time, frequency, and the condition for ending the recurring job. You can choose the recurrence to never end, end at a certain time, or end after a given number of repetitions. You can also add Purpose - a special label for tracking the job. There can only be one active job with a given purpose at a time.

    Click Next after you have entered the required information.

  10. Review job details. You have the option to return to any part of the job wizard and edit the information.

  11. Click Submit to schedule the job for execution.

3.5. Execute a remote job by using Hammer CLI

You can execute a job that is based on a job template against one or more hosts.

Note

Ansible jobs run in batches on multiple hosts, so you cannot cancel a job running on a specific host. A job completes only after the Ansible Playbook runs on all hosts in the batch.

For more information about creating, monitoring, or canceling remote jobs with Hammer CLI, enter hammer job-template --help and hammer job-invocation --help.

Procedure
  1. Enter the following command on Foreman:

    hammer settings set \
    --name remote_execution_global_proxy \
    --value false
  2. Find the ID of the job template you want to use:

    hammer job-template list
  3. Show the template details to see parameters required by your template:

    hammer job-template info --id My_Template_ID
  4. Execute a remote job with custom parameters:

    hammer job-invocation create \
    --inputs My_Key_1="My_Value_1",My_Key_2="My_Value_2",... \
    --job-template "My_Template_Name" \
    --search-query "My_Search_Query"

    Replace My_Search_Query with the filter expression that defines hosts, for example "name ~ My_Pattern".