A web-based terminal interface that provides browser access to real system terminals with persistent session management, multi-session support, and seamless file handling.
- Terminal sessions remain active even after closing the browser
- Reconnect to previous sessions with full history preserved
- Output buffer retention (last 1000 lines per session)
- Create and manage multiple independent terminal sessions
- Quick session switching via sidebar menu
- Rename sessions for better organization
- Visual indicators for active sessions and last access time
- Drag & Drop Support: Drop files directly into the terminal
- Files are uploaded to
~/wt_upload/
directory - File path automatically inserted at cursor position
- Maximum file size: 100MB
- Designed for AI CLI tools: Path insertion is optimized for tools like Claude Code that can read files from provided paths
- Perfect for quickly sharing images/files with AI assistants - just drop and the path is ready
- Visual Feedback: Drop zone highlights when dragging files over the terminal
- Files are uploaded to
- Smart Path Insertion: Paths with spaces are automatically quoted
- Bottom Input Panel: A dedicated text field for reliable input
- Essential for non-English languages (Korean, Japanese, Chinese, etc.)
- Mobile browsers often fail to properly handle IME input in xterm.js
- Provides a workaround for complex character input
- Can be hidden/collapsed if you only use English
- Multi-line Support:
Enter
: Execute commandCmd/Ctrl + Enter
: Insert line break
- Direct Terminal Input: Click on terminal to type directly (works best with English)
Alt + Shift + C
: Create new sessionAlt + Shift + P
: Previous sessionAlt + Shift + N
: Next sessionAlt + Shift + R
: Rename current sessionAlt + Shift + X
: Terminate current session
Alt + 1
: Focus terminalAlt + 2
: Focus input fieldAlt + 3
: Toggle sidebarEscape
: Return to terminal / Close sidebar
- Node.js (v14 or higher)
- npm or yarn
git clone https://github.com/MathToML/webterm.git
cd webterm
npm install
# Production mode
npm start
# Development mode with auto-restart
npm run dev
# Custom port
PORT=8080 npm start
- Open your browser and navigate to
http://localhost:3000
- Create a new session or connect to an existing one
- Use the terminal as you would any local terminal
- Drag and drop files when needed
- Switch between sessions using the sidebar or keyboard shortcuts
Important: WebTerm has no built-in authentication. It provides full terminal access to anyone who can reach the server.
- Local Network: By default, the server is accessible to all devices on your local network
- Public Networks: Never run WebTerm on public networks without proper security measures
- Recommendation: Use only on trusted networks or implement additional security layers
For secure remote access, we recommend using Tailscale:
- Install Tailscale on your server and client devices
- Connect all devices to your Tailscale network
- Access WebTerm using your server's Tailscale IP
- Enjoy secure terminal access from anywhere, including iPads and mobile devices
This approach provides:
- End-to-end encryption
- Zero-configuration VPN
- Works seamlessly on iPads and mobile browsers
- No port forwarding or firewall configuration needed
- Backend: Node.js, Express, Socket.io, node-pty
- Frontend: xterm.js, vanilla JavaScript
- Session Management: UUID-based identification with server-side state management
webterm/
├── server.js # Express server and session management
├── index.html # Frontend application
└── package.json # Dependencies
~/wt_upload/ # Uploaded files directory (auto-created in home directory)
- Chrome/Edge (recommended)
- Safari (recommended)
- Firefox
- Mobile browsers (with on-screen keyboard support)
- Terminal size is fixed on session creation
- Sessions are stored in memory (lost on server restart)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
MIT