openclaw - 💡(How to fix) Fix docker.binds rejected for paths outside per-session sandbox dir [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#57271Fetched 2026-04-08 01:51:46
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

Error Message

Sandbox security: bind mount "/Users/X/.openclaw/sandboxes/agent-io/systems/outbox:/outbox:rw"
source "/Users/X/.openclaw/sandboxes/agent-io/systems/outbox" is outside allowed roots
(/Users/X/.openclaw/sandboxes/agent-systems-main-060f8cd1, /Users/X/.openclaw/workspace-systems).
Use a dangerous override only when you fully trust this runtime.

Fix Action

Fix / Workaround

  • The error message says "Use a dangerous override only when you fully trust this runtime" but no such override flag is documented.
  • Tested with paths inside ~/.openclaw/agent-io/, ~/.openclaw/sandboxes/agent-io/, and ~/.openclaw/data-lake/ — all rejected.
  • Workaround: use workspaceAccess: "rw" and write to the agent workspace instead.
  • Three separate attempts, all failed with the same error.

Code Example

Sandbox security: bind mount "/Users/X/.openclaw/sandboxes/agent-io/systems/outbox:/outbox:rw"
source "/Users/X/.openclaw/sandboxes/agent-io/systems/outbox" is outside allowed roots
(/Users/X/.openclaw/sandboxes/agent-systems-main-060f8cd1, /Users/X/.openclaw/workspace-systems).
Use a dangerous override only when you fully trust this runtime.

---

mkdir -p ~/.openclaw/custom-data/outbox

---

{
     "id": "myagent",
     "sandbox": {
       "mode": "all",
       "docker": {
         "binds": ["/Users/X/.openclaw/custom-data/outbox:/outbox:rw"]
       }
     }
   }
RAW_BUFFERClick to expand / collapse

Bug

sandbox.docker.binds rejects bind mount sources outside the per-session sandbox directory and agent workspace, even though the sandboxing docs show examples with arbitrary host paths (/home/user/source, /var/data/myapp, /mnt/cache).

Error

Sandbox security: bind mount "/Users/X/.openclaw/sandboxes/agent-io/systems/outbox:/outbox:rw"
source "/Users/X/.openclaw/sandboxes/agent-io/systems/outbox" is outside allowed roots
(/Users/X/.openclaw/sandboxes/agent-systems-main-060f8cd1, /Users/X/.openclaw/workspace-systems).
Use a dangerous override only when you fully trust this runtime.

Reproduction

  1. Create a directory outside the per-session sandbox dir:

    mkdir -p ~/.openclaw/custom-data/outbox
  2. Add a bind mount to any sandboxed agent:

    {
      "id": "myagent",
      "sandbox": {
        "mode": "all",
        "docker": {
          "binds": ["/Users/X/.openclaw/custom-data/outbox:/outbox:rw"]
        }
      }
    }
  3. Trigger the agent — sandbox creation fails with the above error.

Expected

Per the docs, docker.binds should accept any host path except explicitly dangerous ones (docker.sock, /etc, /proc, /sys, /dev). The security boundary should be the bind mode (:ro/:rw), not a path allowlist restricted to the per-session sandbox hash directory.

Actual

The runtime only allows bind sources from:

  1. The per-session sandbox dir (~/.openclaw/sandboxes/agent-{id}-{hash})
  2. The agent workspace (~/.openclaw/workspace-{id})

Any other path — including subdirectories of ~/.openclaw/ itself — is rejected.

Additional context

  • The error message says "Use a dangerous override only when you fully trust this runtime" but no such override flag is documented.
  • Tested with paths inside ~/.openclaw/agent-io/, ~/.openclaw/sandboxes/agent-io/, and ~/.openclaw/data-lake/ — all rejected.
  • Workaround: use workspaceAccess: "rw" and write to the agent workspace instead.
  • Three separate attempts, all failed with the same error.

Environment

  • OpenClaw: latest (npm)
  • Docker: OrbStack
  • OS: macOS 15 (Apple Silicon M1)

extent analysis

Fix Plan

To fix the issue, we need to modify the sandbox.docker.binds configuration to allow bind mounts from arbitrary host paths.

Here are the steps:

  • Update the sandbox.docker.binds configuration to include the dangerousOverride flag.
  • Set the dangerousOverride flag to true to allow bind mounts from any host path.

Example code:

{
  "id": "myagent",
  "sandbox": {
    "mode": "all",
    "docker": {
      "binds": ["/Users/X/.openclaw/custom-data/outbox:/outbox:rw"],
      "dangerousOverride": true
    }
  }
}

Alternatively, you can use the workspaceAccess workaround:

{
  "id": "myagent",
  "sandbox": {
    "mode": "all",
    "workspaceAccess": "rw"
  }
}

Then, write to the agent workspace instead of the custom bind mount.

Verification

To verify that the fix worked, try triggering the agent again with the updated configuration. The sandbox creation should succeed, and the bind mount should be allowed.

Extra Tips

Note that using the dangerousOverride flag can pose a security risk if not used carefully. Make sure to only use this flag when you fully trust the runtime. Additionally, consider using the workspaceAccess workaround as a safer alternative.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix docker.binds rejected for paths outside per-session sandbox dir [1 participants]