A versatile Pterodactyl Egg featuring Nginx, PHP 8.x, WordPress, Git, GitHub SSH, Composer, Cronjob, ionCube Loader, Auto-Update, Cloudflare Tunnel and Deploy Script support.
- Features
- Installation
- Auto-Update System
- SSL Certificate with Certbot
- Composer Modules Usage
- ionCube Loader Support
- Cloudflared Tunnel Tutorial π
- Git Module
- Cronjob
- Change PHP version
- PHP extensions
- Notes
- License
- π Auto-Update: Automatically checks for and applies updates via Tavuru API
- π§Ή LogCleaner: Cleans
/tmpand old logs (dry-run supported) - π± Git Module: Auto
git pullon restart - π¦ Composer Module: Installs packages from
composer.jsonor a fallback variable - π ionCube Loader: Auto-detected and enabled for encrypted PHP
- π Cloudflare Tunnel: Secure tunnel with token validation
- π PHP-NGINX Startup: Auto-detects PHP-FPM version, runs NGINX in foreground
- π₯οΈ Multi-arch support: AMD64 & ARM64
- π― Selectable PHP Versions:
- β 8.5
- β 8.4
- βοΈ 8.3 (security-only)
- βοΈ 8.2 (security-only)
- β 8.1 (EOL)
- Download the egg file (
egg-nginx-v3.json) - In your Pterodactyl panel, navigate to Nests in the sidebar
- Import the egg under Import Egg
- Create a new server and select the Nginx egg
- Choose the Docker image matching your desired PHP version
- If you enter the image manually, keep the full repository path lowercase, for example
ghcr.io/jishwaah/pterodactyl-nginx-egg:8.4-latest - Fill in all required variables, including whether WordPress is desired and the PHP version field (must be set explicitly)
- After the installation finishes, start the server manually once so Nginx, PHP-FPM, and the optional modules begin running
The egg includes an intelligent auto-update system that keeps your installation current with the latest features and security updates.
- Automatic Version Checking: Uses the Tavuru API to check for new releases
- Smart Differential Updates: Downloads only changed files, not the entire codebase
- Selective Updates: Only updates core system files (modules, nginx, php configs)
- User Data Protection: Never touches your
wwwdirectory or user data - Self-Update Capability: Can safely update its own update mechanism
| Variable | Default | Description |
|---|---|---|
AUTOUPDATE_STATUS |
1 |
Enable (1) or disable (0) auto-update checks |
AUTOUPDATE_FORCE |
1 |
Automatically apply updates (1) or just check (0) |
AUTOUPDATE_STATUS=1,AUTOUPDATE_FORCE=0- Checks for updates and shows availability
- Shows version information and changelog
- Updates must be manually approved
AUTOUPDATE_STATUS=1,AUTOUPDATE_FORCE=1- Automatically downloads and applies updates
- Shows detailed progress during updates
- Creates backups before applying changes
AUTOUPDATE_STATUS=0- Skips all update operations
- Useful for production environments requiring manual updates
[AutoUpdate] Current version: v2.1.0
[AutoUpdate] Latest version: v2.2.0
[AutoUpdate] β Update available: v2.1.0 β v2.2.0
[AutoUpdate] Update summary:
β’ Total changes: 15
β’ Files added: 3
β’ Files modified: 8
β’ Files removed: 2
[AutoUpdate] β Update completed successfully- β Module scripts (modules/)
- β Nginx configurations (nginx/)
- β PHP configurations (php/)
- β Core scripts (start-modules.sh)
- β Documentation (README.md, LICENSE)
- β User content (www/ directory)
- β User data (logs, uploads, databases)
With Certbot DNS-01 Challenge, you can create SSL certificates for your domain without needing port 80 or 443 open!
Let's Encrypt | Getting Started
- A DNS provider account with access to create TXT records
- Your domain name
-
πΉ Step 1: Enable Certbot in Pterodactyl Startup settings
SetCERTBOT_STATUS=true -
πΉ Step 2: Configure your email address
SetCERTBOT_EMAIL=your@email.com -
πΉ Step 3: Set your domain name
SetCERTBOT_DOMAIN=yourdomain.com -
πΉ Step 4: Restart your server and watch console output
Certbot will display a DNS TXT record -
πΉ Step 5: Create the DNS TXT record at your DNS provider
- Name:
_acme-challenge.yourdomain.com - Type:
TXT - Value: Copy from Certbot output
- Wait 2-5 minutes for DNS propagation
- Name:
-
πΉ Step 6: Verify DNS with online tool
Check: https://toolbox.googleapps.com/apps/dig/#TXT/_acme-challenge.yourdomain.com -
πΉ Step 7: Continue in Pterodactyl console
Type SPACE + ENTER twice in the command line -
πΉ Step 8: Copy SSL configuration template
Copy/nginx/conf.d/default-ssl.conf.tempcontent intodefault.conf -
πΉ Step 9: Replace placeholders in default.conf
Replace<port>with your port (e.g.,25783)
Replace<domain>with your domain (e.g.,yourdomain.com) -
πΉ Step 10: Restart Nginx server
-
πΉ Step 11: Create DNS A records at your DNS provider
- Name:
@β Type:Aβ Value: Your server IP - Name:
wwwβ Type:Aβ Value: Your server IP
- Name:
-
πΉ Step 12: Access your site via HTTPS
Visithttps://<domain>:<port>in your browser! π
- Staging certificates are for testing only (not trusted by browsers)
- For production: Set
CERTBOT_STAGING=falseandCERTBOT_FORCE_RENEWAL=true - Certificates expire after 90 days - manual renewal required
- Certificate files location:
/home/container/letsencrypt/config/live/yourdomain.com/
This egg supports easy installation of PHP libraries using Composer.
- If a
composer.jsonfile exists in your server's root directory, it will be used automatically to install dependencies. - If
composer.jsonis missing, the egg looks for a variable (e.g.COMPOSER_MODULES) with a space-separated list of Composer packages to install. - If neither
composer.jsonnorCOMPOSER_MODULESis set, Composer installation is skipped.
- Enter the packages in the
COMPOSER_MODULESvariable in this format:
vendor/package[:version_constraint]Examples:
- Latest stable version:
symfony/http-foundation - Specific version or range:
monolog/monolog:^2.0 doctrine/orm:~2.10 nesbot/carbon:^2.50 - Multiple packages separated by spaces:
symfony/http-foundation:^6.0 monolog/monolog guzzlehttp/guzzle
- Make sure package names and versions exist on Packagist.
- Incorrect inputs can cause installation errors visible in the server console.
- Installing many or complex packages can increase startup time.
- Composer must be pre-installed in the container environment (this egg includes it).
- ionCube Loader is detected and enabled automatically if encrypted PHP files are present.
- No manual configuration needed; simply upload your ionCube-protected scripts and run.
With Cloudflared, you can create a secure tunnel to your server, making it accessible over the internet without complicated port forwarding!
Cloudflared | Create a remotely-managed tunnel
- A Cloudflare account
- πΉ Step 1: Log in to Zero Trust β and go to Networks > Tunnel
- πΉ Step 2: Select Create a tunnel.
- πΉ Step 3: Choose Cloudflared for the connector type and select Next.
- πΉ Step 4: Enter a name for your tunnel.
- πΉ Step 5: Select Save tunnel.
- πΉ Step 6: Save the token. (The token is very long)
- πΉ Step 7: Activate Cloudflared
- πΉ Step 8: Add your token.
- πΉ Step 9: Add public hostname
- πΉ Step 10: Depending on the type, select http and URL always "localhost" + the web server port
- πΉ Step 11: Restart your webserver.
- Specify your Git repository URL in the
GIT_ADDRESSvariable - Enable Git by setting the
GIT_STATUSvariable to1ortrue - For private HTTPS repositories, set
ACCESS_TOKENto a personal access token.USERNAMEis optional and defaults tox-access-tokenwhen left blank. - For SSH repositories, use an SSH clone URL such as
git@github.com:owner/repo.gitand provideGIT_SSH_PRIVATE_KEYinstead ofACCESS_TOKEN - If you use SSH, ensure the private key has access to the repository and paste the full key including the
BEGINandENDlines intoGIT_SSH_PRIVATE_KEY GIT_SSH_KNOWN_HOSTScan be provided manually, but GitHub host verification is handled automatically during install when possible- On server creation, your repo will be cloned into the
wwwfolder - After the initial installation completes, start the server manually once to begin the first runtime boot sequence
- On each restart,
git pullruns to update the files
This egg includes a container-native cron engine for automated task scheduling without requiring system cron.
- Enable cron by setting the
CRON_STATUSvariable to1ortrue - Create or edit
/home/container/crontabwith your scheduled tasks - The cron engine runs automatically in the background and executes jobs at the specified times
- All execution logs are saved to
/home/container/logs/cron.log
# Run every minute
* * * * * echo "$(date): Task executed" >> /home/container/logs/task.log
# Daily backup at 2 AM
0 2 * * * tar -czf /home/container/backups/backup-$(date +%Y%m%d).tar.gz /home/container/www
# Clean old logs weekly (Sundays at midnight)
0 0 * * 0 find /home/container/logs -name "*.log" -mtime +7 -delete
# Laravel Scheduler (if using Laravel)
* * * * * cd /home/container/www && /usr/bin/php artisan schedule:run >> /home/container/logs/scheduler.log 2>&1- Uses custom cron engine - no system cron dependency required
- Supports command substitution like
$(date)and environment variables - Always use absolute paths in cron commands
- The cron engine starts automatically with the container
Changing the PHP version is currently still somewhat cumbersome. A revised version will be available in the future.
- Step 1: In your Pterodactyl panel, go to the "Startup" tab on your web server. Change the variable "PHP VERSION" to the desired version.
- Step 2: Finally, you need to customise the Docker image. Select the appropriate Docker image to match the version.
PHP extensions of PHP version 8.3:
Core, date, libxml, openssl, pcre, zlib, filter, hash, json, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, psr, xml, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, ldap, exif, memcache, mongodb, msgpack, mysqli, odbc, pcov, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, ps, pspell, readline, shmop, SimpleXML, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, mailparse, memcached, inotify, maxminddb, protobuf, Zend OPcacheUse GitHub actions, or want to run an automatic script to run install for your web project when pulling from Git? Enable the Deploy Script toggle and configure the deploy script location for it to automatically run on container restart!
- Public web root directory:
www - To enable HTTPS, modify
/home/container/nginx/conf.d/default.confaccordingly - PHP extensions vary slightly per version; full list available in docs
- Changing PHP versions requires matching Docker image selection and restart
- Auto-updates are powered by the Tavuru API for reliable version management
Forked and adapted from: https://gitlab.com/tenten8401/pterodactyl-nginx







