DockerIsol8for local executionRemoteIsol8for remote HTTP execution
Isol8Engine.
Use
DockerIsol8 for local in-process execution. Use RemoteIsol8 when execution is handled by an isol8 serve instance over HTTP.Installation
DockerIsol8
Constructor options (Isol8Options)
Execution mode. Ephemeral uses warm pool containers. Persistent reuses one container.
Secret env variables; values are masked in stdout/stderr post-processing.
Strategies for managing the ephemeral container pool.
fast: Dual-pool system (clean/dirty) with background cleanup. Use for high-throughput.secure: Synchronous cleanup before every acquisition. Use for maximum isolation assurance.
RemoteIsol8
RemoteIsol8.start() performs a /health check. RemoteIsol8.stop() deletes the remote session only when sessionId is set.Isol8Engine methods
Initializes engine (or checks remote health).
DockerIsol8 accepts optional startup prewarm settings, for example:start({ prewarm: true })to prewarm all runtimesstart({ prewarm: { runtimes: ["python", "node"] } })to prewarm selected runtimes
Streams
stdout, stderr, exit, and error events. For RemoteIsol8, automatically uses WebSocket transport with SSE fallback.File methods require stateful execution context: local persistent mode or a remote client with
sessionId.ExecutionRequest fields
Inline shell script executed before the main code. Runs as the
sandbox user from /sandbox.
Useful for cloning repos, creating files, configuring tools, etc.Working directory for the main code execution. Must resolve to a path inside
/sandbox.ExecutionResult fields
Cleanup helper
FAQ
When should I switch from DockerIsol8 to RemoteIsol8?
When should I switch from DockerIsol8 to RemoteIsol8?
Use
DockerIsol8 for local workflows and single-node apps. Use RemoteIsol8 when execution is centralized behind isol8 serve, shared across services, or isolated from app hosts.Do I always need to call start() and stop()?
Do I always need to call start() and stop()?
Yes.
start() initializes the engine or verifies remote health; stop() ensures cleanup (and session deletion for remote clients with sessionId).Why do file operations fail in remote mode without sessionId?
Why do file operations fail in remote mode without sessionId?
putFile and getFile require a persistent remote session. Set sessionId when constructing RemoteIsol8.Troubleshooting quick checks
Remote server health check failed: verify host URL, server status, and API key.File operations require a sessionId: setsessionIdforRemoteIsol8before usingputFile/getFile.- No streamed events from
executeStream: confirm server supports/execute/streamand the request is valid. - Unexpected truncation: increase
maxOutputSizein constructor options.
Related pages
Execution guide
Lifecycle, modes, streaming, and result semantics.
Option mapping
Map every library option to CLI, config, and API equivalents.
How to CLI
Command-line behavior and flag-by-flag details.
Troubleshooting
Diagnose runtime, network, and session issues quickly.