Skip to Content

Cloudbox

Give Sandcovery the https address of your Cloudbox deployment on Cloudflare and the API token its Worker checks, so Sandcovery can run live Cloudbox runs as sandboxes.

Cloudbox is MIT-licensed software you deploy to your own Cloudflare account, where all runs share one Cloudflare Container. Cloudbox bills nothing, and Cloudflare bills your account for Workers, Containers, R2, and D1 at Containers pricing, which needs the Workers Paid plan.

  • Cloudbox URL: the https address of your deployed Worker, such as https://cloudbox.example.com, with no login, query, or fragment. Sandcovery sends your token only to this address.
  • API token: the value of your Worker's CLOUDBOX_API_TOKEN secret, which Cloudbox checks as a Bearer token. A Worker deployed without that secret answers every caller, so set it before you give Sandcovery the address.

Sandcovery starts each sandbox as a live Cloudbox run that holds a clone of the public acoyfellow/cloudbox repository, since Cloudbox's API requires a repository. The sandbox's time to live, from 1 minute to 30 days, bounds only Cloudbox's record of the run. The clone sits in a temp folder of Cloudbox's one shared runner container, which Cloudbox starts with a 120-second hard timeout and a 60-second inactivity timeout, so the folder lasts only as long as that container process. Every run of a deployment shares that container, so runs are not isolated from each other.

OptionSupport
Size1x6, 2x8, and 4x12, the sizes of Cloudflare's standard-2, standard-3, and standard-4 instance types
CommandsRun with bash -lc in the clone, at most 1,000 characters and 120 seconds each, and Cloudbox keeps the last 64,000 characters of each output stream. Cloudbox answers a command that exits non-zero or outlives its timeout with a 500, so Sandcovery appends a line that carries the exit code, which uses at least 42 of the 1,000 characters, and reads a 500 after the timeout as a timeout
FilesUTF-8 text of at most 200,000 characters, with paths under /workspace mapped to paths in the clone, and a read of a missing file fails as a server error, since Cloudbox answers it with a 500
Pause and resumeYes, Cloudbox snapshots the workspace to R2 and restores it into the shared runner container
Egressallow_all

You set the runner's instance type when you deploy Cloudbox, and Sandcovery sends none, so every sandbox runs on that instance type whatever size Sandcovery routed. Deploy one of the three instance types above. Snapshots into a new sandbox, port previews, custom images, idle timeouts, disk sizes, region choice, sandbox environment values, and GPUs are not available on this provider. A create that asks for one routes to another provider. Whether a sandbox exists reads only Cloudbox's record of the run, so a sandbox whose folder is gone still reads as existing until its time to live ends or it is deleted. Sandcovery wrote this adapter from Cloudbox's public source and docs and has not run it against a deployment.