How to Deploy OpenClaw: A Local AI Agent on macOS with Docker and Feishu Integration

This guide walks you through installing Docker, Git, and Node.js on a macOS machine, cloning the OpenClaw repository, configuring the gateway token, installing the Feishu plugin, and verifying that the AI agent can be controlled via Feishu messages, all without relying on cloud services.

Java Backend Technology
Java Backend Technology
Java Backend Technology
How to Deploy OpenClaw: A Local AI Agent on macOS with Docker and Feishu Integration

Overview

OpenClaw is an AI agent that automates any local computer task and supports multi‑channel interaction via Telegram, WhatsApp, Slack and Feishu.

Prerequisites

macOS (compatible version)

Docker Desktop

Git

Node.js (LTS)

Step 1 – Install the environment

Install Node.js LTS for macOS from https://nodejs.org/en/download/.

Install Git for macOS from https://git-scm.com/download/mac.

Install Docker Desktop that matches your macOS version.

Step 2 – Clone and set up OpenClaw

git clone https://github.com/openclaw/openclaw
cd openclaw
./docker-setup.sh

After the script finishes, open the UI at http://127.0.0.1:18789/?token=YOUR_TOKEN, choose “QuickStart”, and select a model (e.g., MiniMax) to obtain a free token.

Step 3 – Configure the gateway token

If the UI shows disconnected (1008): unauthorized: gateway token missing, edit the generated openclaw.json so that gateway.remote.token equals gateway.auth.token:

cat > /Users/$(whoami)/openclaw/openclaw.json <<'EOF'
{
  "gateway": {
    "auth": {
      "token": "YOUR_GATEWAY_TOKEN"
    },
    "remote": {
      "token": "YOUR_GATEWAY_TOKEN"
    }
  }
}
EOF

Copy the file into the running container and restart the gateway:

docker cp /Users/$(whoami)/openclaw/openclaw.json openclaw-openclaw-gateway-1:/home/node/.openclaw/openclaw.json
docker-compose restart openclaw-gateway

Step 4 – Install the Feishu plugin

Register a Feishu enterprise application and obtain the App ID and App Secret. Enable the following scopes:

im:message
im:message.p2p_msg:readonly
im:message.group_at_msg:readonly
im:message:send_as_bot
im:resource

Install the plugin via Docker:

docker compose run --rm openclaw-cli plugins install @m1heng-clawd/feishu

Add the credentials to the channel configuration (usually at ~/.openclaw/openclaw.json):

"channels": {
  "feishu": {
    "appId": "YOUR_APP_ID",
    "appSecret": "YOUR_APP_SECRET",
    "domain": "feishu",
    "connectionMode": "websocket",
    "dmPolicy": "pairing",
    "groupPolicy": "open",
    "requireMention": true,
    "enabled": true,
    "mediaMaxMb": 30,
    "renderMode": "auto"
  }
}

Restart the gateway to apply the plugin configuration:

docker compose restart openclaw-gateway

Step 5 – Configure Feishu event subscription

In the Feishu developer console, go to “Credentials & Basic Info” to copy the App ID and Secret, then open “Event & Callback → Subscription Mode”. Choose “Long connection”, enable “Receive message” events, and save.

Verification

Send a message to the bot from a Feishu chat. If the computer replies, OpenClaw is successfully integrated and can be controlled through Feishu.

DockerFeishuAI AgentmacOSOpenClaw
Java Backend Technology
Written by

Java Backend Technology

Focus on Java-related technologies: SSM, Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading. Occasionally cover DevOps tools like Jenkins, Nexus, Docker, and ELK. Also share technical insights from time to time, committed to Java full-stack development!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.