OneStopList

Gods and goddesses

How to Install Hermes Agent: Step-by-Step Guide

Updated November 24, 2026

Hermes Agent is a lightweight, open-source monitoring and management agent used to collect system metrics, execute remote commands, and report back to a central Hermes server. Installing it is straightforward on Linux and macOS systems, and this guide walks you through the entire process, from prerequisites to verification. By the end, you’ll have a running agent that securely connects to your Hermes server and starts sending data.

What You’ll Need

  • A Linux (systemd-based, e.g., Ubuntu 20.04+, Debian 10+, CentOS 8+) or macOS (10.15+) machine.
  • Root or sudo access on the target machine.
  • A running Hermes server (or the server URL and an API token).
  • Internet access to download the agent binary (or a local copy if offline).
  • Basic command-line familiarity.

Step-by-Step

  1. Download the Hermes Agent binary. Visit the official Hermes Agent GitHub releases page and download the latest release for your operating system and architecture (e.g., hermes-agent-linux-amd64.tar.gz). Alternatively, use the direct download link provided by your Hermes server administrator.
  2. Extract the archive. Open a terminal and navigate to your download directory. Run tar -xzf hermes-agent-linux-amd64.tar.gz (adjust the filename as needed). This creates a folder containing the hermes-agent binary and a sample configuration file.
  3. Move the binary to a system path. Copy the binary to /usr/local/bin/ (or /usr/bin/) using sudo mv hermes-agent /usr/local/bin/. Make it executable with sudo chmod +x /usr/local/bin/hermes-agent.
  4. Create a configuration file. Hermes Agent expects a config file, typically at /etc/hermes-agent/config.yaml. Create the directory with sudo mkdir -p /etc/hermes-agent, then copy the sample config: sudo cp hermes-agent.example.yaml /etc/hermes-agent/config.yaml.
  5. Edit the configuration. Open the config file with your editor (e.g., sudo nano /etc/hermes-agent/config.yaml). Set the following essential values:
    • server_url: The full URL of your Hermes server, e.g., https://hermes.example.com.
    • agent_token: Your unique agent token (provided by your Hermes server admin).
    • agent_name: A human-readable name for this machine, e.g., web-server-01.

    Save the file.

  6. Test the agent manually. Run hermes-agent --config /etc/hermes-agent/config.yaml in the foreground. You should see log output indicating a successful connection to the server. If it fails, check the Troubleshooting section below.
  7. Install as a system service (Linux). Use the provided systemd unit file (in the extracted folder) or create your own. Copy it: sudo cp hermes-agent.service /etc/systemd/system/. Then reload systemd: sudo systemctl daemon-reload.
  8. Enable and start the service. Run sudo systemctl enable hermes-agent to start on boot, then sudo systemctl start hermes-agent. Check status with sudo systemctl status hermes-agent.
  9. For macOS (launchd). If on macOS, create a LaunchDaemon plist file in /Library/LaunchDaemons/com.hermes.agent.plist that runs the binary with the config path. Load it with sudo launchctl load /Library/LaunchDaemons/com.hermes.agent.plist.
  10. Verify the agent is running. Check the logs: sudo journalctl -u hermes-agent -f (Linux) or sudo tail -f /var/log/hermes-agent.log (macOS). You should see periodic heartbeats. Also, log into your Hermes server dashboard and confirm the agent appears as online.

Common Mistakes

  • Wrong architecture: Downloading the wrong binary (e.g., ARM on x86) leads to an “exec format error” or immediate crash. Always verify with uname -m.
  • Incorrect token or URL: A typo in the server URL or token prevents authentication. Double-check both, and ensure the URL has no trailing slash.
  • Config file permissions: If the config file is world-readable, the agent may refuse to start for security reasons. Set sudo chmod 600 /etc/hermes-agent/config.yaml.
  • Forgetting to enable the service: The agent runs only until reboot unless you run systemctl enable.
  • Firewall blocking outbound traffic: The agent needs outbound HTTPS (port 443) to reach the server. Check your firewall rules.

Tips

  • Use a dedicated service account for the agent instead of root, if your setup allows. Create one with sudo useradd -r hermes and run the service as that user.
  • Keep the agent binary updated by subscribing to release notifications or using a package manager if available.
  • Test the agent in a staging environment before deploying to production.
  • Set up log rotation for the agent’s log file to prevent disk exhaustion.
  • If you have multiple agents, use descriptive names to easily identify machines in the dashboard.

Troubleshooting

  • Agent won’t start: Run it in the foreground with hermes-agent --config /etc/hermes-agent/config.yaml --verbose to see detailed errors. Common issues include invalid YAML (check indentation) or missing dependencies (e.g., libssl).
  • Connection refused: Verify the server is reachable: curl -I https://your-server-url. If it fails, check network connectivity and DNS. If the server uses a self-signed certificate, you may need to set insecure_skip_verify: true in the config (not recommended for production).
  • Authentication error: Ensure the token is correct and not expired. Regenerate a token on the server if needed.
  • Agent starts but shows as offline in dashboard: The agent may be sending heartbeats but the server isn’t receiving them due to a time skew (ensure NTP is enabled). Also check that the agent’s clock is synchronized.
  • High CPU usage: This is rare but can happen if the agent is misconfigured to poll too frequently. Check your config for interval settings and increase if necessary.
  • Permission denied on config: The agent process must have read access to the config file. If running as a service user, adjust ownership: sudo chown hermes:hermes /etc/hermes-agent/config.yaml.

Frequently Asked Questions

  • Can I install Hermes Agent on Windows? Currently, official binaries are only for Linux and macOS. Windows users can run it in WSL2 or a Linux VM.
  • Do I need to open any inbound ports? No, the agent initiates all connections outbound to the server. No inbound ports are required.
  • How do I update the agent? Download the new binary, stop the service, replace the binary, and start the service again. Your config remains intact.
  • Can I run multiple agents on the same machine? Yes, but you must use different config files and service names. Each agent needs its own token and name.
  • Is the agent compatible with systemd? Yes, it ships with a systemd unit file. For non-systemd init systems, you can run it as a daemon using nohup or a custom init script.
  • What happens if the server is temporarily unreachable? The agent will retry periodically with exponential backoff. It does not buffer metrics, so data during downtime is lost, but it will reconnect automatically.

Related

How pages are sourced and corrected: Sources and editorial policy.