HostLink for Openclaw

HostLink enables secure, authenticated execution of host-level commands directly from within an OpenClaw container.

jebadiahgreenwood
v0.1.0
Apr 4, 2026
0
619
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install hostlink

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install hostlink using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is HostLink?

HostLink is a specialized utility designed to bridge the gap between isolated container environments and the underlying host operating system. By utilizing the HostLink daemon (hostlinkd), AI agents can break out of container restrictions to perform essential system-level tasks while maintaining a strict security posture through token-based authentication.

This skill is an essential part of the Openclaw Skills ecosystem for developers who need their AI agents to interact with host-side hardware like GPUs, manage Docker containers, or access specific local filesystems that aren't natively mounted. It provides a seamless CLI experience that feels local but executes with the full permissions and context of the host machine.

HostLink Use Cases

  • Accessing files and directories outside the container environment (e.g., /home/user/projects).
  • Running host-side GPU and Machine Learning tools like nvidia-smi or Ollama.
  • Managing host-level Docker containers and monitoring system stats.
  • Interacting with specific host-resident projects such as the Qwen3 merge project.
  • Executing administrative commands requiring host-level shell access.

How HostLink Works

  1. The user or AI agent invokes the hostlink client binary within the container.
  2. The client establishes a connection to the hostlinkd daemon via a Unix domain socket or TCP/WireGuard tunnel.
  3. Secure authentication is performed using a pre-configured HOSTLINK_TOKEN.
  4. The command is transmitted to the host and executed within a specified shell (e.g., /bin/bash).
  5. Standard output, errors, and exit codes are streamed back to the container in real-time or as a JSON payload.

HostLink Setup

To get started with this component of Openclaw Skills, ensure the hostlinkd daemon is running on your host and the socket is accessible.

# Install and start the daemon on the host
sudo systemctl start hostlinkd

# Set required environment variables in your workspace/.env
HOSTLINK_SOCKET=/run/hostlink/hostlink.sock
HOSTLINK_TOKEN=your_secure_token_here

# Test the connection from within the container
hostlink ping

HostLink Data Schema & Taxonomy

HostLink uses a structured approach to manage remote execution and configuration:

Component Type Description
hostlink.sock Socket The communication bridge between container and host.
hostlink.conf Config Located at /etc/hostlink/; defines shell and auth_token.
JSON Output Schema Includes fields for stdout, stderr, and exit_code when using the -j flag.
Environment Variables Uses HOSTLINK_SOCKET, HOSTLINK_TOKEN, and HOSTLINK_TARGET for session defaults.

HostLink Advanced Features

  • Multi-target support to execute commands across different nodes using HOSTLINK_TARGET.
  • Machine-readable JSON output mode for automated parsing and multi-agent workflows.
  • Configurable execution timeouts to prevent orphaned or long-running host processes.
  • Working directory overrides to execute commands in specific host paths.
  • Environment variable injection to pass context from container to host shell.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*