A modern, web-based terminal emulator that lets you access your terminal from anywhere. Built with React, TypeScript, and Node.js, with optional desktop app support via Tauri.
- π Access Anywhere - Use your terminal from any device with a browser
- π Secure - PIN lock protection and authentication middleware
- π± Responsive - Works on desktop, tablet, and mobile devices
- π¨ Customizable - Multiple themes and appearance settings
- π File Management - Built-in file browser and operations
- π Real-time - WebSocket-based communication for instant updates
- π Memory Monitoring - Built-in memory usage viewer
- π Port Proxying - Tunnel local ports through Cloudflare
- π» Native Performance - Tauri-based desktop app with Rust backend
- π System Integration - Native notifications and system tray
- π¦ Portable - Bundled Node.js runtime included
- π Fast Startup - Quick launch and low resource usage
Frontend:
- React 18 with TypeScript
- Vite for fast development and building
- xterm.js for terminal emulation
- Socket.io for real-time communication
- PWA support for offline capability
Backend:
- Node.js + Express
- Socket.io server
- node-pty for pseudo-terminal management
- HTTP proxy for port forwarding
Desktop:
- Tauri 2.9 (Rust framework)
- Bundled Node.js runtime
- Cross-platform (Windows, macOS, Linux)
Before installation, ensure you have:
- β
Node.js 18 or higher (
node --version) - β
npm 8 or higher (
npm --version) - β
Git (
git --version) - β Internet connection (for downloading dependencies)
- β ~500MB free disk space
For desktop app:
- β
Rust 1.70+ (
rustc --version) - Install from rustup.rs
-
Clone the repository
git clone https://github.com/kerpopule/TerminalTunnel.git cd TerminalTunnel -
Install dependencies
npm install
-
Verify dependencies installation
npm run validate
If you see errors:
- Module not found errors: Run
rm -rf node_modules package-lock.json && npm install - Permission errors: Check you have write access to the directory
- Module not found errors: Run
-
Build the application
npm run build
-
Start the server
npm start
-
Access the application
- Open your browser to
http://localhost:3001 - Default port is 3001 (configurable in server/index.ts)
- Open your browser to
-
Complete web application setup first (steps 1-3 above)
-
Install Rust (required for Tauri)
- Visit rustup.rs and follow instructions
-
Build the desktop app
npm run tauri:build
-
Run the desktop app
- Find the installer in
src-tauri/target/release/ - Install and launch the application
- Find the installer in
Web application (with hot reload):
npm run devDesktop application (with hot reload):
npm run tauri:dev- Application starts with a default terminal tab
- Configure settings via the settings panel (gear icon)
- Set up PIN lock for additional security (optional)
Multiple Tabs:
- Open multiple terminal sessions simultaneously
- Switch between tabs with keyboard shortcuts or clicks
- Each tab maintains independent session state
File Browser:
- Access via the file manager icon
- Navigate your file system
- Upload/download files
- Edit files directly in browser
Port Proxying:
- Expose local ports to the internet via Cloudflare tunnel
- Access local development servers remotely
- Automatic tunnel setup and management
Themes:
- Choose from multiple built-in themes
- Customize colors and appearance
- Settings persist across sessions
Ctrl+C- Copy (in terminal)Ctrl+V- Paste (in terminal)Ctrl+Shift+T- New tabCtrl+Shift+W- Close tab
Edit server/index.ts to configure:
- Port number (default: 3001)
- Authentication settings
- CORS policy
- WebSocket options
Settings available in the UI:
- Terminal theme
- Font size and family
- Cursor style
- Tab persistence
- PIN lock settings
Terminal Tunnel/
βββ src/ # React frontend
β βββ components/ # UI components
β βββ contexts/ # React contexts
β βββ hooks/ # Custom hooks
β βββ utils/ # Utilities
β βββ themes/ # Theme definitions
βββ server/ # Node.js backend
β βββ index.ts # Server entry point
β βββ pty-manager.ts # Terminal management
β βββ auth.ts # Authentication
β βββ file-api.ts # File operations
βββ src-tauri/ # Desktop app (Tauri/Rust)
β βββ src/ # Rust source
β βββ Cargo.toml # Rust config
βββ scripts/ # Build scripts
βββ public/ # Static assets
βββ package.json # Project config
- PIN Lock: Enable PIN lock for additional authentication
- HTTPS: Use HTTPS in production environments
- Authentication: Server includes auth middleware
- File Access: File operations are sandboxed to user permissions
- Port Proxying: Cloudflare tunnel provides secure access
Node modules corruption
- Symptoms:
Cannot find module './main',MODULE_NOT_FOUNDerrors - Solution: Clean reinstall dependencies
rm -rf node_modules package-lock.json npm install
Build fails with TypeScript errors
- Symptoms:
error TS1470: import.meta not allowed,exports is not defined - Solution: Verify
tsconfig.server.jsonhas"module": "ESNext" - If issue persists, ensure
package.jsonhas"type": "module"
Cloudflared download fails
- Symptoms:
Failed to download: 404 Not Found - Solution: This is usually transient. Run
npm run bundle:cloudflaredagain - If persistent, check GitHub releases page is accessible
- Node version: Ensure Node.js 18+ is installed
- Dependencies: Try removing
node_modules/andpackage-lock.json, then runnpm installagain - TypeScript errors: Run
npm run buildto see detailed compilation errors
- Port already in use: Change the port in
server/index.ts - WebSocket connection fails: Check firewall settings and CORS configuration
- Terminal not responding: Check browser console for errors, restart server
- Rust not found: Install Rust from rustup.rs
- Build fails: Ensure all dependencies are installed with
npm install - App won't launch: Check
src-tauri/target/release/for error logs
Contributions are welcome! Please feel free to submit issues or pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under a Non-Commercial License. You are free to use, modify, and distribute this software for non-commercial purposes. Commercial use requires explicit permission from the author.
See the LICENSE file for details.
- Built with React
- Terminal emulation by xterm.js
- Desktop framework by Tauri
- Real-time communication via Socket.io
For issues, questions, or suggestions, please open an issue on GitHub: https://github.com/kerpopule/TerminalTunnel/issues
Made with β€οΈ for developers who want terminal access anywhere