These settings are only available in Local GUI. OpenHands Cloud uses managed sandbox environments.
Looking for the legacy
SANDBOX_BASE_CONTAINER_IMAGE / base_container_image
workflow? That only applies to OpenHands V0. See the
V0 Custom Sandbox reference.How the sandbox works in V1
In OpenHands V1 the sandbox container is the OpenHands agent-server. By default OpenHands runsghcr.io/openhands/agent-server:<release>-python, which already includes Python and Node.js. The image is
resolved from two environment variables:
AGENT_SERVER_IMAGE_REPOSITORY(defaultghcr.io/openhands/agent-server)AGENT_SERVER_IMAGE_TAG(default<release>-python)
Building a custom agent-server image
The agent-server is built from a Dockerfile in the OpenHands SDK that accepts aBASE_IMAGE build argument. Any Debian-based image works as the base.
For example, to layer the agent-server onto an image that has ruby installed, first build (or pick) your base
image. To build one:
--build-arg BASE_IMAGE=selects the base image to layer the agent-server onto.--target binarymatches how the default published-pythonimage is built — it bundles a self-contained agent-server binary (no Python virtual environment at runtime) and includes VSCode and VNC. Other targets are available if you need them:sourceruns the agent-server from a Python virtual environment (handy for development and debugging), and thebinary-minimal/source-minimaltargets drop VSCode and VNC for a smaller image.--loadmakes the resulting image available to your local Docker daemon.
my-agent-server:custom.
Pointing OpenHands at your image
Set both environment variables so OpenHands launches your image as the sandbox. They must be set together — if either is missing, OpenHands falls back to the default image:8000 and polls /health until the
agent-server is ready.
When you publish your image to a registry, set
AGENT_SERVER_IMAGE_REPOSITORY to the fully qualified
repository (e.g. ghcr.io/your-org/my-agent-server) and make sure the host running OpenHands can pull it.Related
- Docker Sandbox — the default sandbox provider for Local GUI.
- Agent Server in Docker (SDK) — deeper details on the agent-server image and how it is built.

