Skip to main content

Startup

These endpoints show a server's startup command and let you change the values of its egg variables.

Both endpoints are blocked while the server is suspended, installing, restoring a backup, being transferred, or its node is in maintenance. See server state and availability.

Get startup details​

GET /api/client/servers/{server}/startup

Subuser permission: startup.read

Returns the server's user-viewable egg variables, the startup command, and the Docker images the egg offers. Not paginated.

curl "https://panel.example.com/api/client/servers/1a7ce997/startup" \
-H "Authorization: Bearer $API_KEY" \
-H "Accept: application/json"

Response​

200 OK

{
"object": "list",
"data": [
{
"object": "egg_variable",
"attributes": {
"name": "Server Jar File",
"description": "The name of the server jarfile to run the server with.",
"env_variable": "SERVER_JARFILE",
"default_value": "server.jar",
"server_value": "server.jar",
"is_editable": true,
"rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/"
}
}
],
"meta": {
"startup_command": "java -Xms128M -Xmx4096M -jar server.jar",
"docker_images": {
"Java 21": "ghcr.io/pterodactyl/yolks:java_21",
"Java 17": "ghcr.io/pterodactyl/yolks:java_17"
},
"raw_startup_command": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}"
}
}

Variable attributes​

Only variables the egg marks as user-viewable are returned.

AttributeTypeDescription
namestringDisplay name.
descriptionstring or nullDescription.
env_variablestringThe environment variable name. Use this as key when updating.
default_valuestring or nullThe egg's default value.
server_valuestring or nullThis server's value. null if the server has no stored value for the variable.
is_editablebooleanWhether you can change the value.
rulesstringLaravel validation rules the value must pass, pipe-separated.

Meta​

FieldTypeDescription
startup_commandstringThe startup command with placeholders replaced. {{SERVER_MEMORY}}, {{SERVER_IP}} and {{SERVER_PORT}} become the server's memory limit and primary allocation's IP and port. Each {{VARIABLE}} becomes the server's value, or the default value if the server has none. Variables that are not user-viewable become [hidden].
docker_imagesobjectThe egg's Docker images, as a map of display name to image. These are the values accepted by Change the Docker image.
raw_startup_commandstring or nullThe server's own startup command, without replacements. null or empty if the server uses the egg's startup command; startup_command is then built from the egg's command.

Update a variable​

PUT /api/client/servers/{server}/startup/variable

Subuser permission: startup.update

Sets the server's value for one egg variable. The value is stored in the Panel; Wings is not contacted. If the new value (with null treated as an empty string) differs from the previous server_value, logs the activity event server:startup.edit with the properties variable, old and new. A variable with no stored value yet always counts as changed.

Request body​

JSON body.

FieldTypeRequiredDescription
keystringYesThe variable's env_variable, e.g. SERVER_JARFILE.
valuestring or nullYesThe new value. The field must be present, but may be null or an empty string. It is then validated against the variable's own rules. An empty string or null is stored as an empty string.
{ "key": "SERVER_JARFILE", "value": "paper.jar" }

Response​

200 OK

The updated variable, with the new startup command in meta. meta has no docker_images here.

{
"object": "egg_variable",
"attributes": {
"name": "Server Jar File",
"description": "The name of the server jarfile to run the server with.",
"env_variable": "SERVER_JARFILE",
"default_value": "server.jar",
"server_value": "paper.jar",
"is_editable": true,
"rules": "required|regex:/^([\\w\\d._-]+)(\\.jar)$/"
},
"meta": {
"startup_command": "java -Xms128M -Xmx4096M -jar paper.jar",
"raw_startup_command": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}"
}
}

server_value in this response is the value you sent after input normalisation, so an empty string comes back as null.

Errors​

StatusWhen
400No variable of the server's egg has this key, or the variable is not user-viewable. detail is The environment variable you are trying to edit does not exist.
400The variable is not user-editable. detail is The environment variable you are trying to edit is read-only.
422value fails the variable's rules.