hostlink

Execute commands on the host machine from inside the OpenClaw container via the HostLink daemon. Provides secure, authenticated remote shell execution over a Unix domain socket (local) or TCP/WireGuard (remote). Use when you need to run commands on the host: access files outside the container, run host-side tools, interact with the Qwen3 merge project, manage Docker on the host, or execute anything requiring host-level access. The 'hostlink' binary is in PATH. Triggers on: "run on host", "execute on host", "host command", "outside container", "host machine", "hostlink", "hostlinkd".

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "hostlink" with this command: npx skills add jebadiahgreenwood/hostlink

HostLink Skill

Execute commands on the host machine from inside this container.

Quick Reference

# Execute a command on the host
hostlink exec "ls /home/jebadiah"

# Ping the daemon (connection test)
hostlink ping

# With explicit socket/token (if env vars not set)
hostlink -s /run/hostlink/hostlink.sock -k $HOSTLINK_TOKEN exec "echo hello"

# Set working directory
hostlink -w /home/jebadiah exec "pwd"

# Set environment variables
hostlink -e MY_VAR=value exec "echo $MY_VAR"

# With timeout (ms)
hostlink -T 60000 exec "long-running-command"

# JSON output (machine-readable)
hostlink -j exec "ls -la" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['stdout'])"

# List configured targets
hostlink targets

Environment Variables

Set these so you don't need to pass flags every time:

VariablePurposeDefault
HOSTLINK_SOCKETUnix socket path/run/hostlink/hostlink.sock
HOSTLINK_TOKENAuth token(required)
HOSTLINK_TARGETTarget node name(optional)

Best place to set these: workspace/.env or openclaw.json env.vars section.

Connection Status

Check if hostlinkd is reachable:

hostlink ping
# Expected: [hostname] pong - uptime Xs
# If error: daemon not running or socket not mounted

Common Use Cases

Access host filesystem

hostlink exec "ls /home/jebadiah/projects"
hostlink exec "cat /etc/hostname"

Run host-side GPU/ML tools

hostlink exec "nvidia-smi"
hostlink exec "ollama list"
hostlink exec "ls ~/.cache/huggingface/hub"

Access the Qwen3 merge project

hostlink exec "ls /path/to/qwen3-merge"
hostlink exec "cat /path/to/qwen3-merge/README.md"

Docker management on host

hostlink exec "docker ps"
hostlink exec "docker stats --no-stream"

Exit Codes

CodeMeaning
0Success
1Remote command failed (check exit_code in JSON output)
2Connection failed (daemon unreachable)
3Authentication failed (wrong token)
5Timeout
7Client error (bad args, missing targets file)

Troubleshooting

"Connection failed" / exit 2:

  • hostlinkd not running on host: sudo systemctl start hostlinkd
  • Socket not mounted: check docker-compose volume mount
  • Wrong socket path: check HOSTLINK_SOCKET env var

"Authentication failed" / exit 3:

  • Wrong HOSTLINK_TOKEN — must match auth_token in /etc/hostlink/hostlink.conf

"server busy" error:

  • Host is at max_concurrent limit — retry shortly

Architecture

Container (you are here)          Host machine
┌─────────────────────┐          ┌──────────────────────────┐
│  hostlink (client)  │◄────────►│  hostlinkd (daemon)      │
│  workspace/bin/     │  Unix    │  /etc/hostlink/           │
│                     │  socket  │  auth_token = <secret>    │
└─────────────────────┘          │  shell = /bin/bash        │
                                 └──────────────────────────┘

See references/setup.md for installation and docker-compose configuration.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

Flue — Desktop Software Bridge

Flue is a lightweight bridge enabling command-line control of professional desktop software by executing scripts inside the app's automation runtime and retu...

Registry SourceRecently Updated
510Profile unavailable
General

HeyCube AI Memory Butler

引导安装 HeyCube 黑方体个人档案管理服务到 OpenClaw。分步配置:设置环境变量、安装 SQLite 工具、安装口令触发 Skill。 用户主动说"安装黑方体"、"配置 HeyCube"、"heycube setup"时触发。

Registry SourceRecently Updated
2200Profile unavailable
General

Windows Local Embedding

在 Windows 上为 OpenClaw 配置本地 embedding / 本地记忆检索时使用。适用于:下载并接入 `nomic-embed-text-v1.5.Q8_0.gguf`、把 `memorySearch.provider` 改成 `local`、检查 `openclaw memory status...

Registry SourceRecently Updated
2920Profile unavailable
General

Auto Create AI Team

Automatically create and configure AI team structures for projects with single, dual, or custom modes, integrating MCP and OpenClaw services.

Registry SourceRecently Updated
3360Profile unavailable