This is the default Runtime that’s used when you start OpenHands.
SANDBOX_RUNTIME_CONTAINER_IMAGE
from nikolaik is a pre-built runtime image
that contains our Runtime server, as well as some basic utilities for Python and NodeJS.
You can also build your own runtime image.
SANDBOX_VOLUMES
environment variable:
SANDBOX_VOLUMES
format is host_path:container_path[:mode]
where:
host_path
: The path on your host machine that you want to mount.container_path
: The path inside the container where the host path will be mounted.
/workspace
for files you want the agent to modify. The agent works in /workspace
by default./data
) for read-only reference materials or large datasets.mode
: Optional mount mode, either rw
(read-write, default) or ro
(read-only).,
):
Note: This method is deprecated and will be removed in a future version. Please use SANDBOX_VOLUMES
instead.
WORKSPACE_BASE
:
docker run
command:
-e SANDBOX_USER_ID=$(id -u)
is passed to the Docker command to ensure the sandbox user matches the host user’s
permissions. This prevents the agent from creating root-owned files in the mounted workspace.
0.0.0.0
), which can expose your instance to all networks the
host is connected to. For a more secure setup:
runtime_binding_address
configuration to restrict which network interfaces OpenHands listens on:
127.0.0.1
), making it accessible only from the local machine.
-p
flag to bind only to localhost instead of all interfaces:
host.docker.internal
routing, require Docker Desktop. Docker Engine alone does not support these features on localhost across custom networks. If you’re using Docker Engine without Docker Desktop, network isolation may not work as expected.