E2B Guide
Use backend=e2b when you want rmux to talk directly to E2B and keep the RMUX workspace model on top of sandbox-backed runtimes.
What This Backend Does
With the E2B backend, rmux:
- validates the configured E2B API key and timeout
- creates one E2B sandbox per environment
- syncs your project into
/workspace
- uses the E2B PTY API for attach and remote command flows
- uploads the current directory archive directly into the sandbox for
env sync
There is no RMUX control plane requirement for this mode.
Prerequisites
You should have:
- an E2B API key
- an E2B template, or the default
base template
- a sandbox template that supports bootstrap package installs through
apt-get or dnf
e2b.timeoutMs defaults to 3600000. In the current implementation, RMUX creates sandboxes with pause-on-timeout behavior and auto-resume enabled.
The shortest setup path is:
cd /path/to/project
rmux configure \
--backend e2b \
--e2b-api-key e2b_xxx
You can also set the template and timeout explicitly:
rmux configure \
--backend e2b \
--e2b-api-key e2b_xxx \
--e2b-template base \
--e2b-timeout-ms 3600000 \
--e2b-domain e2b.dev
e2b.apiKey is required. e2b.template defaults to base, and e2b.domain is only needed when you want to override the default E2B API domain.
Validate E2B Setup
There is no dedicated rmux e2b-check command in the current implementation.
Use:
That shows the resolved backend, template, timeout, and a masked E2B API key for the current directory.
Create And Use The Environment
rmux new
rmux workspace ls
rmux workspace new agent-a
rmux workspace attach agent-a
Run commands remotely without attaching:
rmux workspace run -w agent-a bun install
rmux workspace run -w agent-a bun test
Attach And Sync Model
The current E2B path is sandbox-native:
- attach and remote commands use the E2B PTY API
rmux env sync uploads the current directory archive directly into the sandbox
- the runtime does not use a workspace bucket or SSH transport
Like the other backends, the remote project root is /workspace, main is the default workspace, and named workspaces use git worktrees for git repos and copied folders for non-git projects.
Ports, Pause, And Destroy
Expose a port from the sandbox:
rmux env expose 3000
rmux env ports
The exposed URL is an HTTPS E2B host for that sandbox port.
Pause compute without removing the environment:
Destroy the sandbox and remove the environment entirely:
Editor Access
rmux workspace editor, rmux workspace code, and rmux workspace cursor are not supported for backend=e2b in the current implementation, because that editor flow is SSH-based and E2B attach uses the PTY API instead.
Useful Commands
rmux configure --show
rmux env status
rmux env sync
rmux env expose 3000
rmux env ports
rmux env down
rmux env destroy
rmux usage
Last modified on March 21, 2026