create_egg_variable
Add environment variables to game server eggs in Pterodactyl panels. Define custom settings like ports, configurations, and server parameters with validation rules for admin control.
Instructions
Add a new environment variable to an egg (admin action). The 'rules' field uses Laravel validation syntax (e.g., 'required|string|max:20'). Use list_nests and list_eggs to find the nest_id and egg_id. Requires Application API key.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nest_id | Yes | Nest ID that contains the egg (from list_nests) | |
| egg_id | Yes | Egg ID to add the variable to (from list_eggs) | |
| name | Yes | Display name for the variable (e.g. 'Server Port') | |
| description | Yes | Description of what this variable controls | |
| env_variable | Yes | Environment variable key (e.g. 'SERVER_PORT') | |
| default_value | Yes | Default value for the variable (e.g. '25565') | |
| user_viewable | Yes | Whether users can see this variable in the panel | |
| user_editable | Yes | Whether users can modify this variable in the panel | |
| rules | Yes | Laravel validation rules (e.g. 'required|string|max:20', 'required|integer|between:1,65535') |