VibeTunnel Server Security Configuration
Authentication Options
VibeTunnel Server provides several authentication mechanisms to secure terminal access:1. Standard Authentication
System User Password (default)- Uses the operating system’s user authentication
- Validates against local user accounts
- Supports optional SSH key authentication with
--enable-ssh-keys
- Enabled with
--no-authflag - Automatically logs in as the current user
- WARNING: Anyone with network access can use the terminal
2. Local Bypass Authentication
The--allow-local-bypass flag enables a special authentication mode that allows localhost connections to bypass normal authentication requirements.
Configuration Options
Basic Local Bypass- Allows any connection from localhost (127.0.0.1, ::1) to access without authentication
- No token required
- Localhost connections must provide token via
X-VibeTunnel-Localheader - Adds an additional security layer for local connections
Security Implementation
The local bypass feature implements several security checks to prevent spoofing:-
IP Address Validation (
web/src/server/middleware/auth.ts:24-48)- Verifies connection originates from localhost IPs (127.0.0.1, ::1, ::ffff:127.0.0.1)
- Checks both
req.ipandreq.socket.remoteAddress
-
Header Verification
- Ensures no forwarding headers are present (
X-Forwarded-For,X-Real-IP,X-Forwarded-Host) - Prevents proxy spoofing attacks
- Ensures no forwarding headers are present (
-
Hostname Validation
- Confirms request hostname is localhost, 127.0.0.1, or [::1]
- Additional layer of verification
-
Token Authentication (when configured)
- Requires
X-VibeTunnel-Localheader to match configured token - Provides shared secret authentication for local tools
- Requires
Security Implications
Benefits:- Enables automated tools and scripts on the same machine to access terminals
- Useful for development workflows and CI/CD pipelines
- Allows local monitoring tools without exposing credentials
- Any process on the local machine can access terminals (without token)
- Malicious local software could exploit this access
- Token-based mode mitigates but doesn’t eliminate local access risks
- Development Environments: Safe for local development machines
- CI/CD Servers: Use with token authentication for build scripts
- Production Servers: NOT recommended unless:
- Combined with token authentication
- Server has strict local access controls
- Used only for specific automation needs
Example Use Cases
Local Development ToolsAdditional Security Considerations
Network Binding
- Default: Binds to all interfaces (0.0.0.0)
- Use
--bind 127.0.0.1to restrict to localhost only - Combine with
--allow-local-bypassfor local-only access
SSH Key Authentication
- Enable with
--enable-ssh-keys - Disable passwords with
--disallow-user-password - More secure than password authentication
HTTPS/TLS
- VibeTunnel does not provide built-in TLS
- Use a reverse proxy (nginx, Caddy) for HTTPS
- Or use secure tunnels (Tailscale, ngrok)
Best Practices
- Always use authentication in production
- Restrict network binding when possible
- Use token authentication with local bypass
- Monitor access logs for suspicious activity
- Keep the server updated for security patches