惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
GbyAI
GbyAI
M
MIT News - Artificial intelligence
美团技术团队
罗磊的独立博客
雷峰网
雷峰网
量子位
博客园 - 【当耐特】
Last Week in AI
Last Week in AI
D
Docker
小众软件
小众软件
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
WordPress大学
WordPress大学
V
V2EX
博客园_首页
腾讯CDC
The Cloudflare Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat(signal): support container REST API · openclaw/openc...
Hua688 · 2026-05-10 · via Recent Commits to openclaw:main
11

---

2-

summary: "Signal support via signal-cli (JSON-RPC + SSE), setup paths, and number model"

2+

summary: "Signal support via signal-cli (native daemon or bbernhard container), setup paths, and number model"

33

read_when:

44

- Setting up Signal support

55

- Debugging Signal send/receive

66

title: "Signal"

77

---

889-

Status: external CLI integration. Gateway talks to `signal-cli` over HTTP JSON-RPC + SSE.

9+

Status: external CLI integration. Gateway talks to `signal-cli` over HTTP — either native daemon (JSON-RPC + SSE) or bbernhard/signal-cli-rest-api container (REST + WebSocket).

10101111

## Prerequisites

12121313

- OpenClaw installed on your server (Linux flow below tested on Ubuntu 24).

14-

- `signal-cli` available on the host where the gateway runs.

14+

- One of:

15+

- `signal-cli` available on the host (native mode), **or**

16+

- `bbernhard/signal-cli-rest-api` Docker container (container mode).

1517

- A phone number that can receive one verification SMS (for SMS registration path).

1618

- Browser access for Signal captcha (`signalcaptchas.org`) during registration.

1719

@@ -179,6 +181,63 @@ If you want to manage `signal-cli` yourself (slow JVM cold starts, container ini

179181180182

This skips auto-spawn and the startup wait inside OpenClaw. For slow starts when auto-spawning, set `channels.signal.startupTimeoutMs`.

181183184+

## Container mode (bbernhard/signal-cli-rest-api)

185+186+

Instead of running `signal-cli` natively, you can use the [bbernhard/signal-cli-rest-api](https://github.com/bbernhard/signal-cli-rest-api) Docker container. This wraps `signal-cli` behind a REST API and WebSocket interface.

187+188+

Requirements:

189+190+

- The container **must** run with `MODE=json-rpc` for real-time message receiving.

191+

- Register or link your Signal account inside the container before connecting OpenClaw.

192+193+

Example `docker-compose.yml` service:

194+195+

```yaml

196+

signal-cli:

197+

image: bbernhard/signal-cli-rest-api:latest

198+

environment:

199+

MODE: json-rpc

200+

ports:

201+

- "8080:8080"

202+

volumes:

203+

- signal-cli-data:/home/.local/share/signal-cli

204+

```

205+206+

OpenClaw config:

207+208+

```json5

209+

{

210+

channels: {

211+

signal: {

212+

enabled: true,

213+

account: "+15551234567",

214+

httpUrl: "http://signal-cli:8080",

215+

autoStart: false,

216+

apiMode: "container", // or "auto" to detect automatically

217+

},

218+

},

219+

}

220+

```

221+222+

The `apiMode` field controls which protocol OpenClaw uses:

223+224+

| Value | Behavior |

225+

| ------------- | ------------------------------------------------------------------------------------ |

226+

| `"auto"` | (Default) Probes both transports; streaming validates container WebSocket receive |

227+

| `"native"` | Force native signal-cli (JSON-RPC at `/api/v1/rpc`, SSE at `/api/v1/events`) |

228+

| `"container"` | Force bbernhard container (REST at `/v2/send`, WebSocket at `/v1/receive/{account}`) |

229+230+

When `apiMode` is `"auto"`, OpenClaw caches the detected mode for 30 seconds to avoid repeated probes. Container receive is only selected for streaming after `/v1/receive/{account}` upgrades to WebSocket, which requires `MODE=json-rpc`.

231+232+

Container mode supports the same Signal channel operations as native mode where the container exposes matching APIs: sends, receives, attachments, typing indicators, read/viewed receipts, reactions, groups, and styled text. OpenClaw translates its native Signal RPC calls into the container's REST payloads, including `group.{base64(internal_id)}` group IDs and `text_mode: "styled"` for formatted text.

233+234+

Operational notes:

235+236+

- Use `autoStart: false` with container mode. OpenClaw should not spawn a native daemon when `apiMode: "container"` is selected.

237+

- Use `MODE=json-rpc` for receiving. `MODE=normal` can make `/v1/about` look healthy, but `/v1/receive/{account}` does not WebSocket-upgrade, so OpenClaw will not select container receive streaming in `auto` mode.

238+

- Set `apiMode: "container"` when you know the `httpUrl` points at bbernhard's REST API. Set `apiMode: "native"` when you know it points at native `signal-cli` JSON-RPC/SSE. Use `"auto"` when the deployment may vary.

239+

- Container attachment downloads honor the same media byte limits as native mode. Oversized responses are rejected before being fully buffered when the server sends `Content-Length`, and while streaming otherwise.

240+182241

## Access control (DMs + groups)

183242184243

DMs:

@@ -202,7 +261,8 @@ Groups:

202261203262

## How it works (behavior)

204263205-

- `signal-cli` runs as a daemon; the gateway reads events via SSE.

264+

- Native mode: `signal-cli` runs as a daemon; the gateway reads events via SSE.

265+

- Container mode: the gateway sends via REST API and receives via WebSocket.

206266

- Inbound messages are normalized into the shared channel envelope.

207267

- Replies always route back to the same number or group.

208268

@@ -302,6 +362,7 @@ Full configuration: [Configuration](/gateway/configuration)

302362

Provider options:

303363304364

- `channels.signal.enabled`: enable/disable channel startup.

365+

- `channels.signal.apiMode`: `auto | native | container` (default: auto). See [Container mode](#container-mode-bbernhardsignal-cli-rest-api).

305366

- `channels.signal.account`: E.164 for the bot account.

306367

- `channels.signal.cliPath`: path to `signal-cli`.

307368

- `channels.signal.httpUrl`: full daemon URL (overrides host/port).