A custom Pterodactyl Panel egg for deploying React web applications with flexible configuration options for ports, build modes, and Git integration.
- 🔄 Dual Build Modes: Development (hot reload) & Production (optimized build)
- 🔧 Configurable Port: Run on any port between 1024–65535
- 🌐 Git Integration: Clone React apps directly from GitHub or GitLab
- 🔁 Auto Updates: Optional Git pulls on container restart
- 📦 Serve Options: Choose between
serveorhttp-serverin production - 📂 Manual Upload: Upload project files directly if needed
- ➕ NPM Control: Install or uninstall additional packages easily
- ✅ Pterodactyl Panel v1.0+
- 🐳 Docker support
- 📁 React project with a valid
package.jsonfile
-
Download Egg
Get theegg-react-web-app.jsonfrom this repository. -
Import into Panel
- Navigate to your Pterodactyl Admin Panel
- Go to
Nests → Import Egg - Upload the
.jsonfile - Assign it to a Nest (e.g., create a new one called "Web Apps")
| Variable | Description | Default | Required |
|---|---|---|---|
GIT_ADDRESS |
URL of Git repo | — | ✅ (unless manual upload) |
BRANCH |
Branch to clone | — | ❌ |
PORT |
Port to serve app on | 3000 | ✅ |
BUILD_MODE |
development or production |
development | ✅ |
SERVE_METHOD |
Serve method for production (serve/http-server) |
serve | ✅ |
UPLOAD_MODE |
Skip git (1 = manual upload) | 0 | ❌ |
AUTO_UPDATE |
Pull on startup (1 = yes) | 0 | ❌ |
NODE_PACKAGES |
Additional npm packages | — | ❌ |
GIT_USER |
Git username (private repos) | — | ❌ |
GIT_TOKEN |
Git personal access token | — | ❌ |
UNINSTALL_PACKAGES |
NPM packages to remove | — | ❌ |
- Runs
npm start - Hot-reloading enabled
- Accessible via
http://your-server:PORT
- Runs
npm run build - Serves static files using either:
serve:npx serve -s build -l PORThttp-server:npx http-server build -p PORT -a 0.0.0.0
Your React repo should include:
{
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build"
}
}GIT_ADDRESS: https://github.com/username/project
BRANCH: main
PORT: 3000
BUILD_MODE: development
GIT_ADDRESS: https://github.com/user/private-app
GIT_USER: username
GIT_TOKEN: your_token_here
PORT: 8080
BUILD_MODE: production
SERVE_METHOD: serve
UPLOAD_MODE: 1
PORT: 3000
BUILD_MODE: production
The egg waits for startup logs like:
webpack compiledLocal:On Your Network:compiled successfullyServing at httpAvailable on:
- Node.js 21:
ghcr.io/parkervcp/yolks:nodejs_21 - Node.js 20 (Recommended):
ghcr.io/parkervcp/yolks:nodejs_20 - Node.js 18:
ghcr.io/parkervcp/yolks:nodejs_18
HOST=0.0.0.0PORT=${PORT}
If you use a custom build system:
{
"scripts": {
"start": "custom-start",
"build": "custom-build"
}
}| Problem | Solution |
|---|---|
| ❌ Build fails | Ensure package.json is valid |
| 🔒 Repo clone fails | Check token or access permissions |
| 🚫 Port not working | Verify server port allocation |
| 📦 Missing dependencies | Add them to NODE_PACKAGES |
- Fork the repo
- Create a feature branch
- Commit and push
- Submit a pull request 🙌
Distributed under the MIT License.
- Open an issue in this repo
- Refer to Pterodactyl Docs
- Join the community on Discord
Author: ashenetugala@gmail.com
Version: 1.0.0
Compatibility: Pterodactyl Panel v1.0+
