From 4a999ab6d28e77d4cea36b76cbf0854912c04d17 Mon Sep 17 00:00:00 2001 From: master3395 Date: Fri, 6 Mar 2026 20:07:44 +0100 Subject: [PATCH] Remove to-do folder, docs/WINDOWS_INSTALLATION_GUIDE.md, docs/release_v2.5.5-dev.md --- docs/WINDOWS_INSTALLATION_GUIDE.md | 329 -------------------------- docs/release_v2.5.5-dev.md | 41 ---- to-do/MARIADB-ROLLBACK-FROM-BACKUP.md | 33 --- 3 files changed, 403 deletions(-) delete mode 100644 docs/WINDOWS_INSTALLATION_GUIDE.md delete mode 100644 docs/release_v2.5.5-dev.md delete mode 100644 to-do/MARIADB-ROLLBACK-FROM-BACKUP.md diff --git a/docs/WINDOWS_INSTALLATION_GUIDE.md b/docs/WINDOWS_INSTALLATION_GUIDE.md deleted file mode 100644 index b29d6f812..000000000 --- a/docs/WINDOWS_INSTALLATION_GUIDE.md +++ /dev/null @@ -1,329 +0,0 @@ -# CyberPanel Windows Development Guide - -## 🎯 Overview - -**⚠️ IMPORTANT**: CyberPanel is designed specifically for Linux systems and does not officially support Windows. This guide is for **development and testing purposes only**. - -This guide provides instructions for running CyberPanel in a Windows development environment using Python and Django. This setup is intended for: -- **Developers** working on CyberPanel features -- **Testing** CyberPanel functionality -- **Learning** CyberPanel architecture -- **Development** of CyberPanel extensions - -**For production use, always use a supported Linux distribution.** - -## πŸ“‹ Prerequisites - -### System Requirements -- **OS**: Windows 7/8.1/10/11 (64-bit recommended) -- **RAM**: Minimum 4GB (8GB+ recommended) -- **Storage**: Minimum 20GB free space -- **CPU**: 2+ cores recommended -- **Network**: Internet connection required - -### Required Software -- **Python 3.8+**: Download from [python.org](https://python.org) -- **Git**: Download from [git-scm.com](https://git-scm.com) -- **Administrator Access**: Required for installation - -### ⚠️ Limitations -- **No Web Server**: OpenLiteSpeed/LiteSpeed not available on Windows -- **No System Services**: MariaDB, PowerDNS, etc. not included -- **Limited Functionality**: Many CyberPanel features require Linux -- **Development Only**: Not suitable for production use - -## πŸš€ Installation Methods - -### Method 1: Automated Installation (Recommended) - -#### Step 1: Download Installation Script -1. Navigate to the `utils/windows/` folder -2. Download `cyberpanel_install.bat` -3. Right-click and select "Run as administrator" - -#### Step 2: Follow Installation Prompts -The script will automatically: -- Check system requirements -- Create Python virtual environment -- Download CyberPanel source code -- Install all dependencies -- Set up the web interface - -#### Step 3: Access CyberPanel -1. Open your web browser -2. Navigate to: `http://localhost:8090` -3. Use default credentials: - - **Username**: `admin` - - **Password**: `123456` - -### Method 2: Manual Installation - -#### Step 1: Install Python -1. Download Python 3.8+ from [python.org](https://python.org) -2. **Important**: Check "Add Python to PATH" during installation -3. Verify installation: - ```cmd - python --version - pip --version - ``` - -#### Step 2: Install Git -1. Download Git from [git-scm.com](https://git-scm.com) -2. Install with default settings -3. Verify installation: - ```cmd - git --version - ``` - -#### Step 3: Create CyberPanel Directory -```cmd -mkdir C:\usr\local\CyberCP -cd C:\usr\local\CyberCP -``` - -#### Step 4: Set Up Python Environment -```cmd -python -m venv . --system-site-packages -Scripts\activate.bat -``` - -#### Step 5: Download CyberPanel -```cmd -git clone https://github.com/usmannasir/cyberpanel.git -cd cyberpanel -``` - -#### Step 6: Install Dependencies -```cmd -pip install --upgrade pip setuptools wheel -pip install -r requirments.txt -``` - -#### Step 7: Set Up Django -```cmd -python manage.py collectstatic --noinput -python manage.py migrate -``` - -#### Step 8: Create Admin User -```cmd -python manage.py createsuperuser -``` - -#### Step 9: Start CyberPanel -```cmd -python manage.py runserver 0.0.0.0:8090 -``` - -## πŸ”§ Post-Installation Configuration - -### Change Default Password -1. Access CyberPanel at `http://localhost:8090` -2. Log in with default credentials -3. Go to **User Management** β†’ **Modify User** -4. Change the admin password immediately - -### Configure Windows Firewall -1. Open Windows Defender Firewall -2. Add inbound rule for port 8090 -3. Allow Python through firewall - -### Set Up Windows Service (Optional) -1. Run `install_service.bat` as administrator -2. CyberPanel will start automatically on boot -3. Manage service through Windows Services - -## πŸ”„ Upgrading CyberPanel - -### Using Upgrade Script -1. Download `cyberpanel_upgrade.bat` -2. Right-click and select "Run as administrator" -3. Script will automatically backup and upgrade - -### Manual Upgrade -```cmd -cd C:\usr\local\CyberCP\cyberpanel -Scripts\activate.bat -git pull origin stable -pip install --upgrade -r requirments.txt -python manage.py migrate -python manage.py collectstatic --noinput -``` - -## πŸ› οΈ Utility Scripts - -### Available Scripts -- **`cyberpanel_install.bat`**: Complete installation -- **`cyberpanel_upgrade.bat`**: Upgrade existing installation -- **`install_webauthn.bat`**: Enable WebAuthn/Passkey authentication - -### Script Usage -1. **Right-click** on any script -2. Select **"Run as administrator"** -3. Follow on-screen prompts -4. Check output for any errors - -## πŸ› Troubleshooting - -### Common Issues - -#### "Python not found" Error -**Problem**: Python is not installed or not in PATH -**Solution**: -1. Install Python from [python.org](https://python.org) -2. Check "Add Python to PATH" during installation -3. Restart Command Prompt -4. Verify with `python --version` - -#### "Access Denied" Error -**Problem**: Insufficient privileges -**Solution**: -1. Right-click script and select "Run as administrator" -2. Or open Command Prompt as administrator -3. Navigate to script location and run - -#### "Failed to install requirements" Error -**Problem**: Network or dependency issues -**Solution**: -1. Check internet connection -2. Try running script again -3. Install requirements manually: - ```cmd - pip install --upgrade pip - pip install -r requirments.txt - ``` - -#### "Port 8090 already in use" Error -**Problem**: Another service is using port 8090 -**Solution**: -1. Stop other services using port 8090 -2. Or change CyberPanel port in settings -3. Check with: `netstat -an | findstr :8090` - -#### "Django not found" Error -**Problem**: Virtual environment not activated -**Solution**: -1. Navigate to CyberPanel directory -2. Activate virtual environment: - ```cmd - Scripts\activate.bat - ``` -3. Verify with `python -c "import django"` - -### Advanced Troubleshooting - -#### Check Installation Logs -```cmd -cd C:\usr\local\CyberCP\cyberpanel -python manage.py check -``` - -#### Verify Dependencies -```cmd -pip list -pip check -``` - -#### Test Database Connection -```cmd -python manage.py dbshell -``` - -#### Reset Database (Last Resort) -```cmd -python manage.py flush -python manage.py migrate -python manage.py createsuperuser -``` - -## πŸ”’ Security Considerations - -### Initial Security Setup -1. **Change Default Password**: Immediately after installation -2. **Enable 2FA**: Use the 2FA guide for additional security -3. **Configure Firewall**: Restrict access to necessary ports only -4. **Regular Updates**: Keep CyberPanel and dependencies updated - -### Windows-Specific Security -1. **User Account Control**: Keep UAC enabled -2. **Windows Defender**: Ensure real-time protection is on -3. **Regular Backups**: Backup CyberPanel data regularly -4. **Service Account**: Consider using dedicated service account - -## πŸ“Š Performance Optimization - -### System Optimization -1. **Disable Unnecessary Services**: Free up system resources -2. **SSD Storage**: Use SSD for better performance -3. **Memory**: Ensure adequate RAM (8GB+ recommended) -4. **CPU**: Multi-core processor recommended - -### CyberPanel Optimization -1. **Static Files**: Ensure static files are properly collected -2. **Database**: Regular database maintenance -3. **Logs**: Regular log cleanup -4. **Caching**: Enable appropriate caching - -## πŸ”„ Maintenance - -### Regular Maintenance Tasks -1. **Updates**: Regular CyberPanel updates -2. **Backups**: Regular data backups -3. **Logs**: Monitor and clean logs -4. **Security**: Regular security checks - -### Backup Procedures -1. **Database Backup**: - ```cmd - python manage.py dumpdata > backup.json - ``` - -2. **File Backup**: - ```cmd - xcopy C:\usr\local\CyberCP backup_folder /E /I /H - ``` - -3. **Restore from Backup**: - ```cmd - python manage.py loaddata backup.json - ``` - -## πŸ“š Additional Resources - -### Documentation -- **Main Guide**: [2FA Authentication Guide](2FA_AUTHENTICATION_GUIDE.md) -- **Troubleshooting**: [Troubleshooting Guide](TROUBLESHOOTING.md) -- **Utility Scripts**: [Utility Scripts](../utils/README.md) - -### Support -- **CyberPanel Forums**: https://community.cyberpanel.net -- **GitHub Issues**: https://github.com/usmannasir/cyberpanel/issues -- **Discord Server**: https://discord.gg/cyberpanel - -## βœ… Verification Checklist - -After installation, verify these components: -- [ ] CyberPanel accessible at `http://localhost:8090` -- [ ] Admin password changed from default -- [ ] Windows Firewall configured -- [ ] Python virtual environment working -- [ ] All dependencies installed -- [ ] Database migrations applied -- [ ] Static files collected -- [ ] Logs are clean -- [ ] Service starts automatically (if configured) - -## πŸ†˜ Getting Help - -If you encounter issues: -1. **Check the logs** for error messages -2. **Run the troubleshooting commands** above -3. **Search the documentation** for solutions -4. **Ask in the community forum** for help -5. **Create a GitHub issue** with detailed information - ---- - -**Note**: This guide is specifically for Windows installations. For Linux installations, refer to the main CyberPanel documentation. - -*Last updated: January 2025* diff --git a/docs/release_v2.5.5-dev.md b/docs/release_v2.5.5-dev.md deleted file mode 100644 index 88aeb318c..000000000 --- a/docs/release_v2.5.5-dev.md +++ /dev/null @@ -1,41 +0,0 @@ -# Release notes – v2.5.5-dev - -## Issue SSL and SSL form (install / upgrade / downgrade) - -### Changes included - -1. **Issue SSL** - - **Main domain:** CONFIGURATIONS section has an **Issue SSL** tile next to **Add SSL**. Clicking it obtains or restores Let's Encrypt SSL for the main site (calls `POST /manageSSL/issueSSL` with `virtualHost`; path is resolved from DB). - - **Child domains:** On each child domain page (e.g. **launchChild**), CONFIGURATIONS has **Add SSL** and **Issue SSL**. Issue SSL uses `issueSSL(childDomainName, childPath)` and the same backend endpoint. - - **Backend:** `manageSSL/views.py` `issueSSL()` supports both main and child: it looks up `ChildDomains` first, then `Websites`, and uses the appropriate path and admin email. - -2. **SSL form close (X) button** - - **Main domain** (`websiteFunctions/templates/websiteFunctions/website.html`): SSL form close button is centered in the row, uses `ssl-form-close-btn` and Font Awesome `fa-times`, with CSS for centered icon. - - **Child domain** (`websiteFunctions/templates/websiteFunctions/launchChild.html`): Same centered close button for the Add SSL form. - -3. **Files touched** - - `websiteFunctions/templates/websiteFunctions/website.html` – Issue SSL tile, SSL form close button + `.ssl-form-close-btn` CSS. - - `websiteFunctions/templates/websiteFunctions/launchChild.html` – Issue SSL tile, SSL form close button. - - `manageSSL/views.py` – `issueSSL` (unchanged logic; already supports main and child). - - `websiteFunctions/static/websiteFunctions/websiteFunctions.js` – multiple controllers already define `issueSSL(virtualHost)` or `issueSSL(childDomain, path)` posting to `/manageSSL/issueSSL`. - -### Install - -- New installs clone the repo (e.g. `master3395/cyberpanel`) and checkout the chosen branch (e.g. `v2.5.5-dev`). All of the above files are in the repo, so **Issue SSL** and the SSL form close button are present after install. - -### Upgrade - -- Upgrade removes `/usr/local/CyberCP`, clones the repo, and checks out the target branch. Only a small set of critical files are restored from backup (e.g. `settings.py`, `.git/config`, custom dirs, Imunify); **website templates and static JS are not in the backup list**, so the new clone’s `website.html`, `launchChild.html`, and `websiteFunctions.js` are kept. After upgrade, **Issue SSL** and the updated SSL form are active. - -### Downgrade - -- Downgrade is the same flow with a different branch. If you switch to an older branch that does not include the Issue SSL tile or the new close button, the UI will reflect that branch. The backend endpoint `/manageSSL/issueSSL` exists in upstream CyberPanel, so older branches that still have the route will continue to work; no extra compatibility logic is required for downgrade. - -### Version - -- `version.txt`: `{"version":"2.5.5","build":"dev"}` (or as set in repo). -- `plogical/upgrade.py`: `VERSION = '2.5.5'`, `BUILD = 5` (or as configured); used for DB version and packaging. - ---- - -**Summary:** Issue SSL and the SSL form close button are in the v2.5.5-dev codebase and work with install, upgrade, and downgrade. Push this repo to GitHub and use branch `v2.5.5-dev` (or your chosen tag) for deployments. diff --git a/to-do/MARIADB-ROLLBACK-FROM-BACKUP.md b/to-do/MARIADB-ROLLBACK-FROM-BACKUP.md deleted file mode 100644 index 08d5fe850..000000000 --- a/to-do/MARIADB-ROLLBACK-FROM-BACKUP.md +++ /dev/null @@ -1,33 +0,0 @@ -# MariaDB rollback using upgrade backups - -When you run a CyberPanel upgrade with MariaDB version change, an optional full backup of all databases can be created in two places: - -1. **Legacy path:** `/root/cyberpanel_mariadb_backups/mariadb_backup_before_upgrade_YYYYMMDD_HHMMSS.sql.gz` -2. **Standard path:** `/root/db-upgrade-backups/YYYY-MM-DD_HHMMSS/all_databases.sql.gz` - -To roll back to the previous MariaDB state (e.g. after a failed or undesired upgrade): - -1. Stop MariaDB: `systemctl stop mariadb` (or `mysql`/`mysqld` on your system). -2. Restore the dump (example for the standard path): - ```bash - BACKUP_DIR="/root/db-upgrade-backups/2026-02-17_010304" # use your actual folder - gunzip -c "$BACKUP_DIR/all_databases.sql.gz" | mariadb --skip-ssl -u root -p - ``` - Or if the backup is in the legacy location: - ```bash - gunzip -c /root/cyberpanel_mariadb_backups/mariadb_backup_before_upgrade_*.sql.gz | mariadb --skip-ssl -u root -p - ``` - You will be prompted for the MariaDB root password (stored in `/etc/cyberpanel/mysqlPassword`). -3. If you need to reinstall the previous MariaDB server version, use the official MariaDB repo for that version, then start the service and run `mariadb-upgrade --force` if required. - -**Note:** Restoring over an existing data directory is destructive. Only use this when you intend to replace the current databases with the backup. For a safe test, back up the current `/var/lib/mysql` first. - -## Optional standalone version managers - -For advanced MariaDB/phpMyAdmin version changes without running the full upgrade, you can use the community scripts from [cyberpanel-mods](https://github.com/master3395/cyberpanel-mods) (version-managers): - -- [mariadb_version_manager_enhanced.sh](https://github.com/master3395/cyberpanel-mods/blob/main/version-managers/mariadb_version_manager_enhanced.sh) – interactive MariaDB version manager (backup, remove, add repo, install, secure). -- [mariadb_v_changer.sh](https://github.com/master3395/cyberpanel-mods/blob/main/version-managers/mariadb_v_changer.sh) – simple prompt-based MariaDB version changer. -- [phpmyadmin_v_changer.sh](https://github.com/master3395/cyberpanel-mods/blob/main/version-managers/phpmyadmin_v_changer.sh) – phpMyAdmin version changer (preserves config/signon). - -CyberPanel install/upgrade now integrates equivalent behaviour (version choice, backup path, config preservation) so these scripts are optional for users who prefer a standalone workflow.