A full-featured web-based Linux terminal with real PTY support, WebSocket real-time interaction, multi-language compilation environment, and complete sudo access.
- True Linux PTY — not a simulator, runs real shell processes
- WebSocket real-time I/O with xterm.js frontend
- Session isolation — each browser tab gets its own independent terminal
- Full sudo access — install packages, modify system, run any command
| Language | Tools |
|---|---|
| C / C++ | gcc, g++, make, cmake, gdb |
| Rust | rustc, cargo (via rustup) |
| Python | python3, pip, venv |
| Node.js | node, npm, yarn |
| Go | go compiler + modules |
| Java | javac, java (OpenJDK) |
| Tools | git, curl, wget, nano, vim, htop, tmux, jq |
- Dark / Light theme toggle (persisted in localStorage)
- Font size adjustment (Ctrl+±)
- Copy/Paste — Ctrl+Shift+C / V
- Clear screen — Ctrl+L
- Fullscreen — F11
- Drag & drop file upload to
/tmp/ - File download via
/api/download?path=/path/to/file - Welcome banner with full system info
- Responsive — works on desktop and mobile
- Click "Import from GitHub" on replit.com
- Paste this repo URL
- Click "Run"
Start Command (if needed):
npm install && npm start
# Build and run
docker build -t web-terminal .
docker run -d -p 3000:3000 --privileged --name web-terminal web-terminal
# Or with docker-compose
docker-compose up -dOpen: http://localhost:3000
# Prerequisites: Node.js 18+, build-essential (for node-pty)
git clone https://github.com/YOUR_USERNAME/web-linux-terminal.git
cd web-linux-terminal
npm install
npm startOpen: http://localhost:3000
- Connect your GitHub repo
- Set Build Command:
npm install - Set Start Command:
npm start - The app auto-detects
PORTfrom environment
web-linux-terminal/
├── server/
│ ├── index.js # Express + Socket.IO server, API routes
│ └── terminal.js # node-pty terminal manager
├── public/
│ ├── index.html # Main page with xterm.js
│ ├── css/
│ │ └── style.css # Dark/Light themes, responsive
│ └── js/
│ ├── terminal.js # Terminal client, Socket.IO, sysinfo
│ ├── ui.js # Buttons, shortcuts, fullscreen
│ └── upload.js # Drag & drop file upload
├── Dockerfile # Multi-arch container with all dev tools
├── docker-compose.yml # One-command deployment
├── .replit # Replit configuration
├── replit.nix # Replit Nix dependencies
├── package.json # Dependencies
├── .gitignore
└── README.md
| Shortcut | Action |
|---|---|
Ctrl+Shift+C |
Copy selection |
Ctrl+Shift+V |
Paste from clipboard |
Ctrl+L |
Clear screen |
Ctrl++ |
Increase font size |
Ctrl+- |
Decrease font size |
Ctrl+0 |
Reset font size |
Ctrl+Shift+T |
Toggle dark/light theme |
F11 |
Toggle fullscreen |
? |
Show keyboard shortcuts help |
| Method | Path | Description |
|---|---|---|
GET |
/api/sysinfo |
System information (OS, CPU, memory, dev tools) |
POST |
/api/upload |
Upload file (multipart, field: file, optional: path) |
GET |
/api/download?path= |
Download file from server |
| Event | Direction | Description |
|---|---|---|
start |
Client→Server | Initialize terminal session ({cols, rows}) |
input |
Client→Server | Send keystrokes |
resize |
Client→Server | Resize terminal ({cols, rows}) |
output |
Server→Client | Terminal output data |
session |
Server→Client | Session info ({sessionId}) |
exit |
Server→Client | Process exited (exitCode) |
This terminal runs with full root/sudo access by design. It is intended for:
- Personal use
- Isolated development environments
- Controlled internal networks
- Educational / sandbox purposes
Do NOT expose to the public internet without:
- Adding authentication (reverse proxy with BasicAuth / OAuth)
- Rate limiting
- Network isolation (Docker network policies)
- Resource limits (cgroups / Docker resource constraints)
Edit the Dockerfile to add packages:
RUN apt-get update && apt-get install -y \
your-package-here \
&& rm -rf /var/lib/apt/lists/*Edit CSS variables in public/css/style.css:
[data-theme="dark"] {
--bg: #your-color;
--accent: #your-color;
/* ... */
}| Variable | Default | Description |
|---|---|---|
PORT |
3000 |
Server port (auto-detected on PaaS) |
HOST |
0.0.0.0 |
Bind address |
NODE_ENV |
- | production recommended |
cd web-linux-terminal
git init
git add -A
git commit -m "feat: complete web linux terminal with multi-language dev environment
- Real PTY terminal via node-pty + WebSocket
- C/C++, Rust, Python, Node.js, Go, Java compilation
- Full sudo access, no restrictions
- Dark/light themes, file upload/download
- Session isolation per browser tab
- Docker + Replit ready"
# Add your remote
git remote add origin https://github.com/YOUR_USERNAME/web-linux-terminal.git
git branch -M main
git push -u origin mainMIT License — see LICENSE for details.