Pterodactyldocs
Admin A P I

Update server startup

Updates the egg, Docker image, startup command, environment, and install-script behavior.

PUT/api/admin/servers/{server_admin_identifier}/startup
AuthorizationBearer <token>

Application API requests require an application API token, or a client API token, that belongs to a root administrator. Admin API requests require a client API token that belongs to a root administrator, and reject application API tokens. Client API requests require a client API token.

In: header

Path Parameters

server_admin_identifier*string

The server ID or UUID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/admin/servers/1/startup" \  -H "Content-Type: application/json" \  -d '{    "startup": "java -Xms128M -XX:MaxRAMPercentage=95.0 -jar {{SERVER_JARFILE}}",    "egg_id": 1,    "docker_image": "ghcr.io/pterodactyl/yolks:java_21"  }'
{  "object": "server",  "attributes": {    "id": 8140,    "external_id": "string",    "uuid": "e5628a06-7ba6-4206-8a87-c2aeb91669ec",    "identifier": "kqhvptzk",    "name": "Leo",    "description": "Et modi ipsum nostrum omnis autem et consequatur. Dolores enim non facere tempora. Voluptatem laboriosam praesentium quis adipisci.",    "status": "string",    "suspended": false,    "limits": {      "memory": 512,      "swap": 0,      "disk": 512,      "io": 500,      "cpu": 0,      "threads": "string",      "oom_disabled": false    },    "feature_limits": {      "databases": 0,      "allocations": 0,      "backups": 0    },    "user": 22139,    "node": 13361,    "allocation": 9849,    "egg": 9866,    "container": {      "startup_command": "/bin/bash echo \"hello world\"",      "image": "foo/bar:latest",      "skip_scripts": false,      "installed": 1,      "environment": {        "SERVER_JARFILE": "server.jar"      }    },    "updated_at": "2026-09-22T14:45:24+00:00",    "created_at": "2026-09-22T14:45:24+00:00",    "relationships": {      "allocation": {        "object": "allocation",        "attributes": {          "id": 9864,          "ip": "43.197.122.240",          "alias": "string",          "port": 23726,          "notes": "string",          "server_id": 0,          "server_name": "string",          "assigned": false        }      },      "allocations": {        "object": "list",        "data": [          {            "object": "allocation",            "attributes": {              "id": 9864,              "ip": "43.197.122.240",              "alias": "string",              "port": 23726,              "notes": "string",              "server_id": 0,              "server_name": "string",              "assigned": false            }          }        ]      },      "user": {        "object": "user",        "attributes": {          "id": 22129,          "external_id": "string",          "uuid": "39ff92cf-453d-43be-ac47-89569dfba75e",          "username": "alayna44_cuxzkyiji9",          "email": "[email protected]",          "first_name": "Kenyatta",          "last_name": "O'Keefe",          "language": "en",          "root_admin": false,          "2fa": false,          "image": "https://gravatar.com/avatar/7dd464c5201a58aafc8fa80660971d52",          "servers_count": 0,          "subuser_of_count": 0,          "created_at": "2026-09-22T14:45:24+00:00",          "updated_at": "2026-09-22T14:45:24+00:00",          "relationships": {            "servers": {              "object": "list",              "data": [                {}              ]            }          }        },        "meta": {          "resource": "https://panel.example.com/api/admin/users/1"        }      },      "egg": {        "object": "egg",        "attributes": {          "id": 9880,          "uuid": "f05076e2-3f79-44fe-b9c3-007df7879f42",          "author": "[email protected]",          "name": "Mrs. Justina Gaylord",          "description": "Mollitia modi deserunt aut ab provident perspiciatis quo. Nostrum aut adipisci quidem nostrum. Commodi incidunt iure odit.",          "features": [            "eula"          ],          "docker_image": "ghcr.io/pterodactyl/yolks:java_23",          "docker_images": {            "Java 23": "ghcr.io/pterodactyl/yolks:java_23"          },          "force_outgoing_ip": false,          "config": {            "files": {              "server.properties": {                "parser": "properties",                "find": {                  "server-port": "{{server.build.default.port}}"                }              }            },            "startup": {              "done": [                "Done"              ]            },            "stop": "stop",            "logs": {              "custom": true,              "location": "logs/latest.log"            },            "file_denylist": [              "secret.txt"            ],            "extends": 0          },          "startup": "java -jar test.jar",          "script": {            "privileged": true,            "install": "string",            "entry": "ash",            "container": "alpine:3.4",            "extends": 0          },          "created_at": "2026-09-22T14:45:26+00:00",          "updated_at": "2026-09-22T14:45:26+00:00",          "relationships": {            "variables": {              "object": "list",              "data": [                {                  "object": "egg_variable",                  "attributes": {                    "id": 3952,                    "egg_id": 9881,                    "name": "Payton",                    "description": "Ipsum nostrum omnis autem et consequatur aut dolores enim.",                    "env_variable": "NON_FACERE",                    "default_value": "GoldenRod",                    "user_viewable": false,                    "user_editable": false,                    "rules": "required|string",                    "sort_order": 0,                    "created_at": "2026-09-22T14:45:26+00:00",                    "updated_at": "2026-09-22T14:45:26+00:00"                  }                }              ]            },            "tags": {              "object": "list",              "data": [                {                  "object": "tag",                  "attributes": {                    "id": 510,                    "name": "fugiat sunt",                    "slug": "fugiat-sunt",                    "color": "#54db8e",                    "is_predefined": false,                    "legacy_nest_id": 1,                    "eggs_count": 0,                    "nodes_count": 0,                    "created_at": "2026-09-22T14:45:25+00:00",                    "updated_at": "2026-09-22T14:45:25+00:00"                  },                  "meta": {                    "resource": "https://panel.example.com/api/admin/tags/1"                  }                }              ]            },            "servers": {              "object": "list",              "data": [                {}              ]            }          }        },        "meta": {          "resource": "https://panel.example.com/api/admin/eggs/1"        }      },      "variables": {        "object": "list",        "data": [          {            "object": "server_variable",            "attributes": {              "id": 1,              "egg_id": 1,              "name": "Server Jar File",              "description": "The jar file to run.",              "env_variable": "SERVER_JARFILE",              "default_value": "server.jar",              "server_value": "server.jar",              "user_viewable": true,              "user_editable": true,              "rules": "required|string",              "required": true,              "sort_order": 1,              "created_at": "2026-01-01T00:00:00+00:00",              "updated_at": "2026-01-01T00:00:00+00:00"            }          }        ]      },      "node": {        "object": "node",        "attributes": {          "id": 13380,          "uuid": "0c8baf15-4a20-49b5-b738-109796b553e1",          "public": true,          "name": "FactoryNode_K98YXFAsPq",          "description": "string",          "location_id": 16046,          "fqdn": "74.174.140.253",          "scheme": "http",          "behind_proxy": false,          "maintenance_mode": false,          "memory": 1024,          "memory_overallocate": 0,          "disk": 10240,          "disk_overallocate": 0,          "upload_size": 100,          "daemon_listen": 8080,          "daemon_sftp": 2022,          "daemon_base": "/var/lib/pterodactyl/volumes",          "created_at": "2026-09-22T14:45:25+00:00",          "updated_at": "2026-09-22T14:45:25+00:00",          "servers_count": 0,          "allocated_resources": {            "memory": 0,            "disk": 0          },          "relationships": {            "location": {              "object": "location",              "attributes": {                "id": 16053,                "short": "yXYh3ig7",                "long": "DtTf5dbTXXUq1fV3VBHWMKFch7pKkxN4",                "nodes_count": 0,                "servers_count": 0,                "created_at": "2026-09-22T14:45:26+00:00",                "updated_at": "2026-09-22T14:45:26+00:00",                "relationships": {                  "nodes": {                    "object": "list",                    "data": [                      {}                    ]                  }                }              },              "meta": {                "resource": "https://panel.example.com/api/admin/locations/1"              }            }          }        },        "meta": {          "resource": "https://panel.example.com/api/admin/nodes/1"        }      }    }  },  "meta": {    "resource": "https://panel.example.com/api/admin/servers/1"  }}