My "own" repository of Nginx Egg for Pterodactyl. Huge thanks to Ym0T
Β© Ym0T - https://github.com/Ym0T/pterodactyl-nginx-egg
- Features
- Installation
- Composer Modules Usage
- ionCube Loader Support
- Cloudflared Tunnel Tutorial π
- Git Module
- Change PHP version
- PHP extensions
- Notes
- License
- π§Ή 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.4
- β 8.3
- βοΈ 8.2 (security-only)
- βοΈ 8.1 (security-only)
- Download the egg file (
egg-nginx.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
- Fill in all required variables, including whether WordPress is desired and the PHP version field (must be set explicitly)
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 - On server creation, your repo will be cloned into the
wwwfolder - On each restart,
git pullruns to update the files
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 OPcache- 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
Forked and adapted from: https://gitlab.com/tenten8401/pterodactyl-nginx







