A modern, comprehensive web-based dashboard for monitoring and managing Ubuntu server resources, built with Flask and a modular architecture. This professional-grade dashboard offers real-time system monitoring, advanced user management, service control, integrated terminal access, chat functionality, and comprehensive file management capabilities.
π Completely rewritten with modern Flask architecture, SQLAlchemy database integration, and professional security features!
- Secure Login System: Flask-Login with Werkzeug password hashing
- Role-Based Access Control: Administrator and User roles with different permissions
- User Registration: Admin can create new user accounts
- Profile Management: Users can update their information, email, and profile pictures
- Session Management: Secure session handling with logout functionality
- Live System Metrics: CPU, Memory, Disk usage with color-coded indicators
- Network Information: Public/Private IP addresses, hostname display
- System Uptime: Server uptime tracking and display
- Historical Data: System metrics stored in database for trend analysis
- Auto-Refresh Dashboard: Real-time updates without page reload
- Service Control Panel: Start, stop, restart system services (Admin only)
- Service Status Monitoring: Real-time status of critical services
- Common Services: Pre-configured list of Ubuntu services
- Command Logging: All service actions logged in audit trail
- Secure Command Execution: Execute shell commands via web interface (Admin only)
- Command History: Track all executed commands
- Security Controls: Dangerous command blocking and timeout protection
- Interactive Interface: Terminal-like experience in browser
- Live Chat: Real-time messaging between users
- Message History: Persistent chat storage in database
- User Attribution: Messages linked to user accounts
- Auto-Scroll: Automatic scrolling to latest messages
- File Browser: Navigate SMB shares through web interface
- File Download: Direct download of files from SMB shares
- Directory Navigation: Browse folders and view file information
- File Information: Display file sizes, modification dates
- User Management: Add, edit, delete user accounts (Admin only)
- Audit Logging: Complete audit trail of all system actions
- System Settings: Configure application settings
- Security Monitoring: Track login attempts and user activities
- Flask 2.3.3: Modern Python web framework with blueprint architecture
- SQLAlchemy 3.0.5: Advanced ORM for database management
- Flask-Login 0.6.2: User session management and authentication
- Flask-WTF 1.1.1: Form handling with CSRF protection
- Werkzeug 2.3.7: Password hashing and security utilities
- SQLite: Lightweight, serverless database for production use
- Database Models: User, ChatMessage, AuditLog, SystemMetrics, ServiceStatus
- Password Hashing: Werkzeug secure password storage
- CSRF Protection: Flask-WTF token-based protection
- Session Management: Secure user sessions with Flask-Login
- Audit Logging: Complete action tracking and logging
- Input Validation: WTForms validation and sanitization
- psutil 5.9.5: Advanced system monitoring and resource statistics
- subprocess: Secure command execution with timeout protection
- socket & requests: Network information and HTTP requests
- HTML5/CSS3: Modern responsive web design
- JavaScript: Interactive dashboard features and real-time updates
- Font Awesome: Professional icon library
- Ubuntu Color Scheme: Authentic Ubuntu-themed interface
- Python 3.8+: Modern Python version required
- pip: Python package manager
- Git: Version control system
- Ubuntu/Linux: Optimized for Ubuntu server environments
-
Clone the Repository:
git clone https://github.com/ZentoxDeveloper/ubuntu-linux-dashboard.git cd ubuntu-server-dashboard -
Install Dependencies:
pip install -r requirements.txt
-
Run the Application:
python run.py
-
Access the Dashboard:
- Local:
http://localhost:5000 - Remote:
http://<server-ip>:5000
- Local:
-
Default Admin Account:
- Username:
admin - Password:
admin123 β οΈ Change this password immediately after first login!
- Username:
-
Database Initialization:
- SQLite database is created automatically on first run
- Default admin user is created if no users exist
Create a .env file in the project root:
FLASK_ENV=production
FLASK_HOST=0.0.0.0
FLASK_PORT=5000
FLASK_DEBUG=False
SECRET_KEY=your-secret-key-here
DATABASE_URL=sqlite:///app.db
BASE_SMB_PATH=/path/to/smb/sharesFor service management functionality, configure sudo permissions:
# Add to /etc/sudoers.d/dashboard
www-data ALL=(ALL) NOPASSWD: /bin/systemctl start *, /bin/systemctl stop *, /bin/systemctl restart *, /bin/systemctl status *# Install production WSGI server
pip install gunicorn
# Run with Gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 "app:create_app()"- Secure Password Storage: Werkzeug PBKDF2 password hashing with salt
- Session Management: Flask-Login secure session handling
- Role-Based Access: Admin and User roles with permission enforcement
- Login Protection: Session timeout and secure logout functionality
- CSRF Protection: Flask-WTF CSRF tokens on all forms
- Input Sanitization: WTForms validation and sanitization
- Command Injection Prevention: Whitelist-based command filtering
- SQL Injection Protection: SQLAlchemy ORM parameter binding
- Complete Audit Trail: All user actions logged with timestamps
- IP Address Tracking: Login and action tracking by IP
- User Agent Logging: Device and browser information capture
- Failed Login Monitoring: Track and log authentication failures
- Secret Key Management: Environment variable configuration
- Debug Mode Control: Production-safe debug settings
- Timeout Protection: Command execution and request timeouts
- Error Handling: Secure error messages without information disclosure
π app/
βββ π admin/ # Administrative functionality
β βββ __init__.py # Blueprint initialization
β βββ routes.py # User management, audit logs
βββ π auth/ # Authentication system
β βββ __init__.py # Blueprint initialization
β βββ routes.py # Login, logout, registration
βββ π main/ # Core dashboard features
β βββ __init__.py # Blueprint initialization
β βββ routes.py # Dashboard, chat, terminal, services
βββ π api/ # REST API endpoints
β βββ __init__.py # Blueprint initialization
β βββ routes.py # JSON API for real-time data
βββ π utils/ # Utility modules
β βββ __init__.py # Package initialization
β βββ system_info.py # System monitoring functions
β βββ file_manager.py # SMB file management
βββ π templates/ # Jinja2 HTML templates
β βββ base.html # Main layout template
β βββ π auth/ # Authentication templates
β βββ π main/ # Dashboard templates
β βββ π admin/ # Administrative templates
βββ __init__.py # Application factory
βββ models.py # SQLAlchemy database models
βββ forms.py # WTForms form definitions
π Root Files:
βββ run.py # Application entry point
βββ config.py # Configuration settings
βββ requirements.txt # Python dependencies
βββ app.db # SQLite database (created on first run)
- Users: Authentication and profile information
- ChatMessages: Team communication history
- AuditLog: Complete action tracking
- SystemMetrics: Historical performance data
- ServiceStatus: Service monitoring data
We welcome contributions to improve the Ubuntu Server Dashboard! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test thoroughly
- Commit with clear messages:
git commit -m "Add feature description" - Push to your fork:
git push origin feature-name - Create a Pull Request
- Follow Python PEP 8 style guidelines
- Add tests for new features
- Update documentation for any changes
- Ensure security best practices
- Test on Ubuntu/Linux environments
This project is licensed under the MIT License. See the LICENSE file for full details.
Free to use, modify, and distribute for personal and commercial projects.
- GitHub Issues: Report bugs or request features
- Discussions: Community support and questions
- Security Issues: Please report security vulnerabilities privately
β Complete Architecture Rewrite: Modern Flask blueprint structure β Database Integration: SQLAlchemy ORM with persistent storage β Enhanced Security: CSRF protection, password hashing, audit logging β Advanced UI: Professional Ubuntu-themed responsive interface β Real-time Features: Live chat, auto-refreshing metrics β Production Ready: Gunicorn support, environment configuration
β System Monitoring: Enhanced with historical data storage β Service Management: Improved with better error handling β File Management: Enhanced SMB integration β User Management: Complete admin interface overhaul
π Thank you for using Ubuntu Server Dashboard! Star β this repository if you find it useful!