This guide explains the startup security model and bridge compatibility behavior.
- Runtime profile selection
- Hardened startup enforcement behavior
- Module startup boundaries
- Bridge protocol handshake compatibility
Use OPENCLAW_RUNTIME_PROFILE to select startup posture:
minimal(default): compatibility-firsthardened: strict fail-closed startup checks
If the value is unknown, startup falls back to minimal with a warning.
You can verify the active profile through:
GET /openclaw/capabilitiesGET /moltbot/capabilities
The response includes runtime_profile.
When OPENCLAW_RUNTIME_PROFILE=hardened, startup enforces mandatory controls and aborts on failure.
Current mandatory checks:
- Authentication is configured for privileged actions
- Unsafe egress bypass is not enabled:
OPENCLAW_ALLOW_ANY_PUBLIC_LLM_HOSTmust not bypass policyOPENCLAW_ALLOW_INSECURE_BASE_URLmust not bypass policy
- If webhook module is active, webhook auth mode must be configured
- Redaction service must be available
- Connector ingress allowlist coverage is enforced for strict posture:
OPENCLAW_RUNTIME_PROFILE=hardened: startup fails closed if an active connector platform has no allowlistOPENCLAW_DEPLOYMENT_PROFILE=public: deployment/startup checks fail closed for the same condition (DP-PUBLIC-009)
In minimal mode, these checks are warning-first for local/LAN posture, but public deployment profile still enforces fail-closed policy checks.
Startup bootstrap no longer swallows fatal security-gate errors. If a critical startup gate fails, initialization aborts deterministically instead of continuing with partial route registration.
When running deployment profile checks for public posture (OPENCLAW_DEPLOYMENT_PROFILE=public),
you must explicitly acknowledge that upstream boundary controls are in place:
OPENCLAW_PUBLIC_SHARED_SURFACE_BOUNDARY_ACK=1
Why this exists:
- OpenClaw shares ComfyUI's listener/port.
- Route auth on
/openclaw/*does not automatically protect ComfyUI-native high-risk routes. - Public posture requires reverse-proxy path allowlist + network ACL boundaries.
Gate behavior:
- missing ack in public profile: deployment profile check fails (
DP-PUBLIC-008) - ack present: this boundary contract check passes
Connector token/enable markers activate ingress posture checks for:
- Telegram, Discord, LINE, WhatsApp, WeChat, KakaoTalk, Slack
When a platform is active, at least one platform-specific allowlist variable must be configured.
publicdeployment profile: fail-closed (DP-PUBLIC-009)hardenedruntime profile: fail-closed at startup gate- non-strict local/LAN posture: warning posture in Security Doctor (
s32_allowlist_coverage)
OPENCLAW_LOCALHOST_ALLOW_NO_ORIGIN controls a localhost convenience escape hatch for clients
that do not send Origin / Sec-Fetch-Site headers.
- Default/unset: strict behavior remains active (no-origin requests are denied in convenience mode).
- When set to
true: no-origin localhost requests are allowed in convenience mode.
Operational visibility:
- Startup emits an explicit warning when the override is enabled.
- Security Doctor reports this as an explicit posture check (
csrf_no_origin_override, codeSEC-CSRF-001). - Startup audit includes a dedicated event so operators can trace when this override is active.
Security note:
- Keep this override disabled for shared/LAN/public deployments.
- Enable only for local CLI/tooling compatibility, and only as long as required.
Module enablement is decided during startup and then locked.
Current boundary behavior:
- Core, security, observability, scheduler, webhook, and connector modules are initialized at startup
- Bridge module initialization is conditional on
OPENCLAW_BRIDGE_ENABLED - If bridge is disabled, bridge route registration is skipped
Sidecar startup performs protocol compatibility negotiation with:
POST /bridge/handshake
Request body:
{ "version": 1 }Response behavior:
200when compatible409when incompatible (too old or too new)- Includes compatibility metadata such as server version and minimum supported version
The sidecar bridge client executes this handshake during startup before worker polling.
Use this as a starting point for hardened deployments:
OPENCLAW_RUNTIME_PROFILE=hardened
OPENCLAW_ADMIN_TOKEN=replace-with-strong-token
OPENCLAW_WEBHOOK_AUTH_MODE=hmac
OPENCLAW_WEBHOOK_HMAC_SECRET=replace-with-strong-secret
OPENCLAW_BRIDGE_ENABLED=1
OPENCLAW_BRIDGE_DEVICE_TOKEN=replace-with-bridge-device-token
# Optional: clear stale history in startup log views
OPENCLAW_LOG_TRUNCATE_ON_START=1Then validate:
- Restart ComfyUI and check startup logs for security gate result.
- Call
GET /openclaw/capabilitiesand confirmruntime_profile. - If sidecar is used, verify handshake succeeds before worker polling begins.