From df945227521a769eadd0da66bc9b3b18707bd37f Mon Sep 17 00:00:00 2001 From: techartdev Date: Sun, 8 Feb 2026 20:02:56 +0200 Subject: [PATCH] Update documentation and Dockerfile for Homebrew installation; fix version in config.yaml to 0.5.35 --- DOCS.md | 26 +++++++++++++++++++++++++- openclaw_assistant/Dockerfile | 25 ++++++++++++++++++------- openclaw_assistant/brew-wrapper.sh | 8 ++++++++ openclaw_assistant/config.yaml | 2 +- 4 files changed, 52 insertions(+), 9 deletions(-) diff --git a/DOCS.md b/DOCS.md index 7f48a84..f1d7153 100644 --- a/DOCS.md +++ b/DOCS.md @@ -153,14 +153,21 @@ This allows using the Control UI over LAN HTTP. This add-on keeps options minimal but practical. See `openclaw_assistant_dev/config.yaml` for the full schema. ### Gateway Network Settings -Control how the OpenClaw gateway binds to the network: +Control how the OpenClaw gateway operates and binds to the network: + +- **`gateway_mode`** (string: **local** or **remote**, default **local**) + - **local**: Run the gateway locally in this add-on (recommended for most users) + - **remote**: Connect to a remote gateway running elsewhere + - This setting determines whether OpenClaw runs its own gateway or connects to an existing one - **`gateway_bind_mode`** (string: **loopback** or **lan**, default **loopback**) - **loopback**: Bind to 127.0.0.1 only — secure, local access only - **lan**: Bind to all interfaces — accessible from your local network + - Only applies when `gateway_mode` is **local** - **`gateway_port`** (int, default **18789**) - Port number for the gateway to listen on + - Only applies when `gateway_mode` is **local** - **`allow_insecure_auth`** (bool, default **false**) - Allow HTTP authentication for gateway access on LAN @@ -204,6 +211,23 @@ How to provide the key: ## Troubleshooting +### Some skills fail to install (Homebrew errors) + +If you see errors like: +- `Homebrew's x86_64 support on Linux requires a CPU with SSSE3 support!` +- `spawn brew ENOENT` or `brew: command not found` + +**Cause**: Your CPU doesn't support SSSE3 instructions (required by Homebrew). This affects older CPUs like some Intel Atom, Celeron, or pre-2006 processors. + +**Impact**: Skills that depend on CLI tools installed via Homebrew (e.g., `gemini`, `aider`) won't install. Core OpenClaw functionality still works. + +**Solutions**: +1. **Use a newer CPU** with SSSE3 support (Intel Core 2 or newer, ~2006+) +2. **Install dependencies manually** if you know which tools are needed +3. **Use alternative skills** that don't require Homebrew dependencies + +The add-on will still start and work - Homebrew is optional. + ### I get ERR_CONNECTION_REFUSED - The gateway is not reachable at that IP/port. - Confirm bind/port in terminal: diff --git a/openclaw_assistant/Dockerfile b/openclaw_assistant/Dockerfile index 98fac6f..735849e 100644 --- a/openclaw_assistant/Dockerfile +++ b/openclaw_assistant/Dockerfile @@ -55,7 +55,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # Install Homebrew (Linuxbrew) for OpenClaw skill dependencies -# Homebrew is required for installing CLI tools like gemini, aider, etc. +# Homebrew is optional - some skills need CLI tools like gemini, aider, etc. +# NOTE: Homebrew requires CPU with SSSE3 support (Intel Core 2 or newer, ~2006+) +# If installation fails (e.g., older CPUs), the add-on will still work but some skills may not install ENV HOMEBREW_NO_AUTO_UPDATE=1 \ HOMEBREW_NO_INSTALL_CLEANUP=1 \ HOMEBREW_NO_ANALYTICS=1 @@ -65,13 +67,17 @@ RUN useradd -m -s /bin/bash linuxbrew \ && chown -R linuxbrew:linuxbrew /home/linuxbrew USER linuxbrew -RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \ - && cd /home/linuxbrew/.linuxbrew/Homebrew \ - && git config --global --add safe.directory /home/linuxbrew/.linuxbrew/Homebrew \ - && /home/linuxbrew/.linuxbrew/bin/brew update --force +RUN /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || \ + (echo "WARNING: Homebrew installation failed (likely unsupported CPU - requires SSSE3). Some skills may not work." && exit 0) +RUN if [ -d /home/linuxbrew/.linuxbrew/Homebrew ]; then \ + cd /home/linuxbrew/.linuxbrew/Homebrew && \ + git config --global --add safe.directory /home/linuxbrew/.linuxbrew/Homebrew && \ + /home/linuxbrew/.linuxbrew/bin/brew update --force || true; \ + fi USER root # Add Homebrew to PATH for all users (wrapper comes first to intercept root calls) +# PATH is set even if brew failed - wrapper will handle missing brew gracefully ENV PATH="/usr/local/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}" # Copy brew wrapper that allows root to run brew by delegating to linuxbrew user @@ -79,9 +85,14 @@ COPY brew-wrapper.sh /usr/local/bin/brew RUN chmod +x /usr/local/bin/brew # Verify brew is available and install gcc (needed for compiling some brew packages) -# Must run as linuxbrew user - Homebrew refuses to run as root +# Skip if brew installation failed USER linuxbrew -RUN /home/linuxbrew/.linuxbrew/bin/brew --version && /home/linuxbrew/.linuxbrew/bin/brew install gcc +RUN if [ -x /home/linuxbrew/.linuxbrew/bin/brew ]; then \ + /home/linuxbrew/.linuxbrew/bin/brew --version && \ + /home/linuxbrew/.linuxbrew/bin/brew install gcc || true; \ + else \ + echo "Skipping gcc installation - Homebrew not available"; \ + fi USER root # Install OpenClaw globally diff --git a/openclaw_assistant/brew-wrapper.sh b/openclaw_assistant/brew-wrapper.sh index e996d56..622924f 100644 --- a/openclaw_assistant/brew-wrapper.sh +++ b/openclaw_assistant/brew-wrapper.sh @@ -4,6 +4,14 @@ REAL_BREW="/home/linuxbrew/.linuxbrew/bin/brew" +# Check if Homebrew is actually installed +if [ ! -x "$REAL_BREW" ]; then + echo "ERROR: Homebrew is not installed (likely due to unsupported CPU - requires SSSE3)." >&2 + echo "Some OpenClaw skills that depend on CLI tools (gemini, aider, etc.) will not work." >&2 + echo "Consider using a newer CPU or installing dependencies manually." >&2 + exit 127 +fi + if [ "$(id -u)" = "0" ]; then # Running as root - use sudo to run as linuxbrew user # Preserve necessary environment variables and properly pass all arguments diff --git a/openclaw_assistant/config.yaml b/openclaw_assistant/config.yaml index eed9530..63be8de 100644 --- a/openclaw_assistant/config.yaml +++ b/openclaw_assistant/config.yaml @@ -1,5 +1,5 @@ name: OpenClaw Assistant -version: "0.5.34" +version: "0.5.35" slug: openclaw_assistant description: Run OpenClaw Assistant (OpenClaw-compatible) as a Home Assistant add-on. url: https://github.com/techartdev/OpenClawHomeAssistant