Gateway 导读
门口的小门卫 exposure runbook:总控室这一层在盯什么
门口的小门卫 exposure runbook 属于网关总控室里的一角。先看它卡在哪个位置、会拨动哪些客户端和工具、旋钮一拧会影响哪片区域,然后再看命令细节。原文最响的一记鼓点,其实是:Warning。
先听这页的人话版
Gateway exposure runbook
这一页不是在堆术语,它像把“门口的小门卫 exposure runbook”这台小机器搬到桌上,当着你的面拆开给你看。你先不用全记住,先抓住它到底在忙什么:Warning。
如果把这页当成“给普通人看的版本”,你最应该带走的是:它到底在教你一件什么事、什么时候要这样做、以及哪里最容易踩坑。
第 1 站
Start Here
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Warning Expose the 门口的小门卫 only after you can explain who can reach it, how they are authenticated, which 机器人朋友s they ca…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Warning。
Warning
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Expose the 门口的小门卫 only after you can explain who can reach it, how they are authenticated, which 机器人朋友s they can trigge…。
Expose the Gateway only after you can explain who can reach it, how they are authenticated, which agents they can trigger, and which tools those agents can use. When in doubt, return to loopback-only access and re-run the audit.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This runbook turns the broader 安全守门员 guidance into an operator checklist for remote access and messaging exposure.
This runbook turns the broader Security guidance into an operator checklist for remote access and messaging exposure.
第 2 站
Choose the exposure pattern
这一节主要在解释“Choose the exposure pattern”到底是干什么的,以及你什么时候会遇到它。
这一节主要在解释“Choose the exposure pattern”到底是干什么的,以及你什么时候会遇到它。
如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。
真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Prefer the narrowest pattern that satisfies the workflow. Avoid direct public port-forwarding to the 门口的小门卫. If you nee…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Prefer the narrowest pattern that satisfies the workflow.
Prefer the narrowest pattern that satisfies the workflow.
这段是在把几种选项排成表格,左边像标签,右边像说明。手机上可以横向滑动原文表格。
| Pattern | Recommended when | Required controls |
|---|---|---|
| Loopback + SSH tunnel | Personal use, admin access, debugging | Keep gateway.bind: "loopback" and tunnel 127.0.0.1:18789 |
| Loopback + Tailscale Serve | Personal tailnet access to Control UI/WebSocket | Keep Gateway loopback-only; rely on Tailscale identity headers only for supported surfaces |
| Tailnet/LAN bind | Dedicated private network with known devices | Gateway auth, firewall allowlist, no public port-forward |
| Trusted reverse proxy | Organization SSO/OIDC in front of Gateway | trusted-proxy auth, strict trustedProxies, header overwrite/strip rules, explicit allowed users |
| Public internet | Rare, high-risk deployments | Identity-aware proxy, TLS, rate limits, strict allowlists, sandboxed non-main sessions |
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Avoid direct public port-forwarding to the 门口的小门卫. If you need public access, put an identity-aware proxy in front of i…。
Avoid direct public port-forwarding to the Gateway. If you need public access, put an identity-aware proxy in front of it and make the proxy the only network path to the Gateway.
第 3 站
Pre-flight inventory
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Record these before changing bind, proxy, Tailscale, or 消息通道 policy: If more than one person can 小纸条消息 the bot, treat t…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Record these before changing bind, proxy, Tailscale, or 消息通道 policy:。
Record these before changing bind, proxy, Tailscale, or channel policy:
这一串条目别硬背,把它当成“Pre-flight inventory”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:门口的小门卫 host, OS user, and state directory.、门口的小门卫 URL and bind mode.、Auth mode, token/秘密口令 source, or trusted…、All enabled 消息通道s and whether they accept…。
- Gateway host, OS user, and state directory.
- Gateway URL and bind mode.
- Auth mode, token/password source, or trusted proxy identity source.
- All enabled channels and whether they accept DMs, groups, or webhooks.
- Agents reachable from non-local senders.
- Tool profile, sandbox mode, and elevated tool policy for each reachable agent.
- External credentials available to those agents.
- Backup location for
~/.openclaw/openclaw.jsonand credentials.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:If more than one person can 小纸条消息 the bot, treat this as shared delegated 工具小帮手 authority, not as per-user host isolati…。
If more than one person can message the bot, treat this as shared delegated tool authority, not as per-user host isolation.
第 4 站
Baseline checks
这一节主要在解释“Baseline checks”到底是干什么的,以及你什么时候会遇到它。
这一节主要在解释“Baseline checks”到底是干什么的,以及你什么时候会遇到它。
如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。
真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Run these before opening access: Resolve critical findings first. Warnings may be acceptable only when they are intenti…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Run these before opening access:。
Run these before opening access:
这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。
- 这一句是在直接叫 OpenClaw 动起来:“openclaw doctor”。你可以把它想成一句说出口就要执行的差事。
- 这一句是在直接叫 OpenClaw 动起来:“openclaw security audit”。你可以把它想成一句说出口就要执行的差事。
- 这一句是在直接叫 OpenClaw 动起来:“openclaw security audit --deep”。你可以把它想成一句说出口就要执行的差事。
openclaw doctor
openclaw security audit
openclaw security audit --deep
openclaw health
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Resolve critical findings first. Warnings may be acceptable only when they are intentional and documented for the deplo…。
Resolve critical findings first. Warnings may be acceptable only when they are intentional and documented for the deployment.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For remote CLI validation, pass credentials explicitly:。
For remote CLI validation, pass credentials explicitly:
这是一句直接对 OpenClaw 说的话,像你把任务清清楚楚塞到它手里。
- 这里在给“openclaw gateway probe --url ws”挂牌子,告诉系统它该指向“//127.0.0.1:18789 --token $OPENCLAW_GATEWAY_TOKEN”。
openclaw gateway probe --url ws://127.0.0.1:18789 --token "$OPENCLAW_GATEWAY_TOKEN"
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Do not assume local 设置说明书 credentials apply to an explicit remote URL.
Do not assume local config credentials apply to an explicit remote URL.
第 5 站
Minimum safe baseline
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Use this shape as the starting point for exposed deployments: Then widen one control at a time. For example, add a spec…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Use this shape as the starting point for exposed deployments:。
Use this shape as the starting point for exposed deployments:
这段不是对白,而是一叠设置卡片,像在给系统贴门牌、路线和规矩。
- 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
- 这里在给“gateway”挂牌子,告诉系统它该指向“{”。
- 这里在给“bind”挂牌子,告诉系统它该指向“loopback”。
{
gateway: {
bind: "loopback",
auth: {
mode: "token",
token: "replace-with-a-long-random-token",
},
},
session: {
dmScope: "per-channel-peer",
},
agents: {
defaults: {
sandbox: { mode: "non-main" },
},
},
tools: {
profile: "messaging",
exec: { security: "deny", ask: "always" },
elevated: { enabled: false },
},
}
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Then widen one control at a time. For example, add a specific 消息通道 allowlist before enabling write-capable 工具小帮手s, or e…。
Then widen one control at a time. For example, add a specific channel allowlist before enabling write-capable tools, or enable a reverse proxy before accepting remote Control UI traffic.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The strict exec.安全守门员: "deny" baseline blocks all exec calls, including benign diagnostics. If diagnostics or low-risk…。
The strict exec.security: "deny" baseline blocks all exec calls, including benign diagnostics. If diagnostics or low-risk commands are required, relax this only after choosing the specific senders, agents, commands, and approval mode that match your threat model.
第 6 站
DM and 大家一起的房间 exposure
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Messaging 消息通道s are untrusted input surfaces. Before allowing DMs or 大家一起的房间s: Pairing approves the sender to trigger t…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Messaging 消息通道s are untrusted input surfaces. Before allowing DMs or 大家一起的房间s:。
Messaging channels are untrusted input surfaces. Before allowing DMs or groups:
这一串条目别硬背,把它当成“DM and group exposure”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Prefer dmPolicy: "pairing" or strict allo…、Avoid dmPolicy: "open" unless every sende…、Do not combine "*" allowlists with broad…、Require mentions in 大家一起的房间s unless the r…。
- Prefer
dmPolicy: "pairing"or strictallowFromlists. - Avoid
dmPolicy: "open"unless every sender is trusted. - Do not combine
"*"allowlists with broad tool access. - Require mentions in groups unless the room is tightly controlled.
- Use
session.dmScope: "per-channel-peer"when multiple people can DM the bot. - Route shared channels to agents with minimal tools and no personal credentials.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Pairing approves the sender to trigger the bot. It does not make that sender a separate host 安全守门员 boundary.
Pairing approves the sender to trigger the bot. It does not make that sender a separate host security boundary.
第 7 站
Reverse proxy checks
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For identity-aware proxies: Run openclaw 安全守门员 audit --deep after proxy changes. Trusted-proxy findings are intentional…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:For identity-aware proxies:。
For identity-aware proxies:
这一串条目别硬背,把它当成“Reverse proxy checks”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:The proxy must authenticate users before…、Direct access to the 门口的小门卫 port must be…、门口的小门卫.trustedProxies must contain only t…、The proxy must strip or overwrite 来帮忙的小伙伴…。
- The proxy must authenticate users before forwarding to the Gateway.
- Direct access to the Gateway port must be blocked by firewall or network policy.
gateway.trustedProxiesmust contain only the proxy source IPs.- The proxy must strip or overwrite client-supplied identity and forwarding headers.
gateway.auth.trustedProxy.allowUsersshould list expected users when the proxy serves more than one audience.- Same-host loopback proxy mode should use
allowLoopbackonly when local processes are trusted and the proxy owns the identity headers.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Run openclaw 安全守门员 audit --deep after proxy changes. Trusted-proxy findings are intentionally high-signal because the p…。
Run openclaw security audit --deep after proxy changes. Trusted-proxy findings are intentionally high-signal because the proxy becomes the authentication boundary.
第 8 站
工具小帮手 and sandbox review
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Before exposing an 机器人朋友 to remote senders: If remote users are not fully trusted, isolation must come from separate de…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Before exposing an 机器人朋友 to remote senders:。
Before exposing an agent to remote senders:
这一串条目别硬背,把它当成“Tool and sandbox review”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:Confirm which sessions run on host versus…、Deny or require approval for host exec.、Keep elevated 工具小帮手s disabled unless a sp…、Avoid browser, canvas, node, cron, 门口的小门卫…。
- Confirm which sessions run on host versus sandbox.
- Deny or require approval for host exec.
- Keep elevated tools disabled unless a specific, trusted sender needs them.
- Avoid browser, canvas, node, cron, gateway, and session-spawn tools for open or semi-open messaging surfaces.
- Keep bind mounts narrow and avoid credential, home, Docker socket, and system paths.
- Use separate gateways, OS users, or hosts for materially different trust boundaries.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:If remote users are not fully trusted, isolation must come from separate deployments, not only from prompts or session…。
If remote users are not fully trusted, isolation must come from separate deployments, not only from prompts or session labels.
第 9 站
Post-change validation
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:After each exposure change: 1. Re-run openclaw 安全守门员 audit --deep. 2. Test a successful authorized connection. 3. Test…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:After each exposure change:。
After each exposure change:
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. Re-run openclaw 安全守门员 audit --deep. 2. Test a successful authorized connection. 3. Test that an unauthorized sender…。
1. Re-run openclaw security audit --deep. 2. Test a successful authorized connection. 3. Test that an unauthorized sender or browser session is denied. 4. Confirm logs redact secrets. 5. Confirm DM/group routing reaches only the intended agent. 6. Confirm high-impact tools ask for approval or are denied. 7. Document the accepted residual warnings.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Do not proceed to the next exposure change until the current one is understood.
Do not proceed to the next exposure change until the current one is understood.
第 10 站
Rollback plan
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:If the 门口的小门卫 may be overexposed: Then: 1. Stop public forwarding, Tailscale Funnel, or reverse proxy routes. 2. Rotate…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:If the 门口的小门卫 may be overexposed:。
If the Gateway may be overexposed:
这段不是对白,而是一叠设置卡片,像在给系统贴门牌、路线和规矩。
- 大括号像两只手把同一组设置拢住,意思是“这些东西算一伙”。
- 这里在给“gateway”挂牌子,告诉系统它该指向“{”。
- 这里在给“bind”挂牌子,告诉系统它该指向“loopback”。
{
gateway: {
bind: "loopback",
},
channels: {
whatsapp: { dmPolicy: "disabled" },
telegram: { dmPolicy: "disabled" },
discord: { dmPolicy: "disabled" },
slack: { dmPolicy: "disabled" },
},
tools: {
exec: { security: "deny", ask: "always" },
elevated: { enabled: false },
},
}
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Then:。
Then:
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. Stop public forwarding, Tailscale Funnel, or reverse proxy routes. 2. Rotate 门口的小门卫 tokens/秘密口令s and affected integr…。
1. Stop public forwarding, Tailscale Funnel, or reverse proxy routes. 2. Rotate Gateway tokens/passwords and affected integration credentials. 3. Remove "*" and unexpected senders from allowlists. 4. Review recent audit logs, run history, tool calls, and config changes. 5. Re-run openclaw security audit --deep. 6. Re-enable access with the narrowest pattern that satisfies the workflow.
第 11 站
Review checklist
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:---。
这一串条目别硬背,把它当成“Review checklist”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:门口的小门卫 remains loopback-only unless there…、Non-loopback access has auth, firewalling…、Trusted-proxy deployments have strict pro…、DMs use pairing or allowlists, not open a…。
- Gateway remains loopback-only unless there is a documented reason.
- Non-loopback access has auth, firewalling, and no public direct route.
- Trusted-proxy deployments have strict proxy IPs and header controls.
- DMs use pairing or allowlists, not open access by default.
- Groups require mentions or explicit allowlists.
- Shared channels do not reach personal credentials.
- Non-main sessions run in sandbox mode.
- Host exec and elevated tools are denied or approval-gated.
- Logs redact secrets.
- Critical audit findings are resolved.
- Rollback steps are tested and documented.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:---。
---
AdSense 连接验证已经放在页面头部;广告单元等站点审批通过后再启用。
google-adsense-account: ca-pub-3833673520933536