Isolation
Every Upstash Box runs in its own isolated container with a dedicated filesystem, process tree, and network stack. Boxes cannot communicate with or observe each other. Network access is restricted — containers cannot reach private networks, cloud metadata services, or other internal infrastructure.Environment Variables
You can pass environment variables when creating a box. These are available to all code running inside the box, including your agent and any user-submitted code.Attach Headers
For injecting secret HTTP headers into outbound HTTPS requests without exposing them inside the container, see Attach Headers.Read-only API keys
A read-only API key lets a monitoring tool or a debugging agent look into your boxes without being able to change them. Create one in the console: open Box, then on the Overview tab under API Keys click + API Key and pick Read Only. A key’s permissions can’t be changed later. With a read-only key you can:- Get and list boxes, and read status, metrics, logs, schedules, previews and config.
- List, read and download files, and read git status and diffs.
- Run commands with
exec. They run as a separate user with an empty environment, which can’t write to the workspace or read the platform’s credential files.
403 This API key is read-only: creating, deleting, pausing or resetting boxes, runs, file and git writes, schedules, previews, config changes, streaming exec and terminal sessions. On a paused box, commands and file and git reads return 409 instead of waking it; box details and logs still work.
Secrets are masked: env var values and schedule webhook header values come back as their first four characters followed by ••••, MCP server headers come back only as those masked previews, and schedule webhook URLs are cut to their scheme and host (https://example.com/••••).
Browser URLs
Boxes created withbrowser: true can hand out two kinds of URLs that carry their access token in the URL itself, so they work without an API key:
- Live view URLs are view-only. Frames stream out and no input goes in, but anyone with the URL can watch the tab.
- CDP URLs give full control of the browser to anyone holding them.
Blocked Environment Variables
For system security, the following environment variables cannot be set. If you pass them inenv when creating a box, they are ignored. Saving them as account-level environment variables fails with a 400 error.
All other environment variables — including
ANTHROPIC_API_KEY, OPENAI_API_KEY, and their *_BASE_URL variants — are allowed. The built-in agent runner uses its own isolated environment that overrides these per-run.