General Questions
What is Undying Terminal?
Undying Terminal is a Windows-native persistent terminal solution that keeps SSH sessions alive through network disconnects, laptop sleep, VPN switches, and other interruptions. Unlike traditional SSH, it implements:- Automatic reconnection with exponential backoff
- Sequence-based packet recovery (no data loss)
- 64MB recovery buffer per direction
- Keepalive heartbeat (every 5 seconds)
How is this different from SSH?
| Feature | Undying Terminal | SSH |
|---|---|---|
| Session Persistence | Survives disconnects | Drops immediately |
| Automatic Reconnect | Built-in | Manual only |
| Packet Recovery | Up to 64MB | None |
| Port Forwarding Persistence | Tunnels survive | Drops with session |
| Windows Native | ConPTY integration | Requires WSL/OpenSSH |
- Working from unstable networks (WiFi, mobile, VPN)
- Running long processes that can’t be interrupted
- Frequently switching networks
- Need persistent port forwarding
- Network is stable
- Quick one-off commands
- Need features not yet supported by Undying Terminal
Is this production-ready?
Yes, for persistent terminal sessions on Windows. Stable Features:- Session persistence and recovery
- Port forwarding (forward and reverse)
- SSH bootstrap
- Jumphost support
- Optional encryption (XSalsa20)
- Windows-only
Can I use this on Linux or macOS?
No. Undying Terminal binaries are Windows executables. If you need to use it from a non-Windows machine, the practical options are:- Use RDP/Remote Desktop into a Windows machine and run the client there
- Run a Windows VM and run the client there
What does “undying” mean?
Sessions never die from network issues:- Disconnects → Automatic reconnect
- Laptop sleep → Recovers on wake
- VPN switch → Seamless transition
- Network change → Transparent recovery
Installation & Setup
Which Windows version do I need?
Minimum: Windows 10 Build 17763 (October 2018 Update) Reason: ConPTY API introduced in Build 17763. Check your version:- Windows 10 (1809+)
- Windows 11
- Windows Server 2019+
Do I need administrator rights?
For basic use: No For some features: Yes- Windows Service installation
- Firewall rule creation (can use
--add-firewall) - System-wide PATH modification
How do I install as a Windows service?
Can I run multiple servers on one machine?
Yes, using different ports and pipe names:UT_PIPE_NAME to connect to the correct server.
Connection & Usage
Why won’t my client connect?
Checklist:-
Server running?
-
Correct client ID and passkey?
- Must match terminal output exactly
- Passkey is case-sensitive hex string
-
Firewall blocking?
-
Network reachable?
-
Encryption mismatch?
- Server and client must both use same
shared_key_hex - Or both have no encryption
- Server and client must both use same
How do I know if my session is alive?
Methods:-
Keepalive packets (automatic)
- Client sends every 5 seconds
- Server echoes back
- If 3 missed → triggers reconnect
-
Send a command:
If output appears, session is alive.
-
Check server logs (if
verbose=true):
What happens when I disconnect?
Automatic Recovery Process:-
Disconnect detected
- Client notices (socket error or 3 missed keepalives)
- Server keeps terminal alive
-
Reconnect attempts
- Client: Exponential backoff (100ms → 2000ms)
- Tries until successful
-
Recovery handshake
- Exchange sequence numbers
- Resend missed packets (up to 64MB)
- Resume normal operation
-
User experience
- Session continues where it left off
- Recent output replayed (catchup)
- New output streams normally
Can I reconnect from a different computer?
No, not directly. The client ID is machine-specific. Workaround:- Copy client ID and passkey to new machine
- Connect with same credentials
- Server treats it as the same session
How do I disconnect safely?
Recommended: Close the client terminal window Effect:- Client disconnects
- Server keeps session alive
- Terminal continues running
- Can reconnect anytime
- Shell exits
- Terminal process terminates
- Session ends
- Must restart terminal
Security
How secure is the encryption?
Algorithm: XSalsa20 (via libsodium)Key Size: 256-bit (32 bytes)
Nonce: 24 bytes, auto-incremented per packet Security Properties:
- Confidentiality (data is encrypted)
- No authentication (no MAC/AEAD)
- Passkey sent in plaintext initially
- Enable for internet-facing servers
- Use strong random keys (not passphrases)
- Combine with firewall rules
- Consider VPN for highly sensitive environments
- Government/military secrets
- Compliance-driven environments (use VPN)
- Scenarios requiring authentication
Should I expose this to the internet?
Short answer: Only with encryption enabled and strong firewall rules. Best Practices:-
Enable encryption:
-
Firewall rules:
- Restrict by source IP if possible
- Use non-standard port
- Monitor failed connection attempts
-
Strong passkeys:
- Use long random hex strings
- Rotate periodically
- Don’t share
-
Consider VPN:
- For sensitive environments
- Adds defense-in-depth
- Better authentication
How do I rotate encryption keys?
Process:-
Generate new key:
-
Update server config:
-
Restart server:
-
Update all clients:
- Existing sessions will disconnect
- Clients must use new key to reconnect
Performance
What’s the latency overhead?
Typical: 1-2ms additional latency Breakdown:- Framing: ~0.5ms
- Sequence tracking: ~0.5ms
- Encryption (if enabled): ~0.5-1ms
- Network: (varies)
- SSH: 0.5-1ms overhead
- Mosh: 1-3ms (with prediction)
How much bandwidth does it use?
Idle session:- Keepalive: ~200 bytes every 5 seconds
- ~40 bytes/second (~320 bps)
- Same as raw terminal output
- No compression (sent as-is)
- Same as direct TCP connection
- No additional overhead
npm run dev logs at 10KB/s = 10KB/s bandwidth (no overhead).
How many concurrent sessions can I run?
Typical hardware (4-core, 8GB RAM):- ~1000 concurrent sessions
- Limited by:
- Thread count (1 thread per client + terminal)
- Memory (~5MB per session)
- Network bandwidth
- Monitor memory usage
- Scale vertically (more RAM/CPU)
- Not designed for horizontal scaling
Troubleshooting
Server won’t start - port already in use
Error:bind: address already in use
Find what’s using the port:
-
Change port in config:
-
Kill conflicting process:
-
Use command-line override:
Session is very slow
Possible causes:-
Network latency:
-
Packet loss:
- High packet loss triggers frequent catchup
- Check network quality
-
Large recovery buffer:
- Replaying 64MB on reconnect takes time
- Wait for catchup to complete
-
Server overload:
- Check CPU/memory on server
- Reduce concurrent sessions
Terminal output is garbled
Causes:-
Terminal resize mismatch:
- Resize client window
- Terminal should auto-adjust
-
Shell encoding issues:
- Ensure UTF-8 encoding
- Check
$OutputEncodingin PowerShell
-
ConPTY issues:
- Restart terminal process
- Update Windows (ConPTY bugs fixed in newer builds)
Advanced Topics
Can I modify the keepalive interval?
Currently: Requires recompile In code (src/ut/Keepalive.cpp):
How does the recovery buffer work?
Mechanism: Each connection maintains:- BackedWriter: Last 64MB of sent packets
- BackedReader: Sequence number tracker
- Catchup: Resend missed packets on reconnect
- 64MB per direction (128MB total)
- FIFO queue (oldest packets dropped)
Can I run the client on Linux?
No. The client is Windows-only.Roadmap
There is no published roadmap. If you want to propose changes or new features, please open an issue: https://github.com/Microck/UndyingTerminal/issues Community requests: GitHub IssuesHow can I contribute?
See Contributing Guide. Ways to help:- 🐛 Report bugs
- 📝 Improve documentation
- 💻 Submit pull requests
- 🧪 Test on different Windows versions
- 💬 Help triage GitHub issues
Getting Help
Where can I get support?
Documentation: https://undyingterminal.mintlify.app/GitHub Issues: https://github.com/Microck/UndyingTerminal/issues Before asking:
- Check this FAQ
- Search existing issues
- Enable debug logging (
$env:UT_DEBUG_HANDSHAKE=1)
- Windows version
- Undying Terminal version
- Error messages (full output)
- Steps to reproduce