Northflank
A sandbox per Northflank deployment service. The services platform, driven through @northflank/js-client — a sleep-infinity container you exec into.
Installation
@northflank/js-client is an optional peer dependency of sbox-sdk, loaded lazily on first use.
pnpm add sbox-sdk @northflank/js-clientUsage
import { createSandboxClient } from "sbox-sdk";
import { northflank } from "sbox-sdk/northflank";
const client = createSandboxClient({
provider: northflank({
token: process.env.NORTHFLANK_TOKEN!,
projectId: "my-project", // must already exist
}),
});
const sandbox = await client.create({ template: "ubuntu:22.04" });
const res = await sandbox.commands.run("echo hi && ls /");
console.log(res.stdout);
await sandbox.pause(); // scale to zero — volume kept, compute billing stopsA sandbox is a deployment service that runs the base template image with a sleep infinity keep-alive command, so you can exec into it. create() waits (best-effort) for the service to reach running before returning.
Node-only: the SDK streams exec output over Node EventEmitters, which the
adapter buffers. exec has no per-command cwd/env, so the core folds
those into a cd … && KEY=v … wrapper (perCommandEnvCwd: false) and
streaming is emulated. Files are read and written via exec + base64.
pause() scales the service to zero (volume retained, memory lost);
destroy() deletes the service and its child objects.
Authentication
An API token + the project the sandbox services live in.
| Option | Env var | Required | Description |
|---|---|---|---|
token | NORTHFLANK_TOKEN | required | Northflank API token. |
projectId | — | required | Project the sandbox services are created in. |
deploymentPlan | — | optional | Compute plan for new sandboxes (default "nf-compute-200"). |
image | — | optional | Default base image (default "ubuntu:22.04"). |
ephemeralStorageMB | — | optional | Ephemeral storage in MB for new sandboxes (default 2048). |
Options
Prop
Type
Capabilities
| Capability | Level | Notes |
|---|---|---|
list | native | |
pause | native | scale-to-zero (volume kept) |
streaming | emulated | exec session is buffered |
filesUpload | native | via exec + base64 |
exposePort | native | public service port → DNS |
codeInterpreter | unsupported | |
stop / setTimeout | unsupported | pause is the keep-disk state |
snapshot / fork | unsupported | services platform, no VM snapshots |
perCommandEnvCwd is false (core wraps); preservesMemoryOnPause is false; previewModel is subdomain.
AWS Lambda MicroVMs
Firecracker-based serverless sandboxes (GA June 2026) with suspend/resume up to 8h. Control plane via @aws-sdk/client-lambda-microvms; you bake a small runner into the image.
Runloop
A sandbox per Runloop devbox. AI-focused devboxes with suspend/resume and disk snapshots, via @runloop/api-client.