Sandbox now supports sudo and installing RPM packages
You can now run commands with sudo
inside Vercel Sandbox, giving you full control over runtime environment setup, just like on a traditional Linux system.
This makes it possible to install system dependencies at runtime, like Go, Python packages, or custom binaries, before executing your code.
sudo
is available via the runCommand
method:
import { Sandbox } from "@vercel/sandbox";
const sandbox = await Sandbox.create();await sandbox.runCommand({ cmd: "dnf", args: ["install", "-y", "golang"], sudo: true,});
The sandbox sudo
configuration is designed to be easy to use:
PATH
is preservedHOME
is set to /rootCustom environment variables like
env: { FOO: "bar" }
are passed through
With sudo
on Sandbox it's easier to run untrusted code in isolated environments with the right permissions, with no workarounds required.
Learn more about Vercel Sandbox and sudo in the documentation.