Configuration File
The server reads configuration from:C:\ProgramData\UndyingTerminal\ut.cfg
Configuration Format
INI-style format with key=value pairs:Configuration Options
Network Settings
port
Type: IntegerDefault:
2022Description: TCP port for server to listen on
bind_ip
Type: IP AddressDefault:
0.0.0.0Description: IP address to bind server listener
| Value | Behavior |
|---|---|
0.0.0.0 | Listen on all interfaces (default) |
127.0.0.1 | Listen only on localhost (local-only access) |
192.168.1.10 | Listen on specific interface |
:: | Listen on all IPv6 interfaces |
- Use
127.0.0.1for local development - Use
0.0.0.0for remote access (combine with firewall rules) - Use specific IP for multi-NIC servers
Logging
verbose
Type: Boolean (true / false)Default:
falseDescription: Enable verbose logging
true, server logs:
- Client connections/disconnections
- Packet types sent/received
- Named pipe events
- Tunnel creation/destruction
Verbose logging helps diagnose connection issues but increases log volume. Enable temporarily for debugging.
Security
shared_key_hex
Type: 64-character hex string (32 bytes)Default: None (encryption disabled)
Description: Shared secret for XSalsa20 encryption
- Algorithm: XSalsa20 (via libsodium)
- Key size: 32 bytes (256-bit)
- Nonce: 24 bytes (auto-incremented per packet)
- Applied to all client ↔ server communication
Example Configurations
Development (Local Only)
Production (Internet-Facing)
Multi-Server (Development)
When running multiple servers on one machine:Environment Variables
Override configuration at runtime:UT_PIPE_NAME
Type: String (Windows named pipe path)Default:
\\\\.\\pipe\\undying-terminalDescription: Override named pipe path
- Running multiple servers on one machine
- Avoiding pipe name conflicts
- Development/testing isolation
Terminals must use the same
UT_PIPE_NAME to connect to the correct server.UT_DEBUG_HANDSHAKE
Type: Boolean (1 = enabled)Default: Not set (disabled)
Description: Enable packet-level debug output
Command-Line Flags
Override config file settings:--port <PORT>
--add-firewall
Automatically add Windows Firewall rule:
- Name: “Undying Terminal Server”
- Direction: Inbound
- Protocol: TCP
- Port: Current port (from config or —port)
- Action: Allow
--service
Run as Windows service:
- Uses SYSTEM account
- Starts automatically on boot
- Logs to Windows Event Log
- Handles graceful shutdown
Configuration Precedence
Settings are applied in this order (later overrides earlier):- Defaults (hardcoded in binary)
- Config file (
%PROGRAMDATA%\UndyingTerminal\ut.cfg) - Environment variables (
UT_PIPE_NAME, etc.) - Command-line flags (
--port, etc.)
Firewall Configuration
Windows Defender Firewall
- Automatic
- Manual (PowerShell)
- Manual (GUI)
Third-Party Firewalls
Configure your firewall to allow:- Inbound TCP on configured port (default 2022)
- Application:
undying-terminal-server.exe
Network Configuration
Port Forwarding (Router)
To access the server from external networks:Configure Router
In your router’s admin panel:
- External Port:
2022 - Internal IP:
192.168.1.100 - Internal Port:
2022 - Protocol: TCP
Performance Tuning
High-Concurrency Environments
For >100 concurrent sessions:Low-Bandwidth Networks
Monitoring and Logs
Check Server Status
View Logs
Whenverbose=true:
Metrics to Monitor
| Metric | Command | Normal Range |
|---|---|---|
| Active Connections | netstat -ano | findstr :2022 | measure | 0-1000s |
| Memory Usage | tasklist /fi "imagename eq undying-terminal-server.exe" | ~50MB + (5MB × sessions) |
| CPU Usage | Task Manager | <5% idle, <20% under load |
Backup and Recovery
Backup Configuration
Restore Configuration
Troubleshooting Configuration
Config file not found
Config file not found
Error: Server uses default settingsSolution: Create config directory
Invalid configuration value
Invalid configuration value
Error: Server fails to start or uses defaultCheck:
- Valid port number (1-65535, typically >1024)
- Valid IP address for
bind_ip - 64-character hex string for
shared_key_hex true/falsefor boolean values
Encryption key mismatch
Encryption key mismatch
Error: Client can’t connect (invalid handshake)Cause: Client and server have different encryption keysSolution: Ensure both use same
shared_key_hex valuePort already in use
Port already in use
Error: Solutions:
bind: address already in useCheck what’s using the port:- Change port in config
- Stop conflicting service
- Use
--portflag to override
Security Best Practices
Encryption
- Enable
shared_key_hexfor production - Generate strong random keys (32 bytes)
- Store keys securely
- Rotate keys periodically
Network Isolation
- Use
bind_ip=127.0.0.1for local-only - Use firewall rules to restrict access
- Use VPN for sensitive environments
- Avoid exposing to public internet
Access Control
- Use strong random passkeys
- Limit who knows passkeys
- Monitor active sessions
- Audit connections regularly
Operational Security
- Run as Windows service (not user account)
- Disable verbose logging in production
- Monitor server logs
- Keep software updated