How to Enrol an Arch Linux Endpoint
This guide walks you through enrolling an Arch Linux endpoint into ZEM Cloud.
Prerequisites
Before enrolling, ensure you have:
- Supported OS: Arch Linux or Arch-based distributions (Manjaro, EndeavourOS, etc.)
- Root Access: sudo privileges on the target machine
- Network Access: Connectivity to your ZEM Cloud server (HTTPS port 443)
- curl: Installed on the system (pacman -S curl if needed)
Enrolment Steps
Step 1: Open the Enrol Endpoint Wizard
- Log in to your ZEM Cloud dashboard
- Click the Enrol Endpoint button (green + icon) in the sidebar
- Select Desktop as the device type
- Select Arch Linux 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-arch.sh | sudo bash -s -- --master-url https://your-zem-server.com --api-key YOUR_API_KEY --auto-reboot true --reboot-time 03:00Click the Copy button to copy the command to your clipboard.
Step 4: Run the Command on the Target Machine
- SSH into your Arch Linux server or open a terminal
- Paste and execute the copied command
- Enter your sudo password when prompted
Step 5: Wait for Installation
The script will automatically:
- Detect your Arch Linux installation
- Install required dependencies using pacman (jq, bc, curl)
- Download the Arch-specific ZEM Cloud agent scripts
- Create the configuration file
- Set up systemd services and timers
- Start the agent
Installation typically takes 30-60 seconds.
What Gets Installed
Agent Scripts
Script | Location | Purpose
zen-update-agent-arch.sh | /usr/local/bin/ | Main agent for updates and actions
zen-update-report-arch.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
Arch Linux-Specific Features
Package Management
The Arch agent uses pacman for package management:
- Update Detection - Uses checkupdates to detect available updates
- Update Installation - Uses pacman -Syu --noconfirm for system updates
- Package Inventory - Reports all installed packages via pacman -Q
Security Updates
Security updates are identified by checking if packages are from the core repository, which typically contains critical security patches.
Verifying Enrolment
Check Agent Status
Check if the agent timer is active:
systemctl status zen-update-agent.timerCheck if the agent service ran successfully:
systemctl status zen-update-agent.serviceView recent agent logs:
journalctl -u zen-update-agent.service -n 50View in Dashboard
- Navigate to Endpoint Overview in ZEM Cloud
- The new endpoint should appear within 60 seconds
- 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 (Arch Linux)
- Update count from checkupdates
- 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.timerEnable the agent to start on boot:
sudo systemctl enable zen-update-agent.timerMissing Dependencies
Install required packages:
sudo pacman -S jq bc curlcheckupdates Not Working
The checkupdates utility is part of the pacman-contrib package:
sudo pacman -S pacman-contribNetwork Issues
Test connectivity to ZEM Cloud:
curl -I https://your-zem-server.com/api/agent_versionCheck DNS resolution:
nslookup your-zem-server.comView Detailed Logs
View full agent log:
sudo cat /var/log/zen-update-agent.logFollow logs in real-time:
sudo tail -f /var/log/zen-update-agent.logCommon 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
checkupdates: command not found | Missing pacman-contrib | Install with pacman -S pacman-contrib
Uninstalling the Agent
To remove the ZEM Cloud agent from an Arch Linux 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.timerRemove service files:
sudo rm /etc/systemd/system/zen-update-*
sudo systemctl daemon-reloadRemove agent scripts:
sudo rm /usr/local/bin/zen-update-*-arch.shRemove configuration:
sudo rm -rf /etc/zen-updateRemove logs:
sudo rm /var/log/zen-update-*.log