Installing the ConHive Agent
This guide provides detailed steps for installing the ConHive Agent on your system. Choose the method that best suits your environment and requirements.
Method 1: Quick Download Script (Linux/macOS)
Section titled “Method 1: Quick Download Script (Linux/macOS)”This script downloads the latest agent binary and extracts it into a conhive
subdirectory in your current working directory.
-
Open your terminal.
-
Run one of the following commands:
Terminal window # Using curl:curl -sSL [https://conhive.ai/download](https://conhive.ai/download) | bash -s agentcurl -sSL https://conhive.ai/download | bash -s agent# Using wget:wget -qO- [https://conhive.ai/download](https://conhive.ai/download) | bash -s agent -
The script will output instructions on how to start the agent from the
conhive
directory.
Method 2: Installer Script (Linux Systemd)
Section titled “Method 2: Installer Script (Linux Systemd)”This script provides a more integrated installation on Linux systems using systemd
. It installs the agent, sets it up as a background service, and performs initial checks. Ideal for servers.
-
Open your terminal.
-
Run one of the following commands:
Terminal window # Using curl:curl -sSL [https://conhive.ai/installer.sh](https://conhive.ai/installer.sh) | bash -s agent# Using wget:wget -qO- [https://conhive.ai/installer.sh](https://conhive.ai/installer.sh) | bash -s agent -
The installer script performs the following actions:
- Backs up any existing agent binary found in the target location.
- Downloads the latest agent binary and installs it (typically to
/usr/local/bin/conhive-agent
). - Creates a
systemd
service file (/etc/systemd/system/conhive-agent.service
). - Creates helper scripts (e.g.,
conhive-agent-killall
,conhive-agent-uninstall
) in the binary location. - Starts the
conhive-agent
service. - Performs a health check to ensure the service started correctly.
- Reverts to the backup if the health check fails.
-
You can manage the service using standard
systemctl
commands (see Usage or Quick Start).
Method 3: Manual Installation (Linux/Windows)
Section titled “Method 3: Manual Installation (Linux/Windows)”This method involves downloading the agent archive directly and placing the binary manually.
- Download: Navigate to the ConHive Release Hub. Download the correct archive (
.tar.gz
for Linux,.zip
for Windows) for your Operating System and CPU architecture. - Extract:
- Linux: Open a terminal and use the
tar
command:Terminal window # Replace <archive_name> with the actual downloaded filenametar -xzf <archive_name.tar.gz># Example: tar -xzf conhive-agent_linux_x86_64.tar.gz - Windows: Use Windows Explorer or a tool like 7-Zip to extract the contents of the downloaded
.zip
file.
- Linux: Open a terminal and use the
- Copy Binary: Move the extracted binary (
conhive-agent
on Linux,conhive-agent.exe
on Windows) to a suitable location.- Linux: A common location is
/usr/local/bin/
. Ensure this location is in your system’s$PATH
.Terminal window # Example: Moving the binary after extractionsudo mv ./conhive-agent /usr/local/bin/conhive-agent - Windows: You can place it in a folder like
C:\Program Files\ConHiveAgent\
or any other preferred location. Consider adding this location to your system’sPATH
environment variable for easier access.
- Linux: A common location is
- Set Permissions (Linux Only): Make the binary executable.
Terminal window # Example: If you copied it to /usr/local/bin/sudo chmod +x /usr/local/bin/conhive-agent# Or if it's still in the current directory:chmod +x ./conhive-agent
Method 4: Docker Container
Section titled “Method 4: Docker Container”Run the ConHive Agent within a Docker container for isolation and easy deployment.
-
Ensure you have Docker installed and running.
-
Open your terminal or command prompt.
-
Run the following command:
Terminal window docker run -d --name conhive-agent -p 5050:5050 --restart always ai2hive/conhive-agent:latest-d
: Runs the container in detached mode (in the background).--name conhive-agent
: Assigns a recognizable name to the container.-p 5050:5050
: Maps port 5050 on your host machine to port 5050 inside the container, allowing access to the agent’s web interface/API.--restart always
: Configures the container to restart automatically if it stops or if the Docker daemon restarts.ai2hive/conhive-agent:latest
: Specifies the official ConHive Agent image from Docker Hub.
-
The agent is now running inside the container. You can access its web interface (if enabled) via
http://<your-docker-host-ip>:5050
. If running Docker locally, this is oftenhttp://localhost:5050
.