Skip to main content

Import the egg

1

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:
curl -LO https://raw.githubusercontent.com/Synxx12/nextjs-egg/main/next-js-egg.json
2

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.
3

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.
4

Create a server using the egg

Go to ServersCreate 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.
VariableEnv keyDefaultDescription
Git Repository URLGIT_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 BranchGIT_BRANCHmainBranch to clone and run. Leave empty to use the repository’s default branch.
Auto UpdateAUTO_UPDATE1Set to 1 to pull the latest commits on every startup, 0 to disable.
Git UsernameUSERNAME(empty)Your GitHub/GitLab username. Required only for private repositories.
Git Access TokenACCESS_TOKEN(empty)Personal access token with repo scope. Required only for private repositories.
Run EnvironmentNODE_RUN_ENVproductionproduction runs next build + next start. development runs next dev with hot-reload.
Package ManagerPACKAGE_MANAGERautoauto detects from your lockfile. Or explicitly set npm, pnpm, or yarn.
Cloudflare Tunnel TokenCLOUDFLARE_TOKEN(empty)Optional. Token from your Cloudflare Zero Trust dashboard. Leave empty to disable.
Never embed credentials directly in GIT_URL. For private repositories, leave GIT_URL as a plain HTTPS URL and set USERNAME and ACCESS_TOKEN separately. The egg injects them into the URL automatically.

What happens during installation

When a server is first created, the panel runs an installation script inside a temporary container. That script:
  1. Installs system dependencies (git, curl, jq, and build tools).
  2. Downloads entrypoint.sh from the egg repository into .pterodactyl/ inside the server’s volume.
  3. If GIT_URL is set, clones your repository and runs npm ci or npm install to pre-install dependencies.
The entrypoint script is re-downloaded on each server start if it is not already present, so you always run the latest version.

Next steps

With the egg installed and your server created, follow the Quick Start guide to configure your variables and get your Next.js app running.