Skip to content

The web terminal interface provides an interactive, browser-based terminal that supports extensive customization via URL parameters. This section covers the main entry point and the OpenAPI specification endpoints used for programmatic API access and integration.


GET /

Returns the main web terminal interface HTML page. The endpoint supports session management, display customization, SSH connectivity, panel integration, and access control through query parameters.

NameInTypeRequiredDescription
terminal_idquerystringNoTerminal session ID (numeric 1-65535, auto-generated if not provided). Allows multiple clients to share the same terminal session.
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-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.
panel-heightquerystringNoInitial panel height for top/bottom positioned panels. Default: 300px.
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).
ssh_keyquerystringNoBase64-encoded SSH private key for key-based authentication (prefer over password-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 (requires --url-arg server option, 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).

Returns the web terminal interface HTML page (text/html).

{
"description": "Web terminal interface HTML page",
"content": {
"text/html": {
"schema": {
"type": "object"
}
}
}
}
const html = await client.terminal.web.get({
terminal_id: "42",
shell: "bash",
fontSize: 14,
backgroundColor: "#1e1e1e",
title: "Production Server",
panel: "https://example.com/sidebar",
panel-position: "right",
panel-width: "350px",
welcome: true
});
Terminal window
curl -X GET "https://api.example.com/?terminal_id=42&shell=bash&fontSize=14&backgroundColor=%231e1e1e&title=Production%20Server&welcome=true" \
-H "Authorization: Bearer <token>"

The API exposes its own OpenAPI 3.0 specification in both JSON and YAML formats. The spec is auto-generated from source code annotations and can be used to bootstrap client SDKs, generate documentation, or validate integrations.

GET /api/v1/terminal/openapi.json

Retrieve the complete OpenAPI 3.0 specification in JSON format.

This endpoint takes no parameters.

Returns the OpenAPI 3.0 specification as JSON.

{
"openapi": "3.0.0",
"info": {
"title": "Hoody Terminal API",
"version": "1.0.0"
},
"paths": {}
}
const spec = await client.terminal.docs.getJson();
console.log(spec.openapi, spec.info.version);
Terminal window
curl -X GET "https://api.example.com/api/v1/terminal/openapi.json" \
-H "Authorization: Bearer <token>"

GET /api/v1/terminal/openapi.yaml

Retrieve the complete OpenAPI 3.0 specification in YAML format.

This endpoint takes no parameters.

Returns the OpenAPI 3.0 specification as YAML.

openapi: 3.0.0
info:
title: Hoody Terminal API
version: 1.0.0
paths: {}
const yamlSpec = await client.terminal.docs.getYaml();
Terminal window
curl -X GET "https://api.example.com/api/v1/terminal/openapi.yaml" \
-H "Authorization: Bearer <token>"