Configuration Reference
Settings are applied in this order (later ones override earlier ones):
- Built-in defaults
- System config file (
/etc/hrida-terminal/config.toml) - User config file (
~/.config/hrida-terminal/config.toml) - Environment variables (
HRIDA_TERMINAL_*) - CLI flags (
--host,--port, etc.)
All Settings
| Setting | Default | Environment Variable | Description |
|---|---|---|---|
| Host | 0.0.0.0 | HRIDA_TERMINAL_HOST | Network address to listen on |
| Port | 8000 | HRIDA_TERMINAL_PORT | Port number |
| API Key | Auto-generated | HRIDA_TERMINAL_API_KEY | Password for connecting |
| API Key File | — | HRIDA_TERMINAL_API_KEY_FILE | Load the key from a file (for Docker secrets) |
| Log Directory | ~/.local/state/hrida-terminal/logs | HRIDA_TERMINAL_LOG_DIR | Where to save log files |
| Max Sessions | 16 | HRIDA_TERMINAL_MAX_SESSIONS | Maximum concurrent terminal sessions |
| Enable Terminal | true | HRIDA_TERMINAL_ENABLE_TERMINAL | Turn the interactive terminal on/off |
| Enable Notebooks | true | HRIDA_TERMINAL_ENABLE_NOTEBOOKS | Turn Jupyter notebook run on/off |
| Enable System Prompt | true | HRIDA_TERMINAL_ENABLE_SYSTEM_PROMPT | Serve the built-in system prompt that tells the AI how to use the terminal |
| System Prompt | — | HRIDA_TERMINAL_SYSTEM_PROMPT | Replace the built-in system prompt with your own text |
| Environment Info | — | HRIDA_TERMINAL_INFO | Short description of this environment, added to the system prompt |
| TERM | xterm-256color | HRIDA_TERMINAL_TERM | Terminal color support |
| Execute Timeout | Unset | HRIDA_TERMINAL_EXECUTE_TIMEOUT | How long (seconds) to wait for command output |
| Execute Description | — | HRIDA_TERMINAL_EXECUTE_DESCRIPTION | Custom text telling the AI about installed tools |
| Multi-User | false | HRIDA_TERMINAL_MULTI_USER | Enable per-user isolation |
| User Prefix | — | HRIDA_TERMINAL_USER_PREFIX | Prefix for per-user Linux account names in multi-user mode |
| Session CWD TTL | 604800 | HRIDA_TERMINAL_SESSION_CWD_TTL | Seconds to remember each chat session's working directory |
| Max Log Size | 50000000 | HRIDA_TERMINAL_MAX_LOG_SIZE | Bytes per process log before logging stops |
| Log Retention | 604800 | HRIDA_TERMINAL_LOG_RETENTION | Seconds to keep logs of finished processes |
| Log Flush Interval | 0 | HRIDA_TERMINAL_LOG_FLUSH_INTERVAL | Minimum seconds between log writes (0 = write every chunk) |
| Binary MIME Prefixes | image | HRIDA_TERMINAL_BINARY_MIME_PREFIXES | File types returned to the AI as raw binary instead of text |
| Event Loop | auto | HRIDA_TERMINAL_UVICORN_LOOP | Server event loop (auto, asyncio, uvloop) |
| CORS Origins | — | HRIDA_TERMINAL_CORS_ALLOWED_ORIGINS | Allowed cross-origin domains |
| Allowed Domains | — | HRIDA_TERMINAL_ALLOWED_DOMAINS | Egress firewall: only allow outbound connections to these domains |
Docker-Only Settings
These only work with the Docker image:
| Setting | Environment Variable | Description |
|---|---|---|
| System Packages | HRIDA_TERMINAL_PACKAGES | Space-separated list of system packages to install at startup |
| Python Packages | HRIDA_TERMINAL_PIP_PACKAGES | Space-separated list of Python packages to install at startup |
| npm Packages | HRIDA_TERMINAL_NPM_PACKAGES | Space-separated list of global npm packages to install at startup |
| No New Privileges | HRIDA_TERMINAL_NO_NEW_PRIVILEGES | Read by the bundled Compose files to set Docker's no-new-privileges option (default true). Set to false for multi-user mode. Must be in the .env next to the Compose file |
These packages are reinstalled every time the container starts. If you need many packages, consider building a custom image instead.
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/hrida-terminal"
max_terminal_sessions = 16
enable_terminal = true
enable_notebooks = true
execute_timeout = 5
execute_description = "This terminal has ffmpeg and ImageMagick installed."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:
hrida-terminal run --config /path/to/my-config.tomlDocker Secrets
For production Docker deployments, you can load the API key from a secret file:
services:
hrida-terminal:
image: ghcr.io/hrida-ai/hrida-terminal
environment:
- HRIDA_TERMINAL_API_KEY_FILE=/run/secrets/terminal_api_key
secrets:
- terminal_api_key
secrets:
terminal_api_key:
file: ./terminal_api_key.txtImage Variants
Hrida Terminal comes in three sizes:
latest | slim | alpine | |
|---|---|---|---|
| Best for | General use, AI agents | Smaller footprint | Smallest footprint |
| Size | ~4 GB | ~430 MB | ~230 MB |
| Includes | Node.js, Python, compilers, ffmpeg, Docker CLI, data science libs | git, curl, jq | git, 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.
For OpenShift, build Dockerfile.openshift. It runs as a non-root arbitrary UID and does not support multi-user mode, egress filtering or startup package installs. See OpenShift.