Skip to main content
Listing, stopping, deleting, configuring defaults, and monitoring resource usage.

Machine Sizes

Both the CLI (--size) and the dashboard provide the same size options: vCPU counts represent burstable capacity. Your workspace policy may restrict which sizes are available.

Create Devbox

Create a new Devbox with interactive prompts:

In-line params

Pass parameters inline to skip specific prompts:

From a Spec File

Define your Devbox configuration in a spec file:
devbox.yaml
and create it non-interactively with --from:
  • See Spec file reference below for all available configuration options.
  • Spec files can be JSON (.json), YAML (.yaml / .yml), or TOML (.toml).
  • The --from flag works with devbox acquire.

Reading from stdin

Pass - as the path to read the spec from stdin. Stdin is parsed as YAML by default; use --from_format to override (json, yaml, or toml):

Ephemeral Devboxes

Devboxes can be created as ephemeral, tying their instance and storage to a single run. When an ephemeral Devbox stops, both its instance and storage are automatically deleted. On restart, it starts fresh. Ephemeral Devboxes suit short-lived tasks or experimentation where you don’t need to retain data across restarts. Create an ephemeral Devbox with the --ephemeral flag:

Listing Devboxes

Via the CLI:
By default this shows only your Devboxes. Use --show-all to see all Devboxes in the workspace. Output as JSON for scripting:
Via the Dashboard: The Devboxes dashboard shows all your Devboxes grouped by repository. Toggle between viewing your own Devboxes or all workspace Devboxes.

Starting & Stopping

Devboxes start automatically when you connect via devbox ssh, devbox open-ide, or from the dashboard. To stop a running Devbox: Via the CLI:
This presents an interactive picker. You can also use the alias devbox stop. Via the Dashboard: Click the stop button on any running Devbox in the dashboard or from the Devbox detail page. Stopped Devboxes retain all persistent storage. They resume in seconds on the next connection.

Idleness & Auto-Stop

Control how long a Devbox stays running after becoming idle. Available timeouts: 15 min, 30 min, 1 hour, 4 hours, or 8 hours. CLI:
Dashboard: Expand the Advanced section in the create dialog to configure the idle timeout.

How idleness is detected

A Devbox is considered active (not idle) if any of the following are true:
  • There is an active SSH connection, whether through devbox ssh or a native SSH client. This includes SSH connections kept open by IDEs.
  • A session was created within the last 15 minutes.
  • Files exist under /.namespace/tasks, which indicate ongoing tasks and can be created by users.
The idle timeout countdown only applies once none of the conditions above are present.

Deleting

Deleting a Devbox permanently removes it and its associated persistent volume. Via the CLI:
You’ll be prompted to confirm by typing the Devbox name. Skip the confirmation with --force:
Without a name argument, an interactive picker is shown. Via the Dashboard: Delete a Devbox from its context menu in the dashboard.

Volume Size

Override the default persistent volume size:

Nested Virtualization

Linux Devboxes support nested virtualization: /dev/kvm is available inside the Devbox, so processes can use hardware-assisted virtualization. No flag or spec file option is needed: the device is mounted automatically, and its permissions are set so non-root users can use it without additional setup. This works the same way with custom images; you don’t need to do anything in your Dockerfile to make /dev/kvm available. To verify it’s present, run:
The most common use is Android emulators: hardware acceleration cuts emulator startup from minutes to seconds and avoids flaky tests caused by CPU-only emulation timeouts. Emulator acceleration requires linux/amd64. See Android Emulators for more information. Nested virtualization is not available on macOS Devboxes. See Nested Virtualization for full platform support details.

Spec file reference

Sessions

Each entry in sessions has: Configure one or more session-command pairs to have the Devbox automatically create sessions and run the specified commands on startup.

Environment Variables

Each entry in env has a name and exactly one of value or from_secret_id:
See Managing Secrets to learn how to create and manage vault secrets.

Repository

The repository block supports: Omit repository to fall back to the workspace default. To explicitly create a Devbox with no repository checked out:

Network Policy

The network_policy block restricts outbound network access:

Integrations

The integrations object supports:

Example

devbox.yaml

Workspace Defaults

Workspace admins can set default values applied to all newly created Devboxes. Navigate to the Defaults page in the dashboard to configure:
  • Instance Size: default CPU and memory allocation
  • Image: default base image
  • Git Repository: default repository to clone
  • Access Mode: private (just you) or workspace-wide (shared with all members)
  • Idle Timeout: how long Devboxes stay running when idle
  • Tailscale: default Tailscale integration spec to connect Devboxes to your tailnet
  • Network Policy: default outbound network access restrictions
When a workspace policy is active, policy-enforced values take precedence and are shown as locked in the UI.

Git Configuration

Configure the git author name and email used across your Devboxes from the dashboard. Click your name in the Devboxes header to open the git configuration dialog. This sets user.name and user.email for git operations in all your Devboxes.

Setting Up GitHub CLI

Forward your local gh CLI authentication to a Devbox:
This transfers your local GitHub token to the Devbox and configures both the gh CLI (via gh auth login) and git (via gh auth setup-git) to use it, so gh commands and HTTPS git operations are authenticated. This requires gh to be on the Devbox’s PATH. You can also do this as part of creating or acquiring a Devbox, so you don’t need a separate step. Pass --setup_github:
Or enable it in a spec file with integrations.github.share_auth:
devbox.yaml
The local gh token is read before the Devbox is created, so a missing or expired login fails fast. Because it forwards your local authentication, this step requires the Devbox to be activated. When both are given, the --setup_github flag overrides the spec value.

Resource Monitoring

The dashboard shows live resource metrics for running Devboxes:
  • CPU utilization: overall and per-core usage with historical graphs
  • Memory utilization: current usage percentage with history
  • Network latency: ping indicator showing connection quality to your Devbox’s site
These metrics are streamed in real time from the Devbox detail page.

Site Latency

Devboxes are automatically created in the site closest to you. To manually check latency to available sites:
The dashboard measures site latency automatically and selects the best site when creating a Devbox.

Self-Update

Keep the Devbox CLI up to date:

Next Steps

Remote Development → Connect to your Devbox via SSH, VS Code, Cursor, Zed, or JetBrains. Sessions → Persistent terminal sessions that survive disconnections and Devbox restarts. Executing Commands → Run commands in a Devbox with devbox exec and read their output with devbox logs. Custom Images → Build custom base images with your tools and runtimes pre-installed.
Last modified on August 19, 2026