OpenHands sandbox: Docker, process and remote isolation

OpenHands isolates agent command execution through Docker, process or remote sandbox providers, but only the per-conversation runtime is contained. Workspace mounts, host ports and the Canvas and automation services need explicit controls.

On this page

How OpenHands sandbox isolation meets the command execution requirement

OpenHands isolates agent commands per conversation through three sandbox providers: Docker, which is the default and recommended option, process, and remote, selected with the RUNTIME value. The Enterprise edition runs each agent in its own containerized sandbox, while the open-source Agent Canvas and automation services are not sandboxed as a whole. The README notes that without a sandbox the agent server runs directly on the host with full filesystem access, so the provider setting is the first control to verify in any deployment. Choose docker explicitly in your configuration rather than relying on defaults that a later change could alter, and treat process as a non-isolated option that the docs describe as unsafe.

Workspace mounts define what the agent can actually reach. The Docker sandbox docs say workspaces are mounted with SANDBOX_VOLUMES, and anything mounted read-write into /workspace can be modified by the agent. Before approval, list every mount, confirm which host paths are read-only, and keep credentials, SSH keys and unrelated repositories out of the mount set. Network exposure needs the same scrutiny: AGENT_SERVER_USE_HOST_NETWORK=true pins ports 8000, 8001, 8011 and 8012 on the host and allows only one sandbox at a time, which makes it a poor fit for multi-user rollouts and widens what the host exposes. Ask the vendor or your platform team to confirm these settings in your build.

The sandbox boundary stops at the conversation container. It does not cover the Canvas interface, the automation service, the model provider connection you configure with your own keys, or anything the agent reaches over network paths you permit. Plan controls for those layers separately, including who may start automations, how keys are stored, and which egress destinations are allowed. Run a test conversation that attempts to read a host path outside the mount set and to reach an internal address, then record the results as evidence for your review. The OpenHands Enterprise documentation is the natural next read for the isolation model and sizing guidance tied to concurrent sandboxes.

Sandbox capabilities by edition and provider

This table compares which sandbox providers and isolation features ship in the open-source project, which appear only in paid OpenHands editions, and which depend on an outside component. Read each row as a question to confirm with OpenHands, because edition-level details can change and the official docs are the authority. The main takeaway is that the Docker provider is the isolation boundary to approve, while the process provider and host networking mode carry risks you must accept or block.

CapabilityBuilt inPaid edition onlyNeeds outside component or not available
Docker sandbox providerYesNot applicableNeeds Docker on the host. Recommended provider and default RUNTIME value.
Process sandbox providerYesNot applicableUnsafe: no container isolation. Block it for any shared or sensitive host.
Remote sandbox providerSelected with RUNTIME=remoteNot applicableNeeds a remote sandbox host. Confirm where it runs and who operates it.
Per-conversation container isolationEach conversation runs in its own Docker containerNot applicableRequires Docker. Confirm it is active in your version and configuration.
Multiple-sandbox optionOption in the open-source projectNot applicableDoes not sandbox the whole Canvas or automation service. Confirm the scope.
Workspace mounting via SANDBOX_VOLUMESYesNot applicableRead-write mounts under /workspace can be modified by the agent.
Host networking modeSet AGENT_SERVER_USE_HOST_NETWORK=trueNot applicablePins ports 8000, 8001, 8011 and 8012 and allows only one sandbox at a time.
Containerized sandbox in OpenHands EnterpriseNot applicableYesSizing depends on peak concurrent sandboxes. Confirm isolation details with OpenHands.
OpenHands CloudNot applicableCommercial SaaS. Confirm its sandbox modelNot covered here. Ask OpenHands for the sandbox design and data location.

How the Docker, process and remote providers differ

The RUNTIME setting decides where the agent's commands execute, and it is the first control to verify in any OpenHands rollout. The documented values are docker, which is the default, process and remote. The Docker provider is the one to standardize on: the sandbox docs describe it as the recommended option with good isolation from the host. Commands run inside a container, so the agent's file and process activity is separated from the machine running the agent server. Isolation is only as strong as the mounts and network settings you allow, which the following sections address.

The process provider is fast but unsafe, because it has no container isolation. The OpenHands README warns that without a sandbox the agent server runs directly on the host with full filesystem access. In practice, any command the agent issues runs with the permissions of the account hosting the server. Treat process as a setting for disposable development machines only, and check that no production-capable workstation or shared host is configured with it. Confirm the value in each environment's configuration rather than assuming the default was never changed.

The remote provider moves execution to a separate environment. That moves the trust boundary, but it does not remove the risk. Your organization must provision, patch, network-segment and monitor that environment, and the sandbox docs do not replace that work. Decisions are enforced in three places: at runtime selection (RUNTIME), at the workspace mount (for example, SANDBOX_VOLUMES in the Docker provider, where anything mounted read-write into /workspace can be modified by the agent), and at the network configuration. Note that AGENT_SERVER_USE_HOST_NETWORK=true pins ports 8000, 8001, 8011 and 8012 on the host and allows only one sandbox at a time, which weakens separation. Ask the vendor and your own platform team to confirm how each setting behaves in your deployment.

Decision path from runtime selection to exposed host resources

The diagram starts with an agent request and the runtime choice: docker, the default and recommended option, process, which has no container isolation, or remote. Docker sandboxes then pass through workspace mounts, where anything mounted read-write into /workspace can be modified by the agent, and through host networking, where AGENT_SERVER_USE_HOST_NETWORK=true pins ports on the host and allows only one sandbox at a time. Check each hand-off, and note that the Canvas and automation service sit outside the per-conversation sandbox.

Runtime choice, workspace mounts and host networking decide what the agent can reach.

Decisions the organization must make before rollout

Each OpenHands sandbox setting changes what the agent can reach on the host, the network and your data stores. The six decisions below are the ones a reviewer should settle in writing before any team runs the agent, because each one sets a boundary that the others depend on.

Runtime provider per environment

OpenHands selects its sandbox with the RUNTIME setting, where docker is the default, process runs commands directly with no container isolation, and remote hands execution to an external sandbox. Set a provider per environment rather than one for everything. Confirm that developer laptops, shared servers and any production-adjacent hosts each use a provider the security team has approved, and that no one can change RUNTIME without a review.

Sandboxes overview

Workspace mounts and write access

Mounts set through SANDBOX_VOLUMES expose host paths to the agent, and anything mounted read-write into /workspace can be modified by the agent. List every mounted path for each team, record why it must be writable, and default new mounts to read-only. Check that no mount includes credential stores, SSH keys, cloud configuration or other repositories the task does not need.

Host networking and fixed ports

Setting AGENT_SERVER_USE_HOST_NETWORK=true pins ports 8000, 8001, 8011 and 8012 on the host and allows only one sandbox at a time. Decide whether that trade-off is acceptable for any shared machine, since a second user cannot start a sandbox while the first holds those ports. Where host networking is disallowed, confirm the team has an alternative for concurrent use.

Multiple-sandbox option

The multiple-sandbox option runs each conversation in its own Docker container, but the README states it does not sandbox the whole Canvas or automation service. Decide whether conversation isolation is enough for your risk tolerance or whether the Canvas and automation services also need containment at the host or network layer. Ask the vendor to confirm which processes sit outside the per-conversation boundary in the version you deploy.

OpenHands repository

Credential and LLM key placement

Decide where LLM keys and other secrets live so that agent-run commands cannot read them. The Enterprise edition has customers bring their own provider keys, such as Anthropic, OpenAI or Azure OpenAI, so agree which secret store holds them, who rotates them and whether any key is ever written into a mounted workspace or environment visible inside the sandbox. Confirm this with the vendor for your chosen deployment.

Ownership of the remote sandbox

A remote sandbox moves command execution outside your host, so the provider becomes part of your data path and incident chain. Name the internal owner, document where code and output are processed and retained, and confirm the provider's isolation, logging and deletion terms in writing. Make the contract cover what happens to workspace contents after each conversation ends.

Enterprise docs

How the sandbox answer changes by deployment situation

On a developer laptop, the default Docker provider is the setting that matters most. The sandbox docs name Docker as the recommended provider with good isolation from the host, and it is the default value of the RUNTIME setting, so the agent's commands run in a container rather than directly on the machine. The isolation still depends on what you give the container, so the workspace mount deserves as much attention as the provider choice.

  • Default provider: Confirm that RUNTIME is set to docker or left unset, and that no one has switched it to process for convenience.
  • Workspace mount: Anything mounted read-write into /workspace through SANDBOX_VOLUMES can be modified by the agent, so mount only the project directory, not your home directory or credential folders.
  • Port behavior: Setting AGENT_SERVER_USE_HOST_NETWORK=true pins ports 8000, 8001, 8011 and 8012 on the host and allows only one sandbox at a time, so treat it as a deliberate exception.
  • Concurrency: Expect one container per conversation under the default setup, which keeps conversations apart from each other.
  • Model keys: Check which LLM keys are present in the environment that starts the container, since the agent can reach what is mounted or passed in.

Before approving this setup, confirm the exact volumes and environment variables your developers will pass into the container.

Order of work to put sandbox controls in production

This sequence confirms which OpenHands edition and sandbox provider you run, locks the runtime and workspace mounts down, and ends with a tested, recorded configuration that a reviewer can approve. Each step produces a check you can show to security and procurement before the tool reaches staff.

  1. Confirm the edition and sandbox provider

    Start by recording which OpenHands edition you are evaluating or running. The open-source Agent Canvas, OpenHands Cloud and the self-hosted OpenHands Enterprise edition differ in scope, so compare them on the OpenHands Enterprise vs open source page before assuming any control exists. Then record which sandbox provider the agent uses: Docker, process or remote. The step is done when the owner can name the edition, the provider and the person who approved that choice.

  2. Set the runtime to Docker

    Set the runtime to Docker, which is the default, and confirm the value in the deployment configuration. Reject process mode for any host shared with other workloads or with access to sensitive data, because the sandbox docs describe it as unsafe and without container isolation. Remote providers move execution to another system, so ask the vendor and your platform team where that system runs, who administers it and how it is isolated. The step is done when the configuration file shows a single, approved runtime value and the exception list is empty or signed off.

  3. Scope workspace mounts to the minimum

    Review every entry in SANDBOX_VOLUMES before the first conversation. Anything mounted read-write into /workspace can be modified by the agent, so mount only the project directory that the task needs, and prefer read-only mounts for reference material. Do not mount home directories, credential stores, SSH keys or cloud configuration. The step is done when each mount is listed with its purpose and access mode, and the reviewer has checked that no mount exposes data the agent does not need.

  4. Decide on host networking and concurrency

    Decide whether AGENT_SERVER_USE_HOST_NETWORK is needed. Setting it to true pins ports 8000, 8001, 8011 and 8012 on the host and allows only one sandbox at a time. Most teams should keep the default network mode unless a documented requirement forces host networking, and they should record the concurrency limit that results. Also confirm with the vendor how the multiple-sandbox option behaves in your version, since each conversation then gets its own Docker container. The step is done when the network mode, port usage and maximum concurrent sandboxes are written into the change record.

  5. Test that the agent cannot write outside /workspace

    Run a scripted test inside a sandbox started from your production configuration. Ask the agent, or a test harness acting for it, to write to a path outside /workspace, to read a host path that was not mounted and to reach a host port that was not published. Repeat the test with a read-only mount to confirm writes fail. Keep the commands and outputs. The step is done when every attempted write or read outside the intended scope fails, and any unexpected success is logged as a defect that blocks approval.

  6. Confirm the Canvas and automation service controls

    The README states that the multiple-sandbox option does not sandbox the whole Canvas or automation service. Treat those services as ordinary host processes unless your team has separate controls. Confirm with your platform team which user account they run under, what network access they have, which secrets they can read and how their logs and restarts are managed. The step is done when a named owner has written down host-level controls for each service, and those controls are in your hardening baseline rather than assumed from the sandbox.

  7. Record the configuration as evidence

    Before approval, export the final configuration: edition, runtime value, mounts with access modes, network mode, concurrency limit, the test results from the write-boundary check and the host controls for the Canvas and automation services. Store the record under version control with the approver's name and date. Ask the vendor to confirm the version you tested, because sandbox behavior can change between releases. The step is done when the security reviewer can reproduce the configuration from the record and the approval is tied to that exact version.

What a security reviewer asks to see for sandbox controls

This table lists the sandbox evidence a security reviewer should request from the OpenHands deployment owner, where each item comes from and what it proves. Read it as a checklist: each row ties one isolation claim to a setting, record or document the reviewer can inspect. The main takeaway is that the per-conversation sandbox covers command execution only, so the workspace mount, host networking and host-level services need their own evidence.

What to requestWhere it comes fromWhat it proves
Runtime provider settingThe RUNTIME value in the deployment configuration (docker, process or remote), confirmed against the running environmentWhich isolation provider executes agent commands, and whether it is the Docker default or an unsafe process mode
Workspace mount configurationThe SANDBOX_VOLUMES entries and whether each mount is read-only or read-write under /workspaceWhich host paths the agent can change, since anything mounted read-write can be modified by the agent
Host networking settingThe AGENT_SERVER_USE_HOST_NETWORK value and the host port listing for ports 8000, 8001, 8011 and 8012Whether the sandbox shares host networking, which pins host ports and limits the deployment to one sandbox at a time
Enterprise sandbox isolation statementThe vendor's written description of containerized sandboxes in the OpenHands Enterprise documentation, confirmed in the contract or security packageThat each agent runs in a containerized sandbox, stated by the vendor and scoped to the Enterprise edition
Sizing guide for peak concurrent sandboxesThe Enterprise sizing guide and the peak concurrency figures your team measured in a pilotWhether host capacity covers simultaneous sandboxes, so that resource exhaustion does not force unsafe fallbacks
Host-level service isolation for Canvas and automationYour host architecture diagram and the process and user each service runs under, confirmed by the platform teamThat the Canvas and automation services are not sandboxed by the per-conversation container and need separate host controls
Network egress recordsFirewall or proxy logs and container network policies for sandbox hosts, collected for a sample period you defineWhich destinations sandboxes and the LLM provider connections reach, and whether egress is limited to approved endpoints

Sandbox questions buyers and reviewers ask before approval

Is the Docker sandbox enough to approve OpenHands for our engineers?

The Docker provider is the sandbox option OpenHands recommends, because it isolates the agent's commands from the host. Selecting it is set with the RUNTIME value docker, which is also the default. Approval still depends on what else the agent can reach. The repository notes that each conversation runs in its own Docker container, but it does not sandbox the whole Canvas or automation service. Reviewers should confirm which components run in which trust zone, which mounts are added, and which credentials the agent receives. A sandbox limits the commands; it does not decide what data the agent is allowed to touch.

Can process mode ever be used in a controlled environment?

The docs describe process mode as unsafe but fast, with no container isolation, so it should not be approved for general staff use. Under this mode the agent server runs directly on the host, and the repository README warns that without a sandbox the agent has full filesystem access. A narrow case might exist for a throwaway, isolated test host with no sensitive data or credentials, but that is a decision for your security team to make and document. Ask the vendor or your own test team to confirm the exact behavior on the host image you plan to use.

What does a read-write workspace mount expose to the agent?

Anything mounted read-write into /workspace can be modified by the agent. Workspaces are attached through the SANDBOX_VOLUMES setting, so the mount list is the real boundary of what the agent can change. Reviewers should treat each mount as a grant: a source code checkout is different from a home directory, a secrets folder, or a shared network path. Illustrative example: a developer mounts a monorepo read-write, and the agent edits build scripts that run later on a CI runner. Prefer read-only mounts where the task allows, and keep mounts limited to the project directory.

Does the sandbox restrict network access from the agent?

The supplied sandbox documentation does not establish that the Docker sandbox blocks outbound network traffic, so do not assume it does. Confirm with the vendor what egress the container can reach by default and how to restrict it in your environment. Also note the host networking option: setting AGENT_SERVER_USE_HOST_NETWORK to true pins ports 8000, 8001, 8011 and 8012 on the host and allows only one sandbox at a time. That setting shares the host network stack, which changes the isolation model, so it needs its own review. Your network team should test egress from a sandbox before approval.

How does Enterprise sizing relate to peak concurrent sandboxes?

The OpenHands Enterprise docs say each agent runs in an isolated, containerized sandbox and provide a sizing guide based on peak concurrent sandboxes. Capacity planning therefore follows the number of agents running at the same time, not the total user count. Drivers include how many people run long tasks in parallel, how much CPU and memory each sandbox needs for your builds, and how many conversations start during business hours. Ask for the sizing guide and run a pilot to measure real peaks before committing to infrastructure. Cloud or on-premises hosting costs are paid to your own provider, so request the infrastructure assumptions in writing.

What does DeployOpen cover for sandbox hardening, and what can our team do itself?

DeployOpen plans, implements, hardens and documents self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks, and runs security testing that includes AI agents. For OpenHands, a fixed-scope engagement could cover sandbox provider selection, mount design, network egress tests, and evidence for your review, with scope and deliverables agreed in writing before work starts. Your team can make the policy decisions itself: which repositories may be mounted, who approves agent runs, and what data is off limits. Ongoing testing and upgrades are available as retainers. Request a quote based on the written scope rather than an estimate.

How DeployOpen tests and hardens an OpenHands sandbox setup

DeployOpen plans and deploys self-hosted platforms inside the client's own cloud accounts, data centers or air-gapped networks, and runs security testing that includes AI systems and agents. For OpenHands, that means checking which sandbox provider is in use, what each workspace mount exposes, and what the per-conversation sandbox leaves outside its boundary before a rollout is approved.

How we scope

  • Written scope names the sandbox provider in use: Docker, process or remote, and why it was chosen.
  • Scope lists every workspace mount and whether each is read-only or read-write.
  • Scope states which services sit outside the per-conversation sandbox and need separate controls.

How we build

  • Configuration of the chosen RUNTIME provider and its mounts is set and recorded in the client's environment.
  • Network settings such as host networking and fixed port use are reviewed against the client's own host policy.
  • Testing includes attempts to read or modify files outside the mounted workspace and to reach internal hosts.

How we hand over

  • Deliverables include a written record of the sandbox configuration, mounts, network posture and test results.
  • Documentation lists the residual risks that the sandbox does not cover, with owners named for each.
  • Handover includes a review session with the engineering, IT and security staff who will approve the tool.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Retainer work can re-test the sandbox after OpenHands version changes or new workspace mounts are requested.
  • Clients confirm each change against the written scope before it is applied to their environment.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.