Skip to main content

Overview

Eggs define server type configurations including Docker images, startup commands, environment variables, and installation scripts. Each egg belongs to a nest.

Endpoints

List Eggs

curl -X GET "https://panel.example.com/api/admin/eggs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Authentication: Admin with eggs:read permission Response:
{
  "data": [
    {
      "id": "egg-uuid",
      "name": "Vanilla Minecraft",
      "nestName": "Minecraft"
    },
    {
      "id": "egg-uuid-2",
      "name": "Paper",
      "nestName": "Minecraft"
    }
  ]
}

Get Egg

curl -X GET "https://panel.example.com/api/admin/eggs/egg-uuid" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Returns detailed egg configuration including variables, Docker images, and scripts.

Create Egg

curl -X POST "https://panel.example.com/api/admin/eggs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d @egg.json
Request Body:
  • nestId (required): UUID of the parent nest
  • name (required): Egg name (1-255 characters)
  • description (optional): Egg description
  • dockerImage (required): Default Docker image (minimum 1 character)
  • dockerImages (optional): Array of available Docker images
  • startup (required): Startup command (minimum 1 character)
  • features (optional): Array of feature flags
  • fileDenylist (optional): Array of denied file patterns
  • configFiles (optional): JSON string of config file mappings
  • configStartup (optional): JSON config for startup detection
  • configStop (optional): Stop command configuration
  • configLogs (optional): JSON config for log parsing
  • scriptContainer (optional): Docker image for installation script
  • scriptEntry (optional): Script entry point
  • scriptInstall (optional): Installation script content
  • copyScriptFrom (optional): UUID of egg to copy script from
  • updateUrl (optional): URL for egg updates

Update Egg

curl -X PATCH "https://panel.example.com/api/admin/eggs/egg-uuid" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Egg Name",
    "dockerImage": "ghcr.io/pterodactyl/yolks:java_17"
  }'
Request Body: Same as create, but all fields are optional

Delete Egg

Eggs cannot be deleted if they are in use by any servers.

Export Egg

curl -X GET "https://panel.example.com/api/admin/eggs/egg-uuid/export" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -o egg-export.json
Exports the egg configuration as a JSON file for backup or sharing.

Import Egg

curl -X POST "https://panel.example.com/api/admin/eggs/import" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d @egg-export.json
Imports an egg from an exported JSON file.

Egg Variables

Eggs can have environment variables that are configurable per-server.

List Variables

curl -X GET "https://panel.example.com/api/admin/eggs/egg-uuid/variables" \
  -H "Authorization: Bearer YOUR_API_KEY"

Create Variable

curl -X POST "https://panel.example.com/api/admin/eggs/egg-uuid/variables" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Server Port",
    "description": "The port the server listens on",
    "envVariable": "SERVER_PORT",
    "defaultValue": "25565",
    "userViewable": true,
    "userEditable": false,
    "rules": "required|integer|between:1,65535"
  }'

Update Variable

curl -X PATCH "https://panel.example.com/api/admin/eggs/egg-uuid/variables/var-uuid" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "defaultValue": "25566"
  }'

Delete Variable

curl -X DELETE "https://panel.example.com/api/admin/eggs/egg-uuid/variables/var-uuid" \
  -H "Authorization: Bearer YOUR_API_KEY"

Egg Object

id
string
Egg UUID
name
string
Egg name
nestName
string
Name of the parent nest
description
string
Egg description
dockerImage
string
Default Docker image
startup
string
Startup command with variable placeholders

Notes

  • Eggs define the server type and configuration
  • Variables use Laravel validation rules
  • Eggs can be exported and imported for sharing
  • Installation scripts run in a separate container
  • Audit logs track all egg modifications

Build docs developers (and LLMs) love