Why Use a Custom Image
Custom images eliminate cold-start setup work (clone, install, transpile, and bootstrap) so agents spend their time on the actual task. They also reduce setup variance and lower sandbox memory requirements by keeping only what the agent needs.Build Your Own Custom Image
The OpenHands agent-server sandbox guide provides full documentation on building custom sandbox images. The approach is the same for the Enterprise Replicated VM deployment.Basic Pattern
- Start from the OpenHands agent-server base image.
- Keep the normal OpenHands entrypoint intact: extend the image, do not replace the entrypoint.
- Add your repo, docs, tools, and verification wrappers.
- Pre-run the expensive setup you do not want to repeat at task time.
- Publish the image to a registry and point the Replicated installer at it.
Base Image
Version Compatibility
Each OpenHands Enterprise release expects a specific agent-server version. The base image tag you build from must match the release you run: theopenhands-sdk inside the sandbox and the one inside
the OpenHands application must agree on major and minor version.
To find the expected tag, enable Use a Custom Sandbox Image in the Admin Console. The
Sandbox Image Tag field defaults to the tag the current release expects.
When a conversation starts on a custom image, OpenHands checks the sandbox’s agent-server version.
If it does not match the release, the conversation fails with an error naming the expected and
actual versions. Rebuild your image from the expected tag and update the Sandbox Image Tag
field to fix it.
Rebuild your custom image before each upgrade. The agent-server base image changes with every
OHE release, and an image built for an older release will be rejected by the version check.
Example: Build and Push
--platform linux/amd64 because the Enterprise Replicated VM runs on x86-64.
What to Bake In
Good candidates for prebaking:- Pinned repository checkouts
- Package manager caches and installed dependencies (
node_modules, Python virtualenvs, etc.) - Compiled or transpiled output
- Native system packages (
xvfb,libkrb5-dev,pkg-config, etc.) - Browser or Electron artifacts
- Stable helper scripts such as
prepare-*and*-verifywrappers
What to Keep Out
If the repository or dependencies change frequently, include aprepare-* script in the image
so the agent can refresh only the parts that need updating without a full rebuild.
Configure the Replicated VM Installer
Once your image is built and pushed to a registry, point the Replicated Admin Console at it.- Open the Admin Console at
https://admin.<your-base-domain>:30000. - Navigate to Config and find the Sandbox Image section.
- Set the following fields:
- Click Save config and then Deploy to apply the change.
This setting applies to the sandbox / agent-server image only (the image that runs inside each
agent’s isolated workspace). It does not replace the other OpenHands service images.
Reference
- OpenHands custom image example repo: Dockerfile, benchmark scripts, and analysis tooling for the VS Code custom image example.
- Agent-server sandbox guide: full SDK documentation on building and configuring custom sandbox images.

