Docs / Enrollment / Desktop / Enrol Fedora

How to Enrol a Fedora Endpoint

This guide walks you through enrolling a Fedora Linux endpoint into ZEM Cloud.

Prerequisites

Before enrolling, ensure you have:

  • Supported OS: Fedora 38+ or compatible RHEL-based distributions
  • Root Access: sudo privileges on the target machine
  • Network Access: Connectivity to your ZEM Cloud server (HTTPS port 443)
  • curl: Installed on the system (usually pre-installed)

Enrolment Steps

Step 1: Open the Enrol Endpoint Wizard

  1. Log in to your ZEM Cloud dashboard
  2. Click the Enrol Endpoint button (green + icon) in the sidebar
  3. Select Desktop as the device type
  4. Select Fedora from the platform options

Step 2: Configure Enrolment Options

Configure the following settings:

  • Auto Reboot - Automatically schedules a reboot when an update requires it
  • Reboot Time - Time of day for scheduled reboots (24-hour format)

Toggle the Auto Reboot switch and set your preferred reboot time if needed.

Step 3: Copy the One-Liner Command

A customised installation command will be displayed. It looks like this:

curl -fsSL https://your-zem-server.com/install-fedora.sh | sudo bash -s -- --master-url https://your-zem-server.com --api-key YOUR_API_KEY --auto-reboot true --reboot-time 03:00

Click the Copy button to copy the command to your clipboard.

Step 4: Run the Command on the Target Machine

  1. SSH into your Fedora server or open a terminal
  2. Paste and execute the copied command
  3. Enter your sudo password when prompted

Step 5: Wait for Installation

The script will automatically:

  1. Detect your Fedora installation
  2. Install required dependencies using dnf (jq, bc, curl)
  3. Download the Fedora-specific ZEM Cloud agent scripts
  4. Create the configuration file
  5. Set up systemd services and timers
  6. Start the agent

Installation typically takes 30-60 seconds.

What Gets Installed

Agent Scripts

Script | Location | Purpose
zen-update-agent-fedora.sh | /usr/local/bin/ | Main agent for updates and actions
zen-update-report-fedora.sh | /usr/local/bin/ | Status reporting

Configuration

File | Location
Agent Config | /etc/zen-update/agent.conf
Machine ID | /etc/zen-update/.machine_id

Systemd Services

Service | Timer | Interval
zen-update-agent.service | zen-update-agent.timer | 60 seconds
zen-update-report.service | zen-update-report.timer | 60 seconds
zen-update-telemetry.service | zen-update-telemetry.timer | 5 seconds
zen-update-hwinfo.service | zen-update-hwinfo.timer | 30 minutes

Fedora-Specific Features

Package Management

The Fedora agent uses dnf (Dandified YUM) for package management:

  • Update Detection - Uses dnf check-update to detect available updates
  • Update Installation - Uses dnf upgrade -y for system updates
  • Package Inventory - Reports all installed packages via rpm -qa

Security Updates

Security updates are identified using dnf updateinfo list security, which queries Fedora's security advisory database.

Verifying Enrolment

Check Agent Status

Check if the agent timer is active:

systemctl status zen-update-agent.timer

Check if the agent service ran successfully:

systemctl status zen-update-agent.service

View recent agent logs:

journalctl -u zen-update-agent.service -n 50

View in Dashboard

  1. Navigate to Endpoint Overview in ZEM Cloud
  2. The new endpoint should appear within 60 seconds
  3. Click on the endpoint to view details

Expected Output

When the agent runs successfully, you'll see:

  • Hostname and IP address in the dashboard
  • OS information (Fedora version)
  • Update count from dnf check-update
  • Security update indicators
  • Real-time telemetry data

Configuration Options

The agent configuration is stored in /etc/zen-update/agent.conf:

MASTER_URL="https://your-zem-server.com"
TOKEN="your-api-key"
AUTO_REBOOT="true"
REBOOT_TIME="03:00"

Troubleshooting

Agent Not Running

Restart the agent:

sudo systemctl restart zen-update-agent.timer

Enable the agent to start on boot:

sudo systemctl enable zen-update-agent.timer

Missing Dependencies

Install required packages:

sudo dnf install jq bc curl

SELinux Issues

If SELinux is blocking the agent, you may need to check for denials:

sudo ausearch -m avc -ts recent

Temporarily set SELinux to permissive (for testing):

sudo setenforce 0

Create a custom policy if needed:

sudo audit2allow -a -M zemcloud-agent
sudo semodule -i zemcloud-agent.pp

Network Issues

Test connectivity to ZEM Cloud:

curl -I https://your-zem-server.com/api/agent_version

Check DNS resolution:

nslookup your-zem-server.com

Check firewall rules:

sudo firewall-cmd --list-all

View Detailed Logs

View full agent log:

sudo cat /var/log/zen-update-agent.log

Follow logs in real-time:

sudo tail -f /var/log/zen-update-agent.log

Common Errors

Error | Cause | Solution
curl: (6) Could not resolve host | DNS resolution failed | Check network settings and DNS
curl: (7) Failed to connect | Server unreachable | Verify server URL and firewall rules
Permission denied | SELinux blocking | Check SELinux settings

Uninstalling the Agent

To remove the ZEM Cloud agent from a Fedora system:

Stop and disable services:

sudo systemctl stop zen-update-agent.timer zen-update-report.timer
sudo systemctl stop zen-update-telemetry.timer zen-update-hwinfo.timer
sudo systemctl disable zen-update-agent.timer zen-update-report.timer
sudo systemctl disable zen-update-telemetry.timer zen-update-hwinfo.timer

Remove service files:

sudo rm /etc/systemd/system/zen-update-*
sudo systemctl daemon-reload

Remove agent scripts:

sudo rm /usr/local/bin/zen-update-*-fedora.sh

Remove configuration:

sudo rm -rf /etc/zen-update

Remove logs:

sudo rm /var/log/zen-update-*.log