Skip to content

smtozkn06/WHM-Management-Tool

Repository files navigation

πŸš€ 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.

Python License Platform WHM CI GitHub release

✨ 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:subdomain format
  • 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)

  1. Clone the repository
git clone https://github.com/yourusername/whm-management-tool.git
cd whm-management-tool
  1. Create virtual environment (recommended)
python -m venv venv

# Windows
venv\Scripts\activate

# Linux/macOS
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. 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

  1. Enter WHM Host (e.g., https://your-server.com:2087)
  2. Enter Username (usually root)
  3. Enter WHM root password
  4. 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

  1. Go to "MySQL Databases" tab
  2. Enter the number of databases to be created
  3. Click "Create MySQL" button
  4. Databases are automatically created as demo1, demo2, demo3...
  5. Users and privileges are automatically configured

4. Creating Subdomains

  1. Go to "Subdomains" tab
  2. Enter the number of subdomains to be created
  3. Click "Create Subdomain" button
  4. Subdomains are automatically created as demo1.domain.com, demo2.domain.com...
  5. Document roots and DNS entries are automatically configured

5. Exporting Data

  1. Go to "Export Data" tab
  2. Newly created data appears in preview
  3. Click your desired format button (TXT/CSV/XLSX)
  4. 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: root or 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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests (python -m pytest)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

πŸ› Issues and Support

If you encounter any issues or need support:

  1. Check the Issues to see if your problem has been reported
  2. Create a new issue with detailed information about your problem
  3. Include your system information and error messages
  4. 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

Star History Chart


Made with ❀️ for WHM server administrators

About

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.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages