Claude Code on the web

API keys for Claude Code on the web, without putting keys in the sandbox

Claude Code on the web runs each session in a cloud VM. Sooner or later that session needs a model API, a media API or a deploy token. This page explains what the cloud environment gives you for secrets, and how Shipkey lets a session use your keys without ever holding them.

How the Claude Code on the web environment works

Every cloud session runs in a cloud environment: a saved configuration with a network access level, environment variables and a setup script that runs before Claude starts working. The default network level only reaches an allowlist of common domains such as package registries; a custom level takes your own list of domains.

What it gives you for secrets

Environment variables are written in .env format, and the documentation is direct about them: anyone who uses the environment can read the values, and so can the agent. For keys, Anthropic-hosted environments offer network secrets, where Anthropic's proxy attaches the key to requests for the hosts you list after the request has left the VM. Self-hosted environments do not have them.

From the product's documentation, as read in December 2026: code.claude.com/docs: cloud environments

Where Shipkey fits

  • The same idea, run by you. Your provider keys live in a Cloudflare Worker in your own account, and the session only gets a token that lasts hours.
  • You approve each environment with a passkey, see what it will get, and can revoke it with one action.
  • One setup for every agent. The same gateway serves Codex, Cursor and Gemini CLI, so keys are not copied into each vendor's settings.
  • More than API keys: the issuer can also mint short-lived Cloudflare tokens and approve deploys per Worker.

Set it up for Claude Code on the web

  1. 1.Deploy the Shipkey issuer and gateway, two Cloudflare Workers, in your own account, and register your passkey as the approver. Self-hosting guide

  2. 2.Add the Shipkey plugin to the agent and tell it your issuer's address.

  3. 3.Add your issuer's and gateway's domains to the environment's network access (the Custom level), so the session can reach them.

  4. 4.Approve the environment with your passkey when the agent shows the check code. From then on its commands go through your gateway.

Other cloud environments