📌 Purpose & Quick Summary

The Web Terminal brings full shell power directly into your browser window. Engineered with xterm.js and isolated via JailShell chroot sandboxing, it gives you secure, low-latency command-line access to execute Git operations, Composer dependencies, NPM builds, WP-CLI commands, and Python scripts without needing an external SSH client.

BoostonCP Web Terminal Interface

Figure 14: Interactive browser xterm.js terminal session operating within JailShell chroot sandbox.


🖥️ Interface Tour & Elements

  1. Interactive xterm.js Terminal Canvas: Full ANSI color, UTF-8 terminal interface supporting interactive CLI utilities (nano, htop, git, composer).
  2. Terminal Status Bar: Displays current connection status (Connected), terminal dimensions (columns x rows), and shell environment (/bin/jailshell).
  3. Session Controls: Buttons to Clear Screen, Reset Terminal, or Disconnect Session.
  4. JailShell Chroot Security: Isolates the terminal strictly to /home/user, preventing visibility or traversal into other user directories or server root.

🛠️ Step-by-Step Instructions

Step 1: Launching the Web Terminal

  1. In the sidebar, click Terminal (icon: fa-terminal).
  2. The terminal automatically establishes a secure WebSocket connection to the backend PTY daemon.
  3. You are presented with a bash prompt: user@server:~$

Step 2: Executing Common Developer Commands

  1. Navigate to your website root:
    cd public_html
  2. Run Composer to install PHP dependencies:
    composer install --no-dev --optimize-autoloader
  3. Execute WP-CLI commands:
    wp plugin list
    wp cache flush
  4. Manage Git repositories:
    git status
    git pull origin main

Step 3: Copying and Pasting in Web Terminal

  • To Paste: Press Ctrl + V (Windows) or Cmd + V (Mac), or right-click within the terminal canvas.
  • To Copy: Select text with your mouse; selected text is automatically copied to your clipboard.

⚙️ Complete Field & Parameter Reference Table

Command / Tool Availability Functionality
composer Native Complete PHP package dependency manager.
wp (WP-CLI) Native Command line interface for WordPress maintenance.
git Native Distributed version control operations.
npm / node Native JavaScript runtime and Node package manager.
python3 / pip Native Python runtime and package management.
nano / vim Native In-terminal text editors.

❓ Troubleshooting & Common Errors

1. Terminal Displays "Disconnected / Reconnecting..."

  • Cause: WebSocket connection closed due to network interruption or inactivity timeout.
  • Solution: Click the Reconnect button in the status bar or refresh the page to spawn a fresh PTY session.

2. Error: "Terminal access is disabled in Demo Mode"

  • Cause: Accounts flagged as demo users are restricted from executing shell commands.
  • Solution: Upgrade or contact your administrator for standard hosting access.