Skip to content
Runtime

How to open a cloud sandbox in VS Code with Remote-SSH

Run runtime sandboxes ssh config --install once, then in VS Code run Remote-SSH: Connect to Host and enter <id>.runtime.

On Runtime, the editor connects through Runtime's API with your key. The sandbox opens no SSH port to the internet, and there is no key to copy onto it. The machine behind the window is a Firecracker microVM with its own kernel. It runs Ubuntu 24.04 with Python 3.12, Node.js 24, Bun, git and a compiler, and it has sudo for everything else. A 2 vCPU, 4 GiB sandbox costs $0.03125 an hour while you read code, and $0.08 an hour with both CPUs busy (pricing). An idle pause stops the compute charge while you are away.

Connect

On your own machine, once:

Terminalnpm install --global withruntime        # the runtime CLI; or use npx withruntimeruntime sandboxes ssh config --install    # every sandbox becomes the host <id>.runtime

Then in VS Code:

  1. Install the Remote - SSH extension.
  2. Open the Command Palette and run Remote-SSH: Connect to Host....
  3. Enter <id>.runtime or <name>.runtime.
  4. Open /workspace, the sandbox user's home, with File > Open Folder.

The command writes a Host *.runtime entry and includes it from ~/.ssh/config. Remote-SSH reads that file unless its remote.SSH.configFile setting names another. VS Code then installs its own server in the sandbox. Most extensions run there, next to the code (VS Code docs, read 26 October 2026). The sandbox image is Ubuntu 24.04 for amd64. It is a glibc-based x86_64 system, which VS Code lists as supported.

A workspace that waits for you

A sandbox created with a name and an idle pause is the same machine each time:

TypeScriptimport { Sandbox } from "withruntime";const dev = await Sandbox.getOrCreate("dev", { idlePauseSeconds: 900, diskMiB: 16_384 });await dev.exec("mkdir -p /workspace/app");console.log(`${dev.info.name}.runtime`); // the host to enter in VS Code
Pythonfrom withruntime import Sandboxdev = Sandbox.get_or_create("dev", idle_pause_seconds=900, disk_mib=16_384)dev.exec("mkdir -p /workspace/app")print(f"{dev.info['name']}.runtime")  # the host to enter in VS Code
Terminalruntime sandboxes create --name dev --get-or-create --idle-pause 900 --disk 16384

After 15 minutes with no activity, including an open SSH connection, the sandbox pauses. It keeps its files, memory and running processes. Connecting again wakes it, as any command does.

Settings that matter

Setting Why
--disk / diskMiB The default 4 GiB disk had about 2.5 GiB free on 24 September 2026; editor servers and dependencies need room
--vcpu, --memory Language servers and builds use more than a script does; CPU is billed as used
--idle-pause Pauses after that many idle seconds (default 300; 60 to 86,400)
--persistent Keeps a paid sandbox running, idle or not, until you stop it; its disk is kept
A custom image Starts every workspace with your toolchain installed

Mistakes and how Runtime handles them

  • The window disconnects after a while. An open connection keeps a sandbox running. There is no time limit by default. A sandbox created with --timeout still ends at its limit, and VS Code loses the host. Leave --timeout out, or use --persistent for a workspace that must never pause.
  • Reconnecting after a day. A session lasts at most 24 hours. Reconnect to continue.
  • Many windows at the same time. An organization can have at most 16 SSH logins and port forwards open at the same time. Each sandbox it holds that is not stopped adds two more, up to 292.
  • A host key prompt. The installed entry turns off host key checks on purpose. Each login gets a new host key. The connection already goes to the sandbox you named, through Runtime's authenticated API.
  • A custom image with no SSH server. The first connection installs openssh-server once.
  • Previewing the app you are building. VS Code's Forward a Port works over the same connection. For a link to share, create a preview.

VS Code, JetBrains or the terminal?

All three use the same <id>.runtime host. VS Code puts the editor on your machine and its server in the sandbox. JetBrains Gateway runs the whole IDE backend in the sandbox. A plain SSH session needs nothing but the CLI.

Sources

Facts on this page were checked on 26 October 2026.

100 free hoursin your first 30 days.

of a 1 GB machine

  • No credit card
  • Four sandboxes at once, 2 vCPU and 4 GiB each
  • Then prepaid credit from $10, no plan fee
Start free, no card
Start free, no card