Terminal Access
The Terminal Access section of the dxflow interface provides a powerful web-based terminal that connects you directly to containerized environments. This feature enables command-line interaction with your workflows, applications, and the underlying system infrastructure.
Overview
The Terminal interface offers comprehensive command-line access:
- Web-based Terminal: Full-featured terminal accessible through your browser
- Container Shell Access: Connect to running containers and applications
- Multi-session Support: Multiple concurrent terminal sessions
- Secure Connection: Encrypted connections with proper authentication
- Session Management: Persistent sessions with reconnection capabilities
Key Features
1. Web Terminal Interface
The web-based terminal provides a native command-line experience:
Terminal Emulation
- Full VT100/xterm Compatibility: Support for all standard terminal features
- Unicode Support: Full UTF-8 character set support
- Resize Handling: Automatic terminal resizing based on browser window
- Copy/Paste: Standard keyboard shortcuts and context menu support
- WebSocket Communication: Real-time bidirectional terminal communication
2. Shell Management
Shell Session Management
Shell Session Creation via Web Interface
Through the web interface, you can:
- Create New Shell: Click "New Terminal" to spawn a new shell session
- Choose Shell Type: Select bash, zsh, sh, or custom shell paths
- Set Working Directory: Start the shell in a specific directory
- Configure Environment: Set environment variables for the session
Shell Session Management
Each shell session has:
- Unique Identity: Auto-generated or custom session identifier
- WebSocket Connection: Real-time bidirectional communication
- Session State: Tracks running processes and command history
- Resource Monitoring: CPU and memory usage tracking
Advanced Shell Configuration
- Environment Variables: Set custom environment variables per shell
- Working Directory: Start shells in specific directories
- User Context: Run shells as different users (with proper permissions)
- Resource Limits: Configure CPU and memory limits for shell processes
3. Terminal Operations
Interactive Shell Usage
Command Execution
- Real-time Commands: Execute any shell command directly in the web terminal
- Process Management: Run background processes, use job control (Ctrl+Z, fg, bg)
- File Operations: Create, edit, move, and delete files using standard Unix commands
- Directory Navigation: Navigate the filesystem using cd, ls, pwd, and other commands
Terminal Features
- Command History: Access previous commands using arrow keys or history command
- Tab Completion: Auto-complete filenames and commands
- Signal Handling: Send signals to processes (Ctrl+C, Ctrl+Z, Ctrl+D)
- Screen Management: Clear screen, scroll through output, resize terminal
4. Container Shell Access
Containerized Environment Access
Direct Container Connection
- Running Containers: Access shell sessions inside active application containers
- Service Containers: Connect to database, cache, and other service containers
- Development Environments: Access development tools and environments within containers
Container Terminal Features
- Container Filesystem: Full access to container's file system and directories
- Container Processes: View and manage processes running inside containers
- Environment Isolation: Each container provides isolated shell environment
- Network Access: Access container's network interfaces and services
5. Session Management
Multi-Session Support
Session Control
- Multiple Terminals: Open and manage multiple terminal sessions simultaneously
- Session Persistence: Sessions remain active even when browser tab is closed
- Auto-reconnection: Automatic reconnection to existing sessions on page reload
- Session Sharing: Share terminal sessions with team members for collaboration
Session Monitoring
- Active Sessions: View list of all active terminal sessions
- Resource Usage: Monitor CPU and memory usage per session
- Connection Status: Real-time connection status and health monitoring
- Session History: Track command history and session activity
6. API Integration
WebSocket Connection
The terminal uses WebSocket connections for real-time communication:
Connection Endpoints
GET /api/shell/:identity/ # WebSocket connection to specific shell session
Session Management API
GET /api/shell/ # List all active shell sessions
POST /api/shell/ # Create new shell session
PUT /api/shell/resize/ # Resize terminal dimensions
PUT /api/shell/execute/ # Execute commands programmatically
PUT /api/shell/kill/ # Kill processes in shell
DELETE /api/shell/ # Remove shell session
Getting Started
1. Access Terminal
After logging in, navigate to the "Terminal Access" section from the main menu.
2. Create Your First Shell
- Click "New Terminal" to create a new shell session
- Choose environment:
- System shell (direct access to host system)
- Container shell (access to running container)
- Custom environment (specific working directory or user)
- Configure session (optional):
- Set working directory
- Configure environment variables
- Choose shell type (bash, zsh, sh)
3. Basic Terminal Usage
Once connected to a shell session:
Essential Commands
pwd
- Show current directoryls -la
- List files and directoriescd /path
- Change directorycat filename
- View file contentsnano filename
- Edit filesps aux
- View running processestop
- Real-time process monitor
File Management
- Create files:
touch filename
orecho "content" > filename
- Create directories:
mkdir directory_name
- Copy files:
cp source destination
- Move files:
mv source destination
- Delete files:
rm filename
Best Practices
Security
- Use appropriate user permissions for different tasks
- Avoid running unnecessary services as root user
- Regular cleanup of temporary files and processes
- Monitor resource usage to prevent system overload
Session Management
- Use descriptive names for long-running sessions
- Clean up unused sessions to free resources
- Use screen or tmux for persistent background processes
- Document important session configurations and setups
Performance
- Limit the number of concurrent sessions
- Monitor system resources during intensive operations
- Use efficient commands and avoid resource-heavy processes
- Close unused terminal sessions promptly
Workflow Integration
- Use terminal for debugging application issues
- Access container environments for troubleshooting
- Combine terminal access with file management for efficient workflows
- Leverage shell scripting for automation tasks
The Terminal Access interface provides direct shell access to your dxflow environment, enabling powerful command-line operations, debugging capabilities, and system administration tasks through an intuitive web-based terminal.
Files & Data
The dxflow files and data management features allow you to efficiently handle input and output data within your workflows. This guide will help you understand how to manage files and data in dxflow.
CLI Reference
Complete command-line interface reference for the dxflow engine with detailed usage examples and options