GitHub Actions makes it possible to automate application builds, testing, security checks, and deployments directly from a GitHub repository. Many development teams use Ubuntu-based runners because they are readily available and work with a wide range of development tools.
However, some organizations build and deploy applications specifically for Red Hat Enterprise Linux (RHEL). In these environments, testing on Ubuntu may not always reveal operating-system-specific issues involving system libraries, package versions, security policies, or application dependencies.
Running GitHub Actions on RHEL runners helps teams test applications in an environment closer to their production infrastructure.
GitHub supports RHEL 8 and later for self-hosted runners. It also provides official RHEL 9 and RHEL 10 images for GitHub-hosted larger runners, which became generally available in November 2026.
This article explains how to configure GitHub Actions on RHEL, install a self-hosted runner, create workflows, manage dependencies, configure Docker, and troubleshoot common problems.
Understanding GitHub Actions RHEL Runners
A GitHub Actions runner is a machine that executes workflow jobs. When a developer pushes code or creates a pull request, GitHub evaluates the workflow configuration and assigns jobs to available runners.
A runner checks out the repository, executes the configured commands, runs tests, and uploads the resulting artifacts or reports.
For RHEL-based environments, developers can choose between two main approaches:
- GitHub-hosted RHEL larger runners.
- Self-hosted RHEL runners.
Both approaches run GitHub Actions workflows on RHEL, but they differ in infrastructure ownership, maintenance, configuration, and availability.
GitHub-Hosted RHEL Runners
GitHub-hosted RHEL runners are managed by GitHub and provided as larger runner images.
GitHub introduced RHEL 9 and RHEL 10 images in public preview in June 2026. These images became generally available on November 19, 2026.
They are available for larger runners on GitHub Team and GitHub Enterprise Cloud plans.
The images provide a clean RHEL environment. Developers can install the tools and dependencies required by their projects or use custom images to prepare a more complete build environment.
The main advantage is that teams do not need to maintain the underlying RHEL virtual machines themselves.
Self-Hosted RHEL Runners
A self-hosted runner is a machine that your organization manages and registers with GitHub Actions.
It can be a physical server, virtual machine, cloud instance, or supported private infrastructure.
GitHub supports RHEL 8 and later for self-hosted runners.
With this approach, your organization controls the operating system, installed software, network configuration, storage, and security policies.
Self-hosted runners are useful when workflows need access to private networks, internal databases, specialized hardware, or organization-specific development tools.
GitHub-Hosted vs. Self-Hosted RHEL Runners
| Feature | GitHub-hosted RHEL | Self-hosted RHEL |
|---|
| Infrastructure management | Managed by GitHub | Managed by your organization |
| Supported RHEL images | RHEL 9 and RHEL 10 | RHEL 8 and later |
| Machine configuration | Standard or custom images | Full administrative control |
| Maintenance | Managed runner infrastructure | Organization responsibility |
| Private network access | Depends on available networking configuration | Can be configured for internal networks |
| Software installation | Through workflow steps or custom images | Through system configuration and workflows |
| Scaling | Managed larger runner capacity | Requires infrastructure and scaling management |
| Best suited for | Standard enterprise CI/CD workloads | Custom environments and internal infrastructure |
The choice depends on how much control your organization needs over the build environment.
Preparing a RHEL Machine for GitHub Actions
Before installing a self-hosted runner, prepare the RHEL machine.
The machine must have a supported processor architecture, sufficient hardware resources, and network connectivity to GitHub.
GitHub currently supports x64 and ARM64 architectures for Linux self-hosted runners. Confirm the compatibility of your selected runner version and workload before using a particular architecture.
Verify the RHEL Version
Connect to the RHEL machine and check its operating system:
cat /etc/redhat-release
You can also inspect the operating system details:
cat /etc/os-release
Check the processor architecture:
uname -m
For an x64 machine, the command normally returns:
x86_64
Update the Operating System
Before installing the runner, update the operating system packages:
sudo dnf update -y
Install commonly required utilities:
sudo dnf install -y \
curl \
wget \
tar \
gzip \
git \
jq \
unzip
The exact package requirements depend on the workflows that will run on the machine.
For example, .NET applications may require additional SDK packages, while Python projects need a compatible Python installation.
Check Network Connectivity
The runner must communicate with GitHub Actions to receive jobs, download updates, and upload workflow results.
GitHub Actions runners generally require outbound HTTPS connectivity over port 443.
Check whether the machine can reach GitHub:
curl -I https://github.com
A successful response confirms basic connectivity to GitHub, but it does not prove that every Actions service endpoint is reachable.
For production environments, review GitHub's current network requirements and allow the required domains through your firewall or proxy.
Avoid exposing the runner directly to the public internet unless the infrastructure requires it and the security architecture has been reviewed.
Installing a Self-Hosted GitHub Actions Runner on RHEL
A self-hosted runner can be registered at the repository, organization, or enterprise level, depending on your administrative requirements.
For this example, the runner will be registered at the repository level.
Create a Runner in GitHub
Open the GitHub repository and navigate to:
Settings → Actions → Runners.
Select New runner, followed by New self-hosted runner.
Choose Linux and the appropriate processor architecture.
GitHub displays instructions for downloading and configuring the runner application.
The configuration process also provides a temporary registration token. This token is used to register the machine and expires after a limited period.
Generate the token when you are ready to configure the runner rather than storing it in scripts or configuration files.
Create a Dedicated Runner User
It is better to run the GitHub Actions runner under a dedicated operating-system account instead of using the root account.
Create a user:
sudo useradd -m -s /bin/bash actions
Create a directory for the runner:
sudo mkdir -p /opt/actions-runner
Assign ownership:
sudo chown actions:actions /opt/actions-runner
Switch to the runner account:
sudo su - actions
Move to the runner directory:
cd /opt/actions-runner
Using a dedicated account helps separate workflow execution from system administration.
Download the GitHub Runner Package
GitHub provides the current runner download link and checksum in the self-hosted runner setup instructions.
Use the exact download URL displayed by GitHub for your selected operating system and architecture.
For example, the download command follows this structure:
curl -o actions-runner-linux-x64.tar.gz \
-L "GITHUB_RUNNER_DOWNLOAD_URL"
Verify the downloaded archive against the checksum published by GitHub.
Then extract it:
tar xzf actions-runner-linux-x64.tar.gz
Do not use an arbitrary runner package or an outdated download link. Runner versions are updated regularly, and GitHub enforces minimum version requirements.
Configure the Runner
Run the configuration script:
./config.sh
The script asks for several values:
- GitHub repository or organization URL.
- Registration token.
- Runner name.
- Runner group, where applicable.
- Additional labels.
- Work directory.
For example, a runner can be named:
rhel-build-runner-01
You can also provide custom labels such as:
rhel
rhel-9
linux
build
Labels help GitHub identify the appropriate runner for a workflow job.
After configuration completes, the runner is registered with GitHub.
Start the Runner
To start the runner manually:
./run.sh
The terminal displays the runner status and waits for incoming jobs.
For production environments, however, a runner should normally start automatically when the machine boots.
Configure the Runner as a systemd Service
RHEL uses systemd to manage background services.
GitHub provides a svc.sh script with the self-hosted runner package. After successfully configuring the runner, use this script to install and manage the service.
From the runner directory, execute:
sudo ./svc.sh install actions
Start the service:
sudo ./svc.sh start
Check its status:
sudo ./svc.sh status
The service allows the runner to start automatically after a machine restart.
You can also use standard systemd commands:
sudo systemctl list-units \
--type=service \
| grep actions.runner
To inspect service logs, use the service name reported by systemd:
sudo journalctl -u SERVICE_NAME -f
Replace SERVICE_NAME with the actual runner service unit.
Do not start multiple runner processes using the same runner configuration. Each runner instance should have its own registration and working directory.
Create a GitHub Actions Workflow for RHEL
Once the runner is online, create a workflow file in your repository.
GitHub Actions workflow files are stored in:
.github/workflows/
Create a file named rhel-build.yml:
name: RHEL Build Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: [self-hosted, linux, x64, rhel]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Display operating system
run: |
cat /etc/redhat-release
- name: Display Python version
run: |
python3 --version
- name: Run build
run: |
echo "Running build on RHEL"
- name: Run tests
run: |
echo "Executing application tests"
The important configuration is:
runs-on: [self-hosted, linux, x64, rhel]
GitHub searches for an online and available runner matching the requested labels.
The runner must have all the specified labels for the job to be assigned.
The rhel label is a custom label that you add during runner configuration. GitHub does not automatically guarantee that every RHEL machine has this label.
The example uses actions/checkout@v4 to check out the repository. For production workflows, review third-party and official action versions regularly and pin actions to verified full commit SHAs when your security policy requires it.
Configure a GitHub-Hosted RHEL Runner
If you do not want to maintain a self-hosted machine, you can use GitHub-hosted RHEL larger runners.
These runners are managed through organization settings and are available on GitHub Team and GitHub Enterprise Cloud plans.
Create a RHEL Larger Runner
Open your GitHub organization settings.
Navigate to:
Settings → Actions → Runners.
Select New larger runner.
Choose Linux x64 partner images and select either RHEL 9 or RHEL 10.
Configure the runner group, name, and machine specifications according to the workload.
Larger runners require organization-level configuration. They are different from the standard ubuntu-latest and windows-latest runner labels.
Use the Runner in a Workflow
After creating the larger runner, assign it an appropriate group or label.
For example:
name: GitHub Hosted RHEL Build
on:
push:
branches:
- main
jobs:
build:
runs-on:
group: rhel-runner-group
labels: rhel-9
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Verify operating system
run: |
cat /etc/redhat-release
- name: Build application
run: |
echo "Building application on RHEL 9"
Replace rhel-runner-group and rhel-9 with the actual group and label configured for your larger runner.
The workflow can then execute on the selected RHEL image without requiring you to register and maintain a separate physical or virtual machine.
Install Development Tools on RHEL Runners
A clean RHEL environment may not include every tool required by an application.
For example, a .NET project needs the appropriate .NET SDK, while a Python application needs Python and its dependencies.
You can install required tools directly in the runner environment or prepare a custom image when using GitHub-hosted larger runners.
Installing .NET SDK
For a .NET application, first check the available SDK packages:
dnf search dotnet-sdk
After configuring the appropriate Microsoft package repository for your RHEL version, install the required SDK.
For example:
sudo dnf install dotnet-sdk-10.0
Verify the installation:
dotnet --info
The exact SDK version should match the application's target framework and the support requirements of the selected RHEL release.
Installing Python
Check the available Python packages:
dnf search python3
Install the required version:
sudo dnf install python3 python3-pip
Verify the installation:
python3 --version
pip3 --version
For application dependencies, use a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
Install the project's requirements:
pip install -r requirements.txt
Avoid installing application dependencies globally unless the runner image is intentionally designed for that purpose.
Installing Node.js
For JavaScript or React applications, install a supported Node.js version using an approved package source or version-management approach.
Check the available packages:
dnf search nodejs
Install Node.js and npm:
sudo dnf install nodejs npm
Verify:
node --version
npm --version
For projects requiring a specific Node.js release, use a controlled version-management strategy rather than depending on whichever version happens to be available in the operating system repositories.
Run Docker-Based GitHub Actions Workflows on RHEL
Some GitHub Actions workflows use Docker container actions or service containers.
For these workflows, GitHub requires a Linux runner with Docker installed.
On RHEL, Docker Engine or another supported container runtime must be configured according to the workflow requirements.
If using Docker Engine, install it using the official installation instructions for the selected RHEL version.
After installation, enable and start the Docker service:
sudo systemctl enable --now docker
Check its status:
sudo systemctl status docker
Verify that Docker is available:
docker version
The runner account must have permission to access the Docker daemon.
Adding the runner user to the Docker group is a common configuration:
sudo usermod -aG docker actions
However, Docker group membership effectively grants root-level control over the host. Treat this permission as highly privileged. For sensitive environments, use an isolated build machine or a container execution design with an appropriately restricted security boundary.
After changing group membership, restart the runner service or establish a new login session so the updated permissions take effect.
SELinux Considerations
RHEL commonly uses SELinux to enforce mandatory access controls.
Do not disable SELinux simply because a container or build process fails.
Instead, inspect the audit logs:
sudo ausearch -m AVC -ts recent
Check the current SELinux mode:
getenforce
If an access denial occurs, identify the affected process and resource, then apply an appropriate policy or labeling correction.
For Docker workloads, verify that volume mounts and container labels are configured correctly.
Disabling SELinux can weaken the security of the entire build machine and should not be used as a routine troubleshooting step.
Manage Runner Labels and Groups
Labels help GitHub route jobs to appropriate runners.
For example, an organization may have different runners for:
- RHEL 8 compatibility testing.
- RHEL 9 production builds.
- RHEL 10 application testing.
- .NET builds.
- Python integration tests.
- Docker-based workflows.
You can use labels to target the required environment.
For example:
jobs:
test-rhel:
runs-on: [self-hosted, linux, x64, rhel-9]
steps:
- uses: actions/checkout@v4
- name: Verify RHEL
run: cat /etc/redhat-release
test-rhel-10:
runs-on: [self-hosted, linux, x64, rhel-10]
steps:
- uses: actions/checkout@v4
- name: Verify RHEL
run: cat /etc/redhat-release
The jobs can run on different machines, allowing teams to validate compatibility across multiple RHEL releases.
Runner groups provide another level of control. Organizations can use them to restrict which repositories are allowed to access particular runners.
This is especially important when runners have access to internal systems or sensitive build resources.
Secure Self-Hosted RHEL Runners
Self-hosted runners require careful security management because workflow jobs execute commands on the machine.
A compromised workflow can potentially access files, credentials, environment variables, and network resources available to the runner account.
Follow these practices:
- Use a dedicated operating-system account for runner execution.
- Avoid running the runner as root.
- Restrict access to runner registration and management.
- Use repository and organization runner groups to control access.
- Avoid running untrusted pull requests on machines with sensitive credentials.
- Use short-lived credentials wherever possible.
- Keep the runner software updated.
- Restrict network access to required services.
- Protect environment secrets and deployment credentials.
- Separate build runners from production deployment infrastructure.
- Use ephemeral or regularly rebuilt runners for sensitive workloads.
- Review workflow permissions and third-party actions.
- Monitor runner activity and operating-system logs.
Keep Runner Software Updated
GitHub Actions runner software receives regular updates.
GitHub documents a minimum runner version of 2.329.0 for registration and re-registration with its updated platform architecture. This is a registration requirement, not a permanent version that can be used indefinitely.
Runners must continue receiving new releases within the required update window. GitHub's documented policy requires updates within 30 days of a release.
Auto-update should normally remain enabled. If an organization disables automatic updates, it must establish a reliable process for downloading, verifying, and installing runner updates.
A runner that becomes too old may stop accepting workflow jobs.
Common Problems and Troubleshooting
RHEL runners can encounter problems related to missing libraries, network restrictions, permissions, containers, or outdated runner software.
| Problem | Possible cause | Recommended solution |
|---|
| Runner does not appear online | Network connectivity or registration problem | Verify the registration process and outbound HTTPS connectivity |
| Workflow remains queued | No available runner matches the requested labels | Check runner status, groups, and labels |
| Runner fails to start | Missing system libraries or incorrect permissions | Review startup output and install required dependencies |
| Docker command fails | Docker service is stopped or runner lacks permission | Check the Docker service and daemon access |
| Container action fails | Docker or container runtime is unavailable | Verify the container runtime and workflow requirements |
| Permission denied | Runner account cannot access a file or directory | Correct ownership and permissions |
| SELinux blocks an operation | Security policy prevents access | Inspect audit logs and correct the policy or labels |
| Runner stops after reboot | Runner service is not installed or enabled | Configure the runner with svc.sh and verify systemd status |
| Runner update fails | Network restrictions or disabled automatic updates | Verify access to GitHub update endpoints and update the runner |
| Build behaves differently from Ubuntu | Different system libraries or package versions | Validate dependencies on the target RHEL version |
Runner Is Offline
Start by checking the runner service:
sudo ./svc.sh status
Review the runner logs in the _diag directory:
ls -lah _diag/
The diagnostic logs can help identify registration failures, network problems, and startup errors.
Also verify that the machine can reach the required GitHub endpoints over HTTPS.
Workflow Remains Queued
If a workflow remains queued, inspect the runs-on configuration.
For example:
runs-on: [self-hosted, linux, x64, rhel-9]
The runner must be online, idle, and have all the requested labels.
Also check whether the repository has permission to use the runner group.
A runner with the correct operating system but a missing custom label will not receive the job.
Docker Permission Errors
If Docker commands fail with a permission error, check whether the runner account can access the Docker socket:
ls -l /var/run/docker.sock
Verify group membership:
id actions
Do not solve Docker permission problems by making the socket world-writable. Review the daemon configuration and use an appropriate access-control strategy.
Best Practices for Running GitHub Actions on RHEL
- Choose GitHub-hosted RHEL larger runners when managed infrastructure is sufficient.
- Use self-hosted runners when private network access or custom system configuration is required.
- Select a RHEL release that matches the production environment.
- Use a dedicated runner account instead of root.
- Configure the runner as a systemd service.
- Use custom labels to route jobs to the correct RHEL version.
- Install only the tools required by your workflows.
- Use reproducible dependency versions.
- Keep runner software and operating-system packages updated.
- Use runner groups to control repository access.
- Avoid running untrusted pull requests on privileged self-hosted machines.
- Protect Docker daemon access and maintain SELinux enforcement.
- Monitor runner health, resource consumption, and diagnostic logs.
- Use ephemeral runners for workloads that require stronger isolation.
- Test builds and deployments on the same operating-system family used in production.
Advantages and Disadvantages of RHEL Runners
| Advantages | Disadvantages |
|---|
| Tests applications on an enterprise Linux environment | Self-hosted runners require infrastructure maintenance |
| Helps identify operating-system-specific compatibility problems | RHEL images and larger runners may involve additional costs |
| Supports enterprise development and deployment workflows | Dependency installation may require additional configuration |
| Provides flexibility through custom labels and runner groups | Security requires careful runner isolation |
| Self-hosted machines can access private infrastructure | Network and firewall configuration can be complex |
| GitHub-hosted RHEL images reduce infrastructure management | GitHub-hosted RHEL larger runners have plan and configuration requirements |
Conclusion
Running GitHub Actions on Red Hat Enterprise Linux provides a practical way to test and build applications in an environment that closely matches enterprise production systems.
Teams can choose GitHub-hosted RHEL 9 and RHEL 10 larger runners when they prefer managed infrastructure, or configure self-hosted RHEL 8 and later machines when they need greater control over the operating system, network, and installed software.
For self-hosted environments, the main tasks include preparing the RHEL machine, installing the runner application, registering it with GitHub, configuring systemd, and assigning appropriate labels. Workflows can then target the runner through the runs-on property.
Security and maintenance should remain part of the design. Use dedicated runner accounts, control access through runner groups, keep software updated, and isolate workflows that process untrusted code.
With the right configuration, RHEL runners can become a reliable part of an enterprise GitHub Actions pipeline and help teams deliver applications with greater confidence in their target operating environment.
Join the conversation! Your thoughts help the community grow.