smtozkn06/WHM-Management-Tool
A modern and user-friendly WHM management tool for server administrators. Create and manage MySQL databases and subdomains in bulk through WHM server management interface, and export your data in various formats.
๐ WHM Management Tool
A modern and user-friendly WHM management tool for server administrators. Create and manage MySQL databases and subdomains in bulk through WHM server management interface, and export your data in various formats.
โจ Features
๐ WHM Server Management
- WHM Connection: Server-level management (port 2087) - Full server access required
- Manage all cPanel accounts from a central interface
- Secure connection settings with automatic saving
- Root-level access for comprehensive server management
๐๏ธ MySQL Database Management
- Bulk MySQL database creation across all accounts
- Automatic sequential naming (demo1, demo2, demo3...)
- Database users and authorization management
- Bulk deletion of selected databases
- Full database privilege management
๐ Subdomain Management
- Bulk subdomain creation for any cPanel account
- Automatic sequential naming (demo1.domain.com, demo2.domain.com...)
- Physical directory management and cleanup
- Bulk deletion of selected subdomains
- Comprehensive subdomain lifecycle management
๐ Export System
- TXT Export:
database:username:password:subdomainformat - CSV Export: Excel-compatible CSV file
- XLSX Export: Full Excel table format
- Real-time preview of created resources
- Export only newly created data for easy tracking
๐จ Modern Interface
- Dark theme CustomTkinter interface
- Real-time status updates and progress tracking
- Multi-account domain selection
- User-friendly error messages and validation
- Compact design optimized for all screen sizes
๐ Requirements
- Python 3.8 or higher
- WHM root access privileges
- Internet connection to WHM server
๐ ๏ธ Installation
Method 1: From Source (Recommended for Development)
- Clone the repository
git clone https://github.com/yourusername/whm-management-tool.git
cd whm-management-tool
- Create virtual environment (recommended)
python -m venv venv
# Windows
venv\Scripts\activate
# Linux/macOS
source venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Run the application
python main_app.py
Method 2: Install as Package
# Install from source
pip install .
# Or install in development mode
pip install -e .
# Run after installation
whm-management-tool
Method 3: Quick Install (Future PyPI Release)
# This will be available when published to PyPI
pip install whm-management-tool
๐ Usage
1. Establishing WHM Connection
- Enter WHM Host (e.g.,
https://your-server.com:2087) - Enter Username (usually
root) - Enter WHM root password
- Click "Connect" button
Settings are automatically saved when connection is successful.
2. Domain Selection
- Domain list loads automatically from all cPanel accounts on the server
- Select the cPanel account/domain you want to work with from the dropdown
- All operations will be performed on the selected account
3. Creating MySQL Databases
- Go to "MySQL Databases" tab
- Enter the number of databases to be created
- Click "Create MySQL" button
- Databases are automatically created as demo1, demo2, demo3...
- Users and privileges are automatically configured
4. Creating Subdomains
- Go to "Subdomains" tab
- Enter the number of subdomains to be created
- Click "Create Subdomain" button
- Subdomains are automatically created as demo1.domain.com, demo2.domain.com...
- Document roots and DNS entries are automatically configured
5. Exporting Data
- Go to "Export Data" tab
- Newly created data appears in preview
- Click your desired format button (TXT/CSV/XLSX)
- Select file location and save
๐ Project Structure
whm-management-tool/
โโโ main_app.py # Main application file
โโโ whm_api.py # WHM API operations
โโโ config.py # Configuration settings
โโโ requirements.txt # Python dependencies
โโโ setup.py # Package setup (legacy)
โโโ pyproject.toml # Modern Python packaging
โโโ README.md # Project documentation
โโโ CHANGELOG.md # Version history
โโโ CONTRIBUTING.md # Contribution guidelines
โโโ LICENSE # MIT license
โโโ .gitignore # Git ignore rules
โโโ .github/ # GitHub configuration
โ โโโ workflows/ # GitHub Actions
โ โ โโโ ci.yml # Continuous integration
โ โโโ ISSUE_TEMPLATE/ # Issue templates
โ โโโ bug_report.md # Bug report template
โ โโโ feature_request.md # Feature request template
โโโ app_settings.json # Application settings (auto-generated)
โ๏ธ Configuration
You can modify basic settings in the config.py file:
APP_CONFIG = {
'title': 'WHM Management Tool',
'width': 1400,
'height': 900
}
# WHM Connection Configuration
CONNECTION_CONFIG = {
'default_type': 'WHM', # Connection type: WHM only
'whm_port': 2087, # WHM default port
'ssl': True, # Use SSL/HTTPS
'timeout': 30 # Connection timeout in seconds
}๐ง WHM Connection
WHM Server Management
-
Port: 2087 (HTTPS)
-
Access Level: Server-wide
-
Capabilities:
- Manage all cPanel accounts
- Create/delete databases and subdomains for any account
- Full server administration
-
Typical User:
rootor reseller with WHM access
๐ง Export Formats
TXT Format
aowsoftware_demo1:aowsoftware_demo1:Abc123!@#:demo1.aowsoftware.com
aowsoftware_demo2:aowsoftware_demo2:Def456$%^:demo2.aowsoftware.com
CSV Format
Database Name,Username,Password,Created Subdomain
aowsoftware_demo1,aowsoftware_demo1,Abc123!@#,demo1.aowsoftware.com
aowsoftware_demo2,aowsoftware_demo2,Def456$%^,demo2.aowsoftware.com
XLSX Format
Excel table with organized columns and automatic width adjustment.
๐ค Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Quick Start for Contributors
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
python -m pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ Issues and Support
If you encounter any issues or need support:
- Check the Issues to see if your problem has been reported
- Create a new issue with detailed information about your problem
- Include your system information and error messages
- Provide steps to reproduce the issue
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Changelog
See CHANGELOG.md for a detailed history of changes.
๐ Links
๐ Star History
Made with โค๏ธ for WHM server administrators