Skip to content
Hoody.com

The web terminal interface provides an interactive browser-based terminal session hosted inside a container. This endpoint serves the HTML page that loads the terminal client and connects to a backend shell session. Most behavior is controlled through URL query parameters, allowing deep-linking to specific sessions, shells, SSH connections, side panels, and desktop environments without changing the endpoint itself.

Loads the web terminal interface HTML page. The query parameters on this request configure the session, display, and optional side panel that the page will render.

NameInTypeRequiredDescription
terminal_idquerystringNoTerminal session ID (numeric 1-65535, auto-generated if not provided). Allows multiple clients to share the same terminal session. On calls routed through a terminal-N containers-proxy hostname, the proxy sets this from the hostname label and overwrites any value you send
cwdquerystringNoInitial working directory for new terminal sessions (only applied when session is first created)
cwd_auto_createquerybooleanNoAuto-create cwd when the requested working directory does not exist yet. Only applies when cwd is explicitly provided for a new session. Enable with true, 1, or no value (default: false)
shellquerystringNoShell to use: bash, zsh, fish, sh, etc. (default: server startup command, only applies to new sessions)
userquerystringNoSystem user to spawn shell as (requires su permissions, only applies to new sessions, user must exist on system)
cmdquerystringNoBase64-encoded command to execute automatically on spawn (executes once when shell starts)
readonlyquerybooleanNoEnable read-only mode (blocks keyboard input, allows viewing only). Use true, 1, or no value
titlequerystringNoBrowser window/tab title (default: application default). HTML tags removed, max 200 characters, useful for organizing multiple terminal tabs
fontSizequeryintegerNoTerminal font size in pixels (default: 13, range: 8 to 72). Accepts px suffix (e.g., 16px), applied immediately when terminal loads
backgroundColorquerystringNoTerminal background color (default: #2b2b2b). Supports hex colors (#RGB, #RRGGBB, #RRGGBBAA) or CSS named colors (black, white, red, blue, green, navy, etc.)
panelquerystringNoURL to display in side panel iframe (enables panel feature)
panel-visiblequerybooleanNoShow panel on load (default: true if panel URL provided, false otherwise)
panel-positionquerystringNoPanel position: left or right (default: right)
panel-widthquerystringNoInitial panel width in pixels or percentage (default: 400px)
panel-resizablequerybooleanNoAllow panel resizing via drag handle (default: true)
hide-toolbarquerybooleanNoHide the terminal toolbar (default: false)
ssh_hostquerystringNoSSH server hostname or IP address (creates SSH session if provided with ssh_user)
ssh_userquerystringNoSSH username (required if ssh_host is provided)
ssh_portquerystringNoSSH port number (default: 22)
ssh_passwordquerystringNoSSH password for authentication (use with caution, prefer key-based auth)
socks5_hostquerystringNoSOCKS5 proxy hostname for SSH connection
socks5_portquerystringNoSOCKS5 proxy port (default: 1080)
socks5_userquerystringNoSOCKS5 proxy username for authentication
socks5_passquerystringNoSOCKS5 proxy password for authentication
desktopquerybooleanNoEnable Hoody Display desktop mode. Provides a full desktop environment instead of seamless individual windows (default: false)
desktop_envquerystringNoDesktop environment to launch (implies desktop=true). Starts the specified DE session after the display is ready. Valid values: xfce, mate
redirectquerystringNoRedirect mode. When set to display, creates/ensures the terminal session, waits for X11 display readiness, then returns HTTP 302 redirect to the display URL. Requires terminal_id and display params
redirect_delayqueryintegerNoExtra delay in seconds after display is ready before redirecting. Only used when redirect=display (default: 0)
argquerystringNoCommand-line arguments to pass to shell; accepted only where the deployment enabled shell arguments, and can be repeated
welcomequerybooleanNoShow welcome message on startup (default: false). Supports ?welcome=true, ?welcome=1, or ?welcome (no value = true)
debugquerybooleanNoEnable debug output in wrapper script (default: false)
resetquerybooleanNoKill existing terminal process and reconfigure session (default: false). Use to switch shell, user, or from shell to SSH
pidqueryintegerNoAttach to an existing process by PID instead of spawning a new shell. Implies reset
envquerystringNoInject environment variable as KEY=VALUE. Can be repeated for multiple variables (e.g., ?env=FOO=bar&env=BAZ=qux)
displayquerystringNoX11 display number for GUI applications. Accepts number (e.g., 1) or :number (e.g., :1). Shorthand for ?env=DISPLAY=:N
env_injectquerybooleanNoInject HOODY_* environment variables into shell session (default: true). Set to false to disable
startup_scriptquerystringNoPath to startup script to execute before shell launch (only applied on first session creation)
ssh_keyquerystringNoBase64-encoded SSH private key for key-based authentication (prefer over password-based auth)
panel-heightquerystringNoInitial panel height for top/bottom positioned panels (default: 300px)
panel-width-pctqueryintegerNoInitial panel width as a percentage of the window, 5-95. Takes precedence over panel-width
panel-height-pctqueryintegerNoInitial panel height as a percentage of the window for top/bottom panels, 5-95. Takes precedence over panel-height
wait_timeoutqueryintegerNoSeconds to wait for the display to become ready before redirecting (default: 60, capped at 300). Only used when redirect=display
rendererTypequerystringNoTerminal renderer: dom, canvas or webgl (default: webgl, or dom in Firefox)
fontFamilyquerystringNoTerminal font family, as a CSS font-family list
fontWeightquerystringNoFont weight of normal text: normal, bold, or 100 to 900
fontWeightBoldquerystringNoFont weight of bold text: normal, bold, or 100 to 900
lineHeightqueryintegerNoLine height as a multiple of the font size (read as a whole number)
letterSpacingqueryintegerNoExtra space between characters, in whole pixels
cursorBlinkquerybooleanNoBlink the cursor. Use ‘true’ or ‘1’
cursorStylequerystringNoCursor shape: block, underline or bar
cursorWidthqueryintegerNoWidth of the bar cursor in pixels
cursorInactiveStylequerystringNoCursor shape while the terminal is not focused: outline, block, bar, underline or none
themequerystringNoColor theme as a JSON object of xterm theme keys, e.g. {“background”:“#000000”,“foreground”:“#ffffff”}
minimumContrastRatioqueryintegerNoMinimum contrast ratio between text and background, 1 (no adjustment) to 21
drawBoldTextInBrightColorsquerybooleanNoDraw bold text in the bright ANSI colors. Use ‘true’ or ‘1’
scrollbackqueryintegerNoNumber of lines kept in the scrollback buffer
scrollSensitivityqueryintegerNoScroll speed multiplier
fastScrollSensitivityqueryintegerNoScroll speed multiplier while the fast-scroll modifier key is held
smoothScrollDurationqueryintegerNoSmooth scrolling duration in milliseconds (0 turns it off)
screenReaderModequerybooleanNoTurn on screen reader support. Use ‘true’ or ‘1’
disableResizeOverlayquerybooleanNoHide the size overlay shown while the terminal is resized. Use ‘true’ or ‘1’
unicodeVersionquerystringNoCharacter width tables: graphemes (default) or 11

This endpoint accepts no request body.

The 200 response is the text/html terminal page that loads the client and connects to the configured session. Open it in a browser to start the session.

import { HoodyClient } from 'hoody-sdk';
const hoody = await HoodyClient.login('https://api.hoody.com', { username, password });
const box = await hoody.withContainer(containerId);
// Builds the URL of terminal session 1042; nothing is fetched.
const url = box.embeds.terminal.session(undefined, {
index: 1042,
params: { title: 'Production logs', fontSize: 14, backgroundColor: '#1e1e2e', cwd: '/var/log' },
});

The builder refuses shell: add shell=bash to the URL yourself, as in the cURL tab.

The panel parameter opens a side iframe for context (docs, dashboards, logs). Other browser tabs that use the same terminal-N host label attach to the same session.

import { HoodyClient } from 'hoody-sdk';
const hoody = await HoodyClient.login('https://api.hoody.com', { username, password });
const box = await hoody.withContainer(containerId);
// Builds the URL of terminal session 1042 with a side panel; nothing is fetched.
const url = box.embeds.terminal.session(undefined, {
index: 1042,
params: { panel: 'https://docs.example.com/runbook', 'panel-position': 'right', 'panel-width': '420px' },
});

Example: SSH session with key authentication

Section titled “Example: SSH session with key authentication”

When ssh_host and ssh_user are provided, the session connects through SSH instead of spawning a local shell. Prefer ssh_key over ssh_password.

The SDK has no call for this example: client.embeds.terminal.session() refuses the ssh_* parameters because they carry a credential. Build the URL yourself, as in the cURL tab.

Set desktop_env to launch a full desktop environment (implies desktop=true). The browser becomes a remote desktop client.

The SDK has no call for this example: client.embeds.terminal.session() refuses desktop_env and display. Build the URL yourself, as in the cURL tab.