Pterodactyl Resources
Pterodactyl Resources
To join our community, please login or register!
Internet Explorer
Internet Explorer is not supported. Please upgrade to a more modern browser.
Pterodactyl Nginx egg (Wordpress, Git & Cloudflare Tunnel)

Pterodactyl Nginx egg (Wordpress, Git & Cloudflare Tunnel)

Pterodactyl Nginx egg
πŸ› Bug Fixes & Improvements

βœ… Fixes the problem that no web error occurs when the port is subsequently changed.
8 hours ago • 3 downloads
# πŸ“œ Changelog (Version 2.0 – 2025-05-01)

## ✨ New Features

### πŸŽ‰ Full Modular Orchestrator
- **Auto-discover modules** in `modules/*` and run them in a defined order
- **Dynamic enable flags**: each module uses `_STATUS` (`true`/`1` = on)
- **Execution order**:
1. **LogCleaner** (clears temp and log files)
2. All other enabled modules (Git, Composer, Cloudflare Tunnel, PHP-NGINX, etc.)
3. **NGINX** last in the foreground (blocks to keep container alive)

### 🧹 LogCleaner Module
- Controlled by `LOGCLEANER_STATUS` toggle
- Deletes temporary files, oversized logs (`> MAX_SIZE_MB`), and old logs (`> MAX_AGE_DAYS`)
- **Dry-run** support (`DRY_RUN`) to preview deletions
- Live output of each deleted file for full transparency

### 🌲 Git Module
- Controlled by `GIT_STATUS` toggle
- Guard-clause pattern: early exit if disabled, Git missing, or not a repository
- Auto-pulls latest changes in `/home/container/www`

### πŸ“¦ Composer Module
- Controlled by `COMPOSER_STATUS`; installs packages from `COMPOSER_MODULES`
- Creates and exports a writable `COMPOSER_CACHE_DIR` to eliminate cache warnings
- Honors `COMPOSER_WWW_DIR` for custom webroot

### 🌐 Cloudflare Tunnel Module
- Controlled by `CLOUDFLARED_STATUS`; token read from `CLOUDFLARED_TOKEN`
- Writes logs to `CLOUDFLARED_LOG_FILE` and PID to `CLOUDFLARED_PID_FILE`
- Monitors startup with configurable `CLOUDFLARED_STATUS_TIMES` and timeout (`CLOUDFLARED_MAX_ATTEMPTS`)

### 🐘 PHP-NGINX Startup
- Auto-detects installed PHP version via CLI if `PHP_VERSION` unset
- Falls back between `php-fpm` and generic `php-fpm` binary
- Clear error on version mismatch between Docker image and `PHP_VERSION`

---

## πŸ› Bug Fixes & Improvements

### πŸ”§ Script Hygiene
- Strips Windows CRLFs from all scripts at startup
- Unified `set -euo pipefail` and `trap` for consistent error reporting
- Centralized color definitions and header formatting

### πŸ“– Documentation
- Updated each module’s README with new env vars and usage examples
- Added Egg JSON snippets for all toggles (`*_STATUS`, etc.)

### ⚑ Performance & Reliability
- Fixed Composer cache directory to eliminate β€œcannot create cache” warnings
- Replaced fragile `bash -c` calls with native shell functions (`delete_file`, `enabled()`)
- Eliminated stray β€œcommand not found” and misformatted output

---

## 🚨 Upgrade Notice
**This is a major, non-backwards-compatible update.**
Due to extensive script and configuration changes, **you must recreate or rebuild your webserver/container** when upgrading to v2.0. Existing instances will not automatically adapt to the new module structure, env var names, and startup sequence.

---

## πŸš€ Deprecated & Removed
- **PHP 8.0** support marked as EOL (no longer recommended)
- Legacy Cloudflared file-based token handling removed in favor of `CLOUDFLARED_TOKEN` env var

---

## What's Changed
* Feat/composer by @Ym0T in https://github.com/Ym0T/pterodactyl-nginx-egg/pull/29
* Matched the egg's variable casing of the environment variable name by @mattmentrup in https://github.com/Ym0T/pterodactyl-nginx-egg/pull/33

## New Contributors
* @mattmentrup made their first contribution in https://github.com/Ym0T/pterodactyl-nginx-egg/pull/33

**Full Changelog**: https://github.com/Ym0T/pterodactyl-nginx-egg/compare/v1.5.1...v2.0

## What's Changed
* Complete Modularization & Startup Process Optimization by @Ym0T in https://github.com/Ym0T/pterodactyl-nginx-egg/pull/34


**Full Changelog**: https://github.com/Ym0T/pterodactyl-nginx-egg/compare/v1.5.2...v2.0
3 days ago • 4 downloads
✨ New Features
πŸš€ Automatic Log Cleanup Before Cloudflared Startup

Logs are now automatically deleted if they exceed 10MB or are older than 30 days:
/home/container/logs/naccess.log
/home/container/logs/nerror.log
/home/container/logs/error.log
/home/container/logs/php_errors.log
/home/container/logs/php-fpm.log
πŸ“Œ Prevents excessive log accumulation and improves disk space management.

🎨 Improved Status Messages & Formatting

Color-coded console output for better readability:
πŸ”΅ Blue β†’ Headers & sections
🟣 Purple β†’ Cleanup processes
🟑 Yellow β†’ Status messages (e.g., "Waiting for Cloudflared to start...")
🟒 Green β†’ Success messages
πŸ”΄ Red β†’ Errors or missing files
πŸ“’ More structured output with section dividers (────────────────────────).

πŸ›  Optimized Cloudflared Startup

Cloudflared startup process improved:
Better error handling:
If Cloudflared fails, the error is displayed immediately.
Last 10 log lines are shown for troubleshooting.
Safer PID file storage.

πŸ› Bug Fixes & Improvements

βœ… Improved Error Handling:
Cloudflared token validation: If missing or empty, a clear error is shown.
Log existence checks: No errors if logs don’t exist.
πŸ— Code Refactoring:
Better script structure with logical sections.
Standardized use of echo -e for consistent formatting.
3 months ago • 70 downloads
### ✨ Added
- πŸš€ Integration of **Cloudflared** for secure tunneling. (#22 | @zarti0)

### πŸ›  Fixed
- πŸ› Minor bug fixes to improve stability and performance.

### πŸ”„ Changed
- πŸ“ Revised text for better clarity.
3 months ago • 17 downloads
New
[βœ”οΈ] PHP8.4 support added
3 months ago • 0 downloads
[βœ”οΈ] Fixes the problem that when not using Git or wordpress no php info file is created during the initial installation.
7 months ago • 90 downloads
Fixed
[βœ”οΈ] Fix the error that the web server is permanently marked as starting
[βœ”οΈ] Fix the bug that the use of git login data led to an incorrect download url for the git repo
7 months ago • 3 downloads

1.4

Added
[+] Simplified version changer added
[+] Added support for git (www folder)
[+] Added support for ARM64 (thanks to @GergoEB)
[+] Comments have been added to some files for a better overview
[+] Added "install-script.sh" for a better overview of the installation script

Other
[O] PHP version 7.3 removed
7 months ago • 0 downloads
Fixed
[βœ”οΈ] Incorrectly defined variable in egg-nginx.json (led to problems when assigning ram for php)

Other
[O] License updated
about 1 year ago • 403 downloads
Added
[+] More PHP extensions
[+] Access and error log now optionally displayable in the console

Fixed
[βœ”οΈ] Missing PHP extensions between PHP versions
[βœ”οΈ] Access and error log cannot be displayed in the console

Other
[O] Small improvements
about 1 year ago • 9 downloads
Added PHP8.3 support
about 1 year ago • 29 downloads
Updatet Egg.nginx.json
about 1 year ago • 2 downloads
about 1 year ago • 0 downloads