> ## Documentation Index
> Fetch the complete documentation index at: https://nextjs-egg.nyxel.my.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Next.js Egg

> Host any Next.js app on Pterodactyl or Pelican Panel — from a Git repository, with production builds, auto-update, and environment variable injection.

Deploy your Next.js application directly from a Git repository on a Pterodactyl or Pelican panel server. The egg handles cloning, dependency installation, building, and starting your app automatically — just set a few variables and go.

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/installation">
    Import the egg into your Pterodactyl or Pelican panel and create your first server.
  </Card>

  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Get your Next.js app running in minutes with step-by-step instructions.
  </Card>

  <Card title="Configuration" icon="sliders" href="/configuration/variables">
    Explore all variables you can set to control how your app is cloned, built, and run.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/reference/troubleshooting">
    Fix common issues with startup, builds, private repos, and dependencies.
  </Card>
</CardGroup>

## What the egg does

<Steps>
  <Step title="Clone your repository">
    On first start, the egg clones your Git repository into the container. Point it at any public or private GitHub or GitLab repo.
  </Step>

  <Step title="Install dependencies">
    Dependencies are installed automatically using your preferred package manager — npm, pnpm, or yarn. The package manager is detected from your lockfile or you can set it explicitly.
  </Step>

  <Step title="Build and start">
    In production mode, `next build` runs before `next start`. In development mode, `next dev` starts immediately with hot-reload enabled.
  </Step>

  <Step title="Stay up to date">
    With auto-update enabled, the egg pulls the latest commits from your branch every time the server restarts — no manual intervention needed.
  </Step>
</Steps>

## Key features

* **Production & development modes** — run an optimized production build or a hot-reload dev server
* **Auto-update** — pull the latest commits on every startup
* **Private repositories** — authenticate with a personal access token
* **.env injection** — upload a `.env.pterodactyl` file via the File Manager; it becomes `.env` on startup
* **Package manager support** — npm, pnpm, and yarn, with automatic detection
* **Cloudflare Tunnel** — expose your app publicly without opening ports
* **Multi-version Node.js** — choose from Node.js 18 through 25
