Run Terminal Command Node

The Run Terminal Command node executes shell commands and writes execution output into workflow data.


Configuration

  • command: Shell command text; supports {{...}} templates (for example {{data.someKey}}).
  • executeOnHost: If true, the runtime uses nsenter to execute on the host (requires the agent container to run with --privileged --pid=host).
  • timeout: Max execution duration in seconds (default is 30).
  • outputKey: Where to store the result in message.data (default: data.terminalOutput).

Result shape written to outputKey:

{
  "stdout": "...",
  "stderr": "...",
  "exitCode": 0,
  "success": true,
  "command": "..."
}

If the command fails (non-zero exit code), the node still returns success but sets success: false in the stored output. If it times out, exitCode is -1 and stderr contains the timeout message.


Safety Guidance

  • Use allowlisted commands only.
  • Restrict edit permissions for workflows using this node.
  • Keep timeout low and fail fast on non-zero exits.
  • Never pass secrets directly in command text.

Related Pages