Skip to main content

Environment Variables

The Environment variables of a terminal, under Advanced in the terminal dialog, are passed into every Open Terminal instance it starts. They are raw strings, not shell commands.

Use raw values in the dialog:

Desired value inside the containerEnter this in the dialog
sk-proj-abcsk-proj-abc
*.pypi.org,github.com*.pypi.org,github.com
hello worldhello world
"hello world" including quote characters"hello world"

Do not add ' or " around a value unless the quote characters are part of the value you want the container to see.

Forwarding Behavior​

Use the terminal's Environment variables for values that should appear inside Open Terminal instances. Orchestrator process env vars configure the orchestrator itself. The exception is OPEN_TERMINAL_SYSTEM_PROMPT in the orchestrator's own environment: every instance receives it as a default, and a terminal's own value replaces it.

The orchestrator drops OPEN_TERMINAL_API_KEY from a terminal's environment variables. It generates a private API key per terminal instance and uses that key to proxy requests.

warning

Environment variables are visible to everyone who uses the terminal. Do not put secrets in a terminal unless every person it is shared with may see and use them.

Common Open Terminal Env Vars​

VariablePurpose
OPEN_TERMINAL_ALLOWED_DOMAINSRestrict outbound network access, for example *.pypi.org,github.com
OPEN_TERMINAL_EXECUTE_TIMEOUTDefault command wait timeout in seconds
OPEN_TERMINAL_EXECUTE_DESCRIPTIONExtra tool-description text shown to the model
OPEN_TERMINAL_SYSTEM_PROMPTCustom system prompt template
OPEN_TERMINAL_INFOExtra environment information appended to the generated prompt
OPEN_TERMINAL_FILE_BROWSER_ROOTFile-browser visual root. Use home, an explicit path such as /workspace, or filesystem to opt out
OPEN_TERMINAL_PACKAGESSpace-separated apt packages installed at container startup
OPEN_TERMINAL_PIP_PACKAGESSpace-separated Python packages installed at container startup
OPEN_TERMINAL_NPM_PACKAGESSpace-separated npm packages installed globally at container startup

Automatically Injected Resource Vars​

The orchestrator sets these automatically for each field that is filled in under CPU and Memory, so a system prompt or tool can read the container's resource budget. They carry the workspace's real limits.

VariablePurpose
OPEN_TERMINAL_CPU_LIMITCPU limit from the terminal's CPU
OPEN_TERMINAL_CPU_COUNTCPU count derived from the terminal's CPU
OPEN_TERMINAL_MEMORY_LIMITMemory limit from the terminal's Memory
OPEN_TERMINAL_MEMORY_BYTESMemory limit in bytes derived from the terminal's Memory
This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.