Skip to main content

Eggs

An egg defines how a type of server is installed and run: its Docker images, startup command, install script and variables. These endpoints manage eggs and their variables. To list the eggs in a nest, or import an egg, see Nests.

In every path, {egg} is the egg's numeric id and {eggVariable} is the variable's numeric id.

The egg object​

{
"object": "egg",
"attributes": {
"id": 3,
"uuid": "9e0a7b5c-3d2f-4a18-8b6c-1d2e3f4a5b6c",
"name": "Paper",
"nest_id": 1,
"author": "parker@pterodactyl.io",
"description": "High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.",
"docker_images": {
"Java 21": "ghcr.io/pterodactyl/yolks:java_21",
"Java 17": "ghcr.io/pterodactyl/yolks:java_17"
},
"config": {
"files": {
"server.properties": {
"parser": "properties",
"find": {
"server-ip": "0.0.0.0",
"server-port": "{{server.build.default.port}}"
}
}
},
"startup": {
"done": ")! For help, type "
},
"stop": "stop",
"file_denylist": [],
"extends": null
},
"startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}",
"script": {
"privileged": true,
"install": "#!/bin/ash\n...",
"entry": "ash",
"container": "ghcr.io/pterodactyl/installers:alpine",
"extends": null
},
"created_at": "2026-11-20T14:02:11+00:00",
"updated_at": "2026-11-20T14:02:11+00:00"
}
}
AttributeTypeDescription
idintegerEgg ID.
uuidstringEgg UUID.
namestringName.
nest_idintegerThe nest the egg belongs to.
authorstringAuthor email address.
descriptionstring or nullDescription.
docker_imagesobject or arrayDocker images, as stored. Usually an object mapping a display name to an image.
config.filesobjectThe egg's configuration file rules, decoded from JSON. {} when empty or null.
config.startupobject or nullStartup detection rules, decoded from JSON.
config.stopstring or nullStop command.
config.file_denylistarray or nullFiles users cannot access.
config.extendsinteger or nullID of the egg this egg copies its configuration from (config_from).
startupstringStartup command.
script.privilegedbooleanWhether the install script runs privileged.
script.installstring or nullInstall script.
script.entrystring or nullInstall script entrypoint.
script.containerstring or nullInstall script container image.
script.extendsinteger or nullID of the egg this egg copies its install script from (copy_script_from).
created_atstringISO 8601 timestamp.
updated_atstringISO 8601 timestamp.

features, update_url and force_outgoing_ip are not returned.

Includes​

See includes.

IncludeReturns
nestThe egg's nest.
serversServers using the egg, as server objects.
variablesThe egg's variables, as egg variable objects.
configOnly when the egg copies its configuration from another egg (config.extends is set); otherwise a null_resource. The resolved configuration: files and startup (decoded JSON) and stop, each taken from the parent egg when this egg's own value is null.
scriptOnly when the egg copies its install script from another egg (script.extends is set); otherwise a null_resource. The resolved script: privileged (this egg's own value), and install, entry and container, each taken from the parent egg when this egg's own value is null.

The config and script includes have an empty string as their object:

"relationships": {
"config": {
"object": "",
"attributes": {
"files": {},
"startup": { "done": "Server started" },
"stop": "stop"
}
}
}

The egg variable object​

The variable endpoints return each variable with its database columns as they are.

{
"object": "egg_variable",
"attributes": {
"id": 12,
"egg_id": 3,
"name": "Server Jar File",
"description": "The name of the server jarfile to run the server with.",
"env_variable": "SERVER_JARFILE",
"default_value": "server.jar",
"user_viewable": true,
"user_editable": true,
"rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/",
"created_at": "2026-11-20T14:02:11.000000Z",
"updated_at": "2026-11-20T14:02:11.000000Z"
}
}
AttributeTypeDescription
idintegerVariable ID.
egg_idintegerThe egg the variable belongs to.
namestringDisplay name.
descriptionstringDescription.
env_variablestringEnvironment variable name.
default_valuestringDefault value.
user_viewablebooleanWhether users can see the variable.
user_editablebooleanWhether users can change the variable.
rulesstringLaravel validation rules applied to the value.
created_atstringISO 8601 timestamp in UTC, with microseconds (a different format from the egg's timestamps).
updated_atstringSame format as created_at.

Get an egg​

GET /api/application/eggs/{egg}

Admin permission: eggs.read

Returns one egg.

curl "https://panel.example.com/api/application/eggs/3?include=variables" \
-H "Authorization: Bearer $API_KEY" \
-H "Accept: application/json"

Query parameters​

ParameterTypeRequiredDescription
includestringNoconfig, nest, script, servers, variables.

Response​

200 OK

An egg object.

Export an egg​

GET /api/application/eggs/{egg}/export

Admin permission: eggs.export

Returns the egg as a PTDL_v2 export file, the format that import an egg accepts. Logs the activity event admin:eggs:export.

Response​

200 OK

The body is the export file itself, as pretty-printed JSON with the Content-Type application/json. It does not use the object/attributes envelope:

{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2026-11-26T10:15:00.000000Z",
"name": "Paper",
"author": "parker@pterodactyl.io",
"description": "High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.",
"features": ["eula", "java_version", "pid_limit"],
"docker_images": {
"Java 21": "ghcr.io/pterodactyl/yolks:java_21"
},
"file_denylist": [],
"startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}",
"config": {
"files": "{\"server.properties\":{\"parser\":\"properties\",\"find\":{\"server-ip\":\"0.0.0.0\"}}}",
"startup": "{\"done\":\")! For help, type \"}",
"stop": "stop"
},
"scripts": {
"installation": {
"script": "#!/bin/ash\n...",
"container": "ghcr.io/pterodactyl/installers:alpine",
"entrypoint": "ash"
}
},
"variables": [
{
"name": "Server Jar File",
"description": "The name of the server jarfile to run the server with.",
"env_variable": "SERVER_JARFILE",
"default_value": "server.jar",
"user_viewable": true,
"user_editable": true,
"rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/",
"field_type": "text"
}
]
}

When the egg copies its configuration from another egg (config_from), config.files, config.startup and config.stop come from that parent egg if this egg's own value is null, and file_denylist always comes from the parent egg. When the egg copies its install script from another egg (copy_script_from), each of the three scripts.installation values comes from that parent egg if this egg's own value is null. config.files and config.startup are JSON strings. Each variable has every column except id, egg_id, created_at and updated_at, plus "field_type": "text".

Create an egg​

POST /api/application/eggs

Admin permission: eggs.create

Creates an egg. The Panel generates its UUID and sets its author to the APP_SERVICE_AUTHOR value from the Panel's .env file (default unknown@unknown.com). Logs the activity event admin:eggs:create.

Request body​

JSON body.

FieldTypeRequiredDescription
nest_idintegerYesID of an existing nest.
namestringYesUp to 191 characters.
descriptionstringNoCan be null.
featuresarrayNoStored, but not returned by the egg object.
docker_imagesarray or objectYesAt least one entry. Every value must be a string.
file_denylistarray of stringsNoCan be null.
config_filesstringYesA JSON-encoded string, for example "{}". Cannot be null.
config_startupstringYesA JSON-encoded string. Cannot be null.
config_stopstringYesUp to 191 characters. Cannot be null.
startupstringYesStartup command.
script_containerstringNoInstall script container image.
script_entrystringNoInstall script entrypoint.
script_installstringNoInstall script.

config_files, config_startup and config_stop are marked nullable in the rules, but they are also required, and Laravel's required rule rejects null. Other egg columns (config_from, copy_script_from, script_is_privileged, force_outgoing_ip, update_url) cannot be set through this endpoint.

Response​

200 OK (not 201)

The new egg object, reloaded from the database.

Update an egg​

PATCH /api/application/eggs/{egg}

Admin permission: eggs.update

Updates an egg. Only the fields you send are changed. Logs the activity event admin:eggs:update, with the raw request body in the new_data property.

Request body​

JSON body. All fields are optional.

FieldTypeDescription
nest_idintegerID of an existing nest. Moves the egg to that nest.
namestringUp to 191 characters.
descriptionstringCan be null.
featuresarray
docker_imagesarray or objectAt least one entry. Every value must be a string.
file_denylistarray of stringsCan be null.
config_filesstringA JSON-encoded string. Can be null.
config_startupstringA JSON-encoded string. Can be null.
config_stopstringUp to 191 characters. Can be null.
startupstringStartup command.
script_containerstringInstall script container image.
script_entrystringInstall script entrypoint.
script_installstringInstall script.

Response​

200 OK

The updated egg object.

Delete an egg​

DELETE /api/application/eggs/{egg}

Admin permission: eggs.delete

Deletes an egg and, through the database, its variables. Logs the activity event admin:eggs:delete.

Response​

204 No Content

Errors​

StatusWhen
400A server still uses the egg. detail is An Egg with active servers attached to it cannot be deleted from the Panel.

Create an egg variable​

POST /api/application/eggs/{egg}/variables

Admin permission: eggs.create

Adds a variable to an egg. Logs the activity event admin:eggs:variables:create.

Request body​

JSON body.

FieldTypeRequiredDescription
namestringYes1 to 191 characters.
descriptionstringNoCan be null. Stored as an empty string when missing or null.
env_variablestringYes1 to 191 letters, digits or underscores. Cannot be a reserved name (see below).
default_valuestringYesMust be present, but can be null or empty. null is stored as an empty string.
user_viewablebooleanYesWhether users can see the variable.
user_editablebooleanYesWhether users can change the variable.
rulesstringYesLaravel validation rules, for example required|string|max:20. Each rule must exist.

Reserved names: SERVER_MEMORY, SERVER_IP, SERVER_PORT, ENV, HOME, USER, STARTUP, SERVER_UUID and UUID. An exact match fails validation with 422. A match in another letter case (for example server_memory) fails with 400.

env_variable must be unique within the egg (exact match).

Response​

200 OK (not 201)

An egg variable object.

Errors​

StatusWhen
400env_variable is a reserved name in a different letter case. detail is Cannot use the protected name <name> for this environment variable.
400Another variable of this egg already uses env_variable. detail is The environment variable <name> must be unique to this Egg.
400A rule in rules does not exist. detail is The validation rule "<rule>" is not a valid rule for this application.

Update egg variables​

PATCH /api/application/eggs/{egg}/variables

Admin permission: eggs.update

Updates several variables of an egg in one transaction. Logs the activity event admin:eggs:variables:update.

Request body​

A JSON array, with one object per variable to update.

[
{
"id": 12,
"name": "Server Jar File",
"description": "The name of the server jarfile to run the server with.",
"env_variable": "SERVER_JARFILE",
"default_value": "server.jar",
"user_viewable": true,
"user_editable": true,
"rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/"
}
]
FieldTypeRequiredDescription
idintegerYesVariable ID. IDs that don't belong to {egg} are skipped without an error.
namestringNo1 to 191 characters.
descriptionstringNoCan be null, which is stored as an empty string.
env_variablestringNo1 to 191 letters, digits or underscores, not a reserved name, and not used by another variable of this egg.
default_valuestringNoCan be null, which is stored as an empty string.
user_viewablebooleanNoWhether users can see the variable.
user_editablebooleanNoWhether users can change the variable.
rulesstringNoLaravel validation rules. Each rule must exist. Rules may be separated by ;; instead of | for the existence check.

Only the fields you send are changed. Fields you leave out keep their current values.

Response​

200 OK

A list of all of the egg's variables after the update, as egg variable objects.

{
"object": "list",
"data": [
{
"object": "egg_variable",
"attributes": {
"id": 12,
"egg_id": 3,
"name": "Server Jar File",
"...": "see the egg variable object"
}
}
]
}

Errors​

If any entry fails, no variable is changed.

StatusWhen
400env_variable is a reserved name in a different letter case. detail is The environment variable <name> is protected and cannot be assigned to a variable.
400Another variable of this egg already uses env_variable. detail is The environment variable <name> must be unique to this Egg.
400A rule in rules does not exist. detail is The validation rule "<rule>" is not a valid rule for this application.

Delete an egg variable​

DELETE /api/application/eggs/{egg}/variables/{eggVariable}

Admin permission: eggs.delete

Deletes one variable from an egg. A variable that belongs to a different egg returns 404. Logs the activity event admin:eggs:variables:delete.

Response​

204 No Content