Import the egg
Download the egg JSON
Download
next-js-egg.json from the Synxx12/nextjs-egg GitHub repository.You can download it directly from the repository’s file list, or with curl:Import the egg into your panel
In your Pterodactyl Admin Panel, navigate to Nests in the left sidebar, then click Import Egg in the top right corner.Upload the
next-js-egg.json file you downloaded in the previous step.The egg is compatible with both Pterodactyl Panel v1.x and Pelican Panel. The import process is identical on both panels.
Assign the egg to a nest
After importing, you will be prompted to select which nest the egg belongs to. Choose an existing nest (for example, “Applications” or “Node.js”) or create a new one.The nest is just an organisational grouping — it does not affect how the egg behaves.
Create a server using the egg
Go to Servers → Create New (or use the client area if your panel exposes it there). Under Nest Configuration, select the nest you assigned the egg to, then select the Next.js egg from the egg dropdown.Fill in the server’s resource limits (RAM, disk, CPU) and the egg variables. The only required variable is
GIT_URL — see the table below for the full list.Click Create Server to finish.Egg variables reference
These variables appear on the server’s Startup tab after creation. You can edit them at any time and they take effect on the next server start.| Variable | Env key | Default | Description |
|---|---|---|---|
| Git Repository URL | GIT_URL | (empty) | Full HTTPS URL of your repo, e.g. https://github.com/user/repo. Leave empty to skip cloning and upload files manually. |
| Git Branch | GIT_BRANCH | main | Branch to clone and run. Leave empty to use the repository’s default branch. |
| Auto Update | AUTO_UPDATE | 1 | Set to 1 to pull the latest commits on every startup, 0 to disable. |
| Git Username | USERNAME | (empty) | Your GitHub/GitLab username. Required only for private repositories. |
| Git Access Token | ACCESS_TOKEN | (empty) | Personal access token with repo scope. Required only for private repositories. |
| Run Environment | NODE_RUN_ENV | production | production runs next build + next start. development runs next dev with hot-reload. |
| Package Manager | PACKAGE_MANAGER | auto | auto detects from your lockfile. Or explicitly set npm, pnpm, or yarn. |
| Cloudflare Tunnel Token | CLOUDFLARE_TOKEN | (empty) | Optional. Token from your Cloudflare Zero Trust dashboard. Leave empty to disable. |
What happens during installation
When a server is first created, the panel runs an installation script inside a temporary container. That script:- Installs system dependencies (
git,curl,jq, and build tools). - Downloads
entrypoint.shfrom the egg repository into.pterodactyl/inside the server’s volume. - If
GIT_URLis set, clones your repository and runsnpm ciornpm installto pre-install dependencies.