Skip to content

Secrets

Tobias Vorwachs edited this page Nov 23, 2026 · 2 revisions

Secrets

API keys stay on your computer. The sandbox only sees a placeholder.

The Secrets tab, with two blocked toasts

How injection works

  1. You store a secret on the host.
  2. Inside the sandbox, the environment variable (for example MY_API_KEY) holds a placeholder.
  3. Boxquell terminates TLS for exactly the hosts that have a secret, replaces the placeholder in the request headers and forwards the request.
  4. Every other connection passes through untouched.

The real value is sent only to the hosts the secret is bound to. It never enters the guest.

Shared and per sandbox

boxquell secret set anthropic                  # a known service; asked for interactively
boxquell secret attach mybox anthropic         # make a shared secret usable in a sandbox
boxquell secret set my-api --sandbox mybox --host api.example.com --env MY_API_KEY
boxquell secret ls                             # never shows values
boxquell secret rm my-api --sandbox mybox
Option of secret set Meaning
<NAME> A known service (anthropic, claude-oauth, openai, openrouter, github) or your own name
--sandbox <name> Store it for this sandbox only instead of sharing it
--host <host> Host the secret may be sent to (repeatable; required for own names)
--env <VAR> Environment variable that carries the placeholder (repeatable)
--placeholder <text> Set the placeholder yourself

The value is read from the terminal or stdin. boxquell new --secret <NAME> attaches a secret at creation. Agent recipes name the host secrets they can use. Some tool recipes expect a secret of a given name, for example gitlab, jira, confluence, bitbucket; see the recipe description in Software.

Warning

Secrets are stored in a file with owner-only permissions, not in the system keychain yet.

Claude settings and LiteLLM

boxquell claude-settings mybox settings.json
boxquell claude-settings mybox --clear

The file is a Claude Code settings file, for example with ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and model names. The sandbox receives it as its managed settings with the token replaced by a placeholder. The token becomes a secret of that sandbox, and the gateway is added to the allowed destinations. Without a file, it uses this computer's managed settings. A gateway on your own computer (localhost) is reachable from the sandbox as 10.0.2.2.

Key helper

A key helper in the settings (apiKeyHelper), as used for sign-in through a company account, keeps running on this computer. Boxquell calls it, refreshes the key before it runs out and puts it into the sandbox's requests. The sandbox only has a placeholder.

This computer's managed settings

Without a file name, boxquell claude-settings mybox takes this computer's managed settings, with their drop-in files (managed-settings.d). In the app this is one button.

Keys for installed software

Software that needs a key has a field for it on the Config tab. See Config Tab and Credentials. Token use per key is on Usage and Costs.

Next: SSH Keys for Git | Agent Configuration | Security Model

Clone this wiki locally