Skip to main content
Each variable below maps directly to an environment variable available inside your server container. You can edit them from the Startup tab of your server in the Pterodactyl or Pelican panel.

Git & Deployment

GIT_URL
string
The full HTTPS URL of your Git repository — for example, https://github.com/user/my-app. The egg clones this repository into the container on first start.Leave this empty if you prefer to upload your project files manually using the panel’s File Manager. When left empty, the egg skips cloning entirely and expects a package.json to already be present in the container.
GIT_BRANCH
string
default:"main"
The branch to clone and run. Set this to any valid branch name, such as main, master, or production.Leave it empty to use the repository’s default branch as configured on the remote.
AUTO_UPDATE
boolean
default:"1"
Controls whether the egg pulls the latest commits from your repository every time the server starts.
  • 1 — runs git reset --hard followed by git pull on each startup, ensuring your container always runs the newest code.
  • 0 — skips the pull. Use this when you want to pin the server to a specific commit or manage deployments manually.
Even with AUTO_UPDATE set to 1, dependencies are reinstalled and (in production mode) the app is rebuilt on every start. Keep this in mind for servers where startup time matters.

Private Repository Authentication

USERNAME
string
Your GitHub or GitLab username. Only required when connecting to a private repository.Leave empty for public repositories — the egg will clone without authentication.
ACCESS_TOKEN
string
A personal access token with at least the repo scope. Only required for private repositories.Generate one at GitHub Settings → Tokens. Set GIT_URL to the plain HTTPS URL without any credentials embedded — the egg injects your username and token automatically.
Treat your access token like a password. Do not commit it to your repository or share it publicly.

Runtime

NODE_RUN_ENV
string
default:"production"
required
Determines how Next.js starts. Accepted values are production and development.
  • production — runs next build to produce an optimized build, then starts the server with next start. Use this for live, publicly facing sites.
  • development — skips the build step and starts with next dev, enabling hot-reload. Use this when actively developing your application.
In development mode, the build step is skipped entirely. Your changes are reflected immediately without restarting the server.
PACKAGE_MANAGER
string
default:"auto"
required
The package manager used to install your Node.js dependencies. Accepted values are auto, npm, pnpm, and yarn.
  • auto — the egg inspects your repository for a lockfile and selects the appropriate manager: pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm.
  • npm, pnpm, or yarn — forces a specific manager regardless of which lockfiles are present.
See Package Managers for full details on install behavior.

Cloudflare Tunnel

CLOUDFLARE_TOKEN
string
A Cloudflare Tunnel token from your Zero Trust dashboard under Networks → Tunnels → Configure → Run token.When set, the egg installs cloudflared and starts the tunnel in the background before launching Next.js. Leave empty to disable tunnel support entirely.
Cloudflare Tunnel lets you expose your Next.js app to the internet without opening firewall ports or configuring a reverse proxy.

Variable Reference

NameEnv KeyDefaultRequired
Git Repository URLGIT_URL(empty)No
Git BranchGIT_BRANCHmainNo
Auto UpdateAUTO_UPDATE1Yes
Git UsernameUSERNAME(empty)No
Git Access TokenACCESS_TOKEN(empty)No
Run EnvironmentNODE_RUN_ENVproductionYes
Package ManagerPACKAGE_MANAGERautoYes
Cloudflare Tunnel TokenCLOUDFLARE_TOKEN(empty)No