Compare local and cloud sandboxes
Local and cloud sandboxes provide isolated environments for AI agents, but they run against different resources and stores. This comparison helps you choose an environment and identify workflows that need cloud-specific setup.
If your workflow runs Docker inside the sandbox, review the Docker exec and healthcheck limitation. It can affect container setup, debugging, and Compose service readiness.
Host-dependent features
A cloud sandbox has no path back to the machine where you run sbx. The
following local features don't apply in cloud mode:
- Workspace paths, bind mounts,
--clone, and Git worktrees created with--branch - GPU, USB, display, and nested virtualization options
- Model selection through
--modeland--provider - Host port bindings
- Host-backed agent skills and the full local MCP management workflow
The CLI rejects local-only flags used with --cloud instead of ignoring them.
You can use environment files
with sbx --cloud env. Cloud environments support a subset of the local
configuration fields, including agents, environment variables, resource limits,
and credentials. Remove host workspace and port mappings before using a local
environment file in the cloud.
Separate resources
Adding --cloud changes the backend for the command. A sandbox shown by
sbx ls doesn't appear in sbx --cloud ls, and resources created for one
backend don't automatically become available to the other.
This separation applies to sandboxes, templates, secrets, volumes, and network
policy. Use sbx move when you need to copy a sandbox filesystem
between backends. Moving doesn't unify the resource stores or transfer
host-mounted files or managed secrets. Credentials saved in copied files can
still travel with the sandbox.
Network policy differences
Configure and verify cloud network policy separately.
Moving a sandbox doesn't carry its local policy configuration into the cloud.
The cloud CLI supports account and sandbox network rules, but rejects local
governance profiles and the --protocol option.
HTTP method and path restrictions, also called L7 filtering, aren't supported
in cloud sandboxes. If these rules apply to a local sandbox, sbx move warns
and asks for confirmation before moving it to the cloud.
What changes when you move
sbx move copies a filesystem snapshot and creates a separate
destination sandbox. It doesn't transfer running processes or memory, and it
leaves the source sandbox in place. Large images can take time to upload or
download, depending on image size and available bandwidth. For cloud-to-local
moves, also allow for temporary disk space.
The managed-secret warning doesn't itself block a move. Configure cloud credentials or local credentials before using an agent that needs them. Credentials written to files inside the sandbox can be included in the snapshot; remove those files before moving if you don't want the credentials copied.
Cloud-to-local moves display a notice and ask for confirmation. Local-to-cloud
moves ask for confirmation when workspace files or L7 filtering would be left
behind. If a confirmation is required and standard input isn't a terminal,
the move fails unless you pass --force. This flag skips confirmation but
retains warnings and doesn't change what transfers.
Verify the destination's files, credentials, network access, ports, and expiration settings before removing the source.
