Vercel Sandbox boots from Vercel Managed Images by default. Starting with version 3 of the Sandbox SDK, new sandboxes use the Ubuntu-based vercel/sandbox/universal:latest image, which ships with Node.js, Python, common coding agents, and standard utilities, so most workloads never need to install packages at boot. When your use case requires something beyond the defaults, you can install it yourself with the image's package manager on the runCommand method.
The default managed images are Ubuntu-based, so you'll install packages using apt-get. Any command that modifies system packages needs root privileges, which you can enable by setting sudo: true.
Copy link to headingInstall packages with TypeScript
In this example, we'll install Go using TypeScript and the Sandbox runCommand:
You'll pass any arguments and flags that you normally would. For example, the -y flag automatically confirms the installation prompt.
Copy link to headingInstall packages with Python
And in Python:
Set sudo: true because package installation requires root privileges.
Copy link to headingLegacy runtimes use dnf
Sandboxes created with the deprecated runtime property (for example node24 or python3.13) run Amazon Linux 2023 instead, whose package manager is dnf:
Check the Amazon Linux 2023 package list to see what's available in legacy runtimes. See the Runtimes documentation for the full legacy specifications.
Copy link to headingPersistence
Packages you install don't persist between sessions. When a sandbox shuts down, any packages you added are lost. If you're setting up an environment you want to reuse, install your packages and then create a snapshot of the sandbox. When you create a new sandbox from that snapshot, your packages will already be there. For a fully reproducible environment, you can also extend a managed image with your own Dockerfile and boot sandboxes from that custom image.
Copy link to headingAvailable packages
The default vercel/sandbox/universal:latest image is a rolling release on Ubuntu with Node.js, Python with uv, common coding agents, and utilities including git, vim, nano, tmux, ripgrep, jq, and fzf preinstalled. Beyond those, anything in Ubuntu's package repositories is available through apt-get.
Common examples include:
- Language runtimes:
golang,rust,ruby - Build tools:
make,cmake,gcc - Utilities:
htop,sqlite3,imagemagick