Super Admin Dashboard > Sandbox Spec, chooses whether each one is public
or restricted to specific organizations, and can set an organization’s default. Members then choose a
Sandbox Spec in an Agent Profile or through the API, and automations use
whichever spec the Agent Profile they launch with resolves to.
This page covers the Super Admin workflow. For the Kubernetes and image-registry setup a Sandbox
Spec’s image depends on, see Custom Sandbox Images.
Open Sandbox Specs
ChooseSandbox Spec from the Super Admin navigation. On older OpenHands Enterprise versions this
page is named Warm Runtimes. The table lists every Sandbox Spec with its
image, CPU and memory, idle timeout, Org Permissions, and
source.
A spec’s Source is ConfigMap or Database:
- ConfigMap specs come from your installation’s configuration, the same warm runtime configurations described in Custom Sandbox Images. You can edit one here, which saves a database entry that takes precedence over it. You can’t delete a ConfigMap spec from this page; remove it from the installation’s configuration instead.
- Database specs are created and fully managed from this page.
Unless your runtime-api has
WARM_RUNTIME_CONFIG_OVERLAY enabled, saving any Sandbox Spec here
replaces every ConfigMap-defined spec. See
Enable Overlay Mode.Create a Sandbox Spec
- On
Sandbox Spec, selectAdd sandbox spec. - Enter a
Name. Use letters, numbers, dots, dashes, and underscores (up to 63 characters). You can’t change the name later. - Enter the
Image, such asghcr.io/your-org/openhands-php:8.4-v1. See Building a Custom Image if you need to build one first. If the image is in a private registry, list itsImage pull secrets(one Kubernetes secret name per line). - Optionally set the
Working directory,Command,Arguments, andEnvironment variables(KEY=value, one per line). LeaveCommandempty to use the image’s entrypoint. - Set Resources, timeouts and storage, and the security context as needed.
- Select
Create sandbox spec.
Set Resources
UnderResources, set the CPU request/limit, Memory request/limit, and Ephemeral storage request/limit. Use Kubernetes quantities, such as 500m or 2 for CPU and 2Gi or 4Gi for
memory and storage. Leave a field empty to use the runtime-api default. Two specs can share the same
image and still differ only in these resource settings, for example a smaller default next to a
larger “Monorepo” spec.
Set Idle Timeout, Warm Instances, and Storage
UnderTimeouts and storage:
- Idle timeout (seconds): how long a sandbox from this spec can sit idle before it is paused or stopped. Leave it empty to use the runtime-api default.
- Warm instances: how many sandboxes of this spec to keep ready (the warm pool
count). With0, a sandbox cold-starts when selected. See How Sandbox Pools Work. - Workspace volume size: the persistent storage size for new workspaces, such as
10Gi. This applies to new workspaces only; existing workspaces aren’t resized. - S3-backed workspace: store the workspace in S3 instead of a volume. The image must include
fusey.
Security Context
UnderSecurity context, optionally set Run as user, Run as group, and Filesystem group as
whole numbers, matching the image’s expected UID and GID.
Test a Spec
On a saved spec’s page, selectTest to start a sandbox from it. OpenHands runs this automatically
right after you create a spec. The result shows:
Test is disabled while you have unsaved changes on the form; save first.
Grant Access with Org Permissions
Every Sandbox Spec is public by default: every organization can use it. To restrict a spec to specific organizations:- On
Sandbox Spec, open the row menu for the spec and selectOrg Permissions. - Turn on
Private. - Under
Allowed organizations, selectAdd organizationand choose each organization that should be able to use this spec. The picker lists team organizations only. Personal workspaces can’t be granted a private spec. - Select
Save Changes.
- Removing an organization from a private spec revokes its access. Its members no longer see or can select the spec.
- Turning
Privateoff makes the spec available to every organization in the installation and clears its organization grants.
Set an Organization Default
Once a Super Admin setsENABLE_SANDBOX_SELECTOR=true for the deployment (see
Environment Variables), an Admin or Owner can set
their organization’s default Sandbox Spec:
- Open
Settings > Organization. - Under
Default sandbox, choose a spec. The dropdown lists only the specs your organization can access: public specs, plus any private specs granted to your organization. - The change saves immediately.
Sandbox spec applies first. See the
resolution order below. Clear the dropdown to go back to the deployment default. Setting an
organization default to a spec the organization can’t access fails.
How Users and Automations Select a Sandbox
A new conversation that starts a new sandbox uses the first of these that applies:- A spec selected explicitly for the conversation, such as a
sandbox_spec_idpassed to the API. Not finding it is a hard error, not a fallback. - The
Sandbox specof the Agent Profile the conversation runs with. - The organization’s default, set above.
- The deployment’s system default.
Sandbox spec of its selected Agent Profile. If that profile has no spec, the
automation uses the organization default, then the deployment default. If the automation has no
Agent Profile selected, its sandbox uses the spec of the owner’s active Agent Profile, then the
organization default, then the deployment default. If the selected profile’s spec is unavailable,
the run fails before creating a sandbox.
A direct POST /api/v1/sandboxes call uses the sandbox_spec_id you pass. If you leave it out, it
uses your active Agent Profile’s spec, then the organization default, then the deployment default.
A member or automation can only resolve to a spec their organization can access; an explicit request
for a spec outside that access fails instead of silently falling back to another one.
- In an Agent Profile: each profile has its own
Sandbox specfield, next to its other settings onSettings > Agent Profiles. Leave it onDeployment defaultto use the resolution order above; a profile never inherits a spec from another profile. This is the main way a member controls which Sandbox Spec their conversations and automations use. - Through the API: pass
sandbox_spec_idwhen creating a sandbox or app-conversation. See Per-Conversation via the API.
OpenHands Enterprise previously let each member save a personal default Sandbox Spec in
Application Settings, which ranked above the Agent Profile’s own spec. That setting is removed: an
Agent Profile’s sandbox spec is no longer overridden by a personal preference.
Let Org Admins Manage Their Own Specs (Beta)
A Super Admin can let organizations manage a limited set of their own Sandbox Specs, instead of relying only on specs a Super Admin creates and grants:- Save at least one Sandbox Spec on
Sandbox Spec, if you haven’t already. Editing and saving a ConfigMap spec counts. Until a Super Admin saves one, an Org Admin who tries to add a spec seesA Super Admin must save a sandbox spec before organizations can add their own.This prevents an Org Admin’s spec from being the first saved spec, which replaces every ConfigMap spec for every organization unless overlay mode is on. See the note under Open Sandbox Specs. - On
Super Admin Dashboard > Instance Settings, turn onEnable Sandbox Specs for Org Admins (beta). - Optionally set
Limits for Org Admins: a maximum number of specs per organization, maximum warm instances per spec, maximum CPU, maximum memory, and a maximum idle timeout. An empty field means no limit. Saving a value above a limit fails, naming the field, the value, and the maximum. These limits don’t apply to Super Admins.
Settings > Sandbox Specs. A spec an organization creates is private to it and owned by it. No other
organization can see, launch, or change it, and it doesn’t count against another organization’s
limit. Org Admins can set the image, working directory, command, arguments, environment variables,
CPU, memory, idle timeout, and warm instance count, within any limits you set. They can’t set
ephemeral or persistent storage size, image pull secrets, the security context, or an S3-backed
workspace. Those remain Super Admin-only, set from Sandbox Spec.

