A self-hosted web terminal with file explorer. Access your machine from any browser, including your phone.
git clone https://github.com/unn-known1/webterm.git
cd webterm
chmod +x setup.sh stop.sh
./setup.shcurl -fsSL https://raw.githubusercontent.com/unn-known1/webterm/main/setup.sh | bashOr clone + tunnel in one shot:
git clone https://github.com/unn-known1/webterm.git \
&& cd webterm \
&& npm install \
&& node server.js & \
&& cloudflared tunnel --url http://localhost:3000That's it. The script will:
- Install Node.js if missing
- Install npm dependencies (including
node-ptyfor real shell access) - Ask for a port and optional PIN
- Start the server
- Optionally install as a systemd service
- Optionally start a Cloudflare Tunnel for remote access (no port forwarding needed)
| Feature | Details |
|---|---|
| Real shell | Full PTY via node-pty — bash, zsh, fish, etc. |
| Multiple tabs | Open unlimited terminal sessions |
| File explorer | Browse, upload, download, rename, delete |
| Code editor | Edit files in-browser with syntax highlighting |
| Mobile keyboard | ESC, TAB, arrows, Ctrl+C/D/Z/L, Del, Home/End |
| Search | In-terminal search with Ctrl+F |
| Themes | Tokyo Night, Dracula, Gruvbox, Solarized, Monokai, Light |
| PIN protection | Optional PIN to block unauthorized access |
| PWA | Installable on iOS/Android/Desktop |
| Drag & drop upload | Drop files anywhere to upload |
| Cloudflare Tunnel | Public HTTPS URL, no port forwarding |
| Shortcut | Action |
|---|---|
Ctrl+T |
New terminal tab |
Ctrl+W |
Close current tab |
Ctrl+B |
Toggle file explorer |
Ctrl+F |
Search in terminal |
Ctrl+Shift+→ / ← |
Cycle tabs |
Ctrl+S (in editor) |
Save file |
PORT=3000
HOST=0.0.0.0
PIN=yourpin
# SHELL=/usr/bin/zshgit clone https://github.com/unn-knonw1/webterm.git
cd webterm
npm install
# Start server
node server.js
# Start with Cloudflare tunnel
cloudflared tunnel --url http://localhost:3000
# Or both in one command
node server.js & cloudflared tunnel --url http://localhost:3000
# Stop server
./stop.sh- iOS: Open in Safari → Share → Add to Home Screen
- Android: Open in Chrome → Menu → Install App
- Desktop: Chrome/Edge address bar → install icon
- Always set a PIN if the server will be accessible outside your local network
- The Cloudflare Tunnel URL is temporary and changes each restart; for a permanent URL, set up a named Cloudflare tunnel
- Traffic over the tunnel is encrypted (HTTPS)
- For extra security, bind to localhost and only expose via the tunnel:
HOST=127.0.0.1
- Node.js ≥ 18
- Linux/macOS (node-pty has limited Windows support; use WSL on Windows)
- Python 3 + make + g++ (for building node-pty — usually pre-installed)