Description: A lightweight web terminal that lets you access your server from phones, tablets, TVs - anywhere with a browser. No SSH client needed!
This is a submission for the GitHub Copilot CLI Challenge
What I Built
termi-host is a lightweight web-based terminal that solves a real problem: What if you need to access your server but don't have an SSH client?
This happens more often than you'd think:
- 📱 You're on your phone and need to check server logs
- 📺 You're using a smart TV browser
- 💻 You're on a public/work computer where you can't install SSH
- 🚨 Emergency access when you don't have your SSH keys
- 🎓 Teaching students without making them install software
termi-host gives you full terminal access through any web browser. Just install it on your VPS once, and access it from anywhere - phone, tablet, laptop, even your TV!
Key Features:
- 🌐 Works in any browser - Chrome, Firefox, Safari, Edge
- 🔒 Secure - Password protection, rate limiting, session timeouts
- ⚡ Super lightweight - Uses only ~16MB RAM per session
- 🎨 5 beautiful themes - Choose what looks best to you
- 📱 Mobile-friendly - Works great on phones and tablets
- 🚀 Easy setup - One command installation
GitHub:
🔗 https://github.com/vpbgkt/termi-host
Demo
Terminal Interface
)
Login Screen
)
Mobile View
)
Quick Video Demo
My Experience with GitHub Copilot CLI
GitHub Copilot CLI was like having an expert developer sitting next to me throughout this project. Here's how it helped:
1. Quick Problem Solving
When I needed to set up WebSocket authentication (which is tricky!), I just asked:
gh copilot suggest "how to authenticate websocket connections with express sessions"
Copilot gave me the exact pattern I needed - sharing the session middleware between HTTP and WebSocket connections. This saved me hours of Stack Overflow searching!
2. Security Features Made Easy
I wanted to add rate limiting to prevent brute force attacks but wasn't sure how. I asked:
gh copilot suggest "add rate limiting to prevent login brute force attacks in express"
Copilot suggested express-rate-limit and showed me exactly how to configure it (5 attempts per 15 minutes). Now the app is much more secure!
3. Handling Edge Cases
One big problem: what happens if the user's internet drops? The terminal would crash and leave zombie processes. I asked:
gh copilot suggest "cleanup terminal process when websocket disconnects in node-pty"
Copilot showed me how to properly handle cleanup with event listeners. No more zombie processes!
4. Production Deployment
I needed to run this as a system service that auto-restarts. Instead of googling systemd syntax:
gh copilot suggest "create systemd service file for nodejs application with auto restart"
Got a perfect systemd service file in seconds!
5. Error Handling
Throughout the project, whenever I wrote code, I'd ask:
gh copilot suggest "what error cases am I missing in this websocket handler"
Copilot helped me think about edge cases I would have missed - like handling authentication failures, connection timeouts, and invalid sessions.
The Impact:
Before Copilot CLI:
- Spend 30 minutes googling
- Read 5-10 Stack Overflow threads
- Try different solutions
- Debug when they don't work
- Finally get it working
With Copilot CLI:
- Ask specific question
- Get working solution in seconds
- Understand why it works
- Move on to next feature
Time saved: Probably 60-70% of development time!
The best part? Copilot didn't just give me code - it explained why things work. I learned better patterns for WebSocket security, proper cleanup handlers, and production-ready error handling.
Real Example:
Here's actual code that Copilot helped me write:
// Problem: WebSocket needs to check if user is authenticated
// Copilot suggested this clean solution:
server.on('upgrade', (request, socket, head) => {
sessionMiddleware(request, {}, () => {
if (AUTH_ENABLED && (!request.session || !request.session.authenticated)) {
socket.write('HTTP/1.1 401 Unauthorized\r\n\r\n');
socket.destroy();
return;
}
wss.handleUpgrade(request, socket, head, (ws) => {
wss.emit('connection', ws, request);
});
});
});
Without Copilot, I would've struggled for hours trying to figure out session middleware sharing between HTTP and WebSocket!
Why This Project Matters
In 2026, we should be able to manage our servers from anywhere. But traditional SSH has barriers:
- Requires client installation
- Needs SSH keys (risky on shared devices)
- Often blocked by firewalls
- Impossible on some devices (smart TVs, gaming consoles)
termi-host removes all these barriers. If you have a browser, you have terminal access.
Tech Stack:
- Backend: Node.js, Express, WebSocket (ws), node-pty
- Frontend: xterm.js, vanilla JavaScript
- Security: express-session, express-rate-limit, security headers
- Deployment: Systemd, nginx-ready
Quick Start:
git clone https://github.com/vpbgkt/termi-host.git
cd termi-host
bash install.sh
npm start
That's it! Access at http://localhost:3000
Performance:
- ✅ 16MB RAM per session
- ✅ <50ms latency
- ✅ <1 second startup
- ✅ Handles 20+ concurrent users
What's Next
I'm planning to add:
- Multi-session support (tabs)
- File upload/download
- Terminal recording/playback
- Docker image for easier deployment
- Mobile app wrapper
Try It Yourself!
🔗 Live Demo: http://159.65.151.238:3000 (admin/admin)
🔗 GitHub: https://github.com/vpbgkt/termi-host
📖 Docs: Full installation guide in README
License: MIT - Free and open source forever! ❤️
If you find this useful, please ⭐ star the repo and let me know in the comments! Questions? I'm happy to help! 🚀



Top comments (0)