Skip to main content

Configuration Reference

Open Terminal has sensible defaults out of the box. This page covers all the settings you can customize if you need to.

Settings are applied in this order (later ones override earlier ones):

  1. Built-in defaults
  2. System config file (/etc/open-terminal/config.toml)
  3. User config file (~/.config/open-terminal/config.toml)
  4. Environment variables (OPEN_TERMINAL_*)
  5. CLI flags (--host, --port, etc.)

All settings

SettingDefaultEnvironment VariableDescription
Host0.0.0.0NoneNetwork address to listen on
Port8000NonePort number
API KeyAuto-generatedOPEN_TERMINAL_API_KEYPassword for connecting
API Key FileNoneOPEN_TERMINAL_API_KEY_FILELoad the key from a file (for Docker secrets)
Log Directory~/.local/state/open-terminal/logsOPEN_TERMINAL_LOG_DIRWhere to save log files
Max Sessions16OPEN_TERMINAL_MAX_SESSIONSMaximum concurrent terminal sessions
Enable TerminaltrueOPEN_TERMINAL_ENABLE_TERMINALTurn the interactive terminal on/off
Enable NotebookstrueOPEN_TERMINAL_ENABLE_NOTEBOOKSTurn Jupyter notebook execution on/off
TERMxterm-256colorOPEN_TERMINAL_TERMTerminal color support
Execute TimeoutUnsetOPEN_TERMINAL_EXECUTE_TIMEOUTHow long (seconds) to wait for command output
Execute DescriptionNoneOPEN_TERMINAL_EXECUTE_DESCRIPTIONCustom text telling the AI about installed tools
Enable System PrompttrueOPEN_TERMINAL_ENABLE_SYSTEM_PROMPTExpose the /system prompt endpoint
System PromptGeneratedOPEN_TERMINAL_SYSTEM_PROMPTReplace the generated prompt with a custom template
Environment InfoNoneOPEN_TERMINAL_INFOAppend operator-provided environment context to the generated prompt
File Browser RoothomeOPEN_TERMINAL_FILE_BROWSER_ROOTUse home, an explicit path such as /workspace, or filesystem to opt out
Multi-UserfalseOPEN_TERMINAL_MULTI_USEREnable per-user isolation
CORS OriginsNoneOPEN_TERMINAL_CORS_ALLOWED_ORIGINSAllowed cross-origin domains
Allowed DomainsNoneOPEN_TERMINAL_ALLOWED_DOMAINSEgress firewall: only allow outbound connections to these domains

Docker-only settings

These only work with the Docker image:

SettingEnvironment VariableDescription
System PackagesOPEN_TERMINAL_PACKAGESSpace-separated list of system packages to install at startup
Python PackagesOPEN_TERMINAL_PIP_PACKAGESSpace-separated list of Python packages to install at startup
note

These packages are reinstalled every time the container starts. If you need many packages, consider building a custom image instead.

OpenShift image

The ghcr.io/open-webui/open-terminal:openshift image does not support runtime package installation, OPEN_TERMINAL_ALLOWED_DOMAINS, Docker socket workflows, or OPEN_TERMINAL_MULTI_USER=true. Install required tools in a custom image before deploying to OpenShift.


Config file

Instead of environment variables, you can put settings in a file:

host = "0.0.0.0"
port = 8000
api_key = "your-secret-key"
log_dir = "/var/log/open-terminal"
max_terminal_sessions = 16
enable_terminal = true
enable_notebooks = true
execute_timeout = 5
execute_description = "This terminal has ffmpeg and ImageMagick installed."
Why use a config file?

It keeps your API key out of the command line and shell history. Anyone running ps or htop on the machine won't see it.

To use a config file in a custom location:

open-terminal run --config /path/to/my-config.toml

System prompt placeholders

When OPEN_TERMINAL_SYSTEM_PROMPT is set, Open Terminal expands these placeholders:

PlaceholderValue
{{os}}Operating system name
{{kernel}}Kernel or OS release
{{arch}}Machine architecture
{{hostname}}Hostname
{{user}}Runtime user when available
{{shell}}Shell path
{{python_version}}Python version
{{home}}Runtime home directory

Unknown placeholders are left unchanged.


Docker secrets

For production Docker deployments, you can load the API key from a secret file:

services:
  open-terminal:
    image: ghcr.io/open-webui/open-terminal
    environment:
      - OPEN_TERMINAL_API_KEY_FILE=/run/secrets/terminal_api_key
    secrets:
      - terminal_api_key

secrets:
  terminal_api_key:
    file: ./terminal_api_key.txt

Image variants

Open Terminal comes in three sizes:

latestslimalpine
Best forGeneral use, AI agentsSmaller footprintSmallest footprint
Size~4 GB~430 MB~230 MB
IncludesNode.js, Python, compilers, ffmpeg, Docker CLI, data science libsgit, curl, jqgit, curl, jq
Can install packages✔ (has sudo)
Multi-user

If you're not sure, use latest. It has everything pre-installed so the AI can work with any tool without waiting for installs.

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.