Skip to main content
Startup variables control how your server starts, including game versions, memory limits, and application-specific settings.

Get Startup Variables

Retrieve all startup variables for a server.
string
required
The server identifier

Response

string
Human-readable variable name
string
Description of what the variable controls
string
Environment variable name (used for updates)
string
Default value from the egg configuration
string
Current value set for this server
boolean
Whether users can modify this variable
string
Laravel validation rules for the variable

Metadata Fields

string
The startup command with variables replaced with actual values
string
The raw startup command template with variable placeholders
object
Available Docker images for the server (read-only via client API)

Update Startup Variable

Update a single startup variable.
string
required
The environment variable name (e.g., MINECRAFT_VERSION)
string
required
The new value for the variable

Response

The updated startup command is returned in the metadata. Most variable changes require a server restart to take effect.

Variable Validation

Variables are validated according to their rules field. Common validation rules:
  • required - Value cannot be empty
  • string - Must be a string
  • integer - Must be an integer
  • boolean - Must be true/false or 1/0
  • in:value1,value2 - Must be one of the listed values
  • max:n - Maximum length or value
  • min:n - Minimum length or value
  • regex:pattern - Must match regex pattern

Validation Examples

Read-Only Variables

Some variables are marked as is_editable: false. These cannot be modified through the client API:
Attempting to update a read-only variable will result in an error:

Common Variables by Game

Minecraft (Java Edition)

Minecraft (Bedrock Edition)

Rust

Valheim

Counter-Strike 2

Startup Command Variables

Variables are used in the startup command template:
Common template variables:
  • {{SERVER_MEMORY}} - Memory limit in MB
  • {{SERVER_PORT}} - Primary server port
  • {{SERVER_IP}} - Server IP address
  • Any custom egg variable (e.g., {{MINECRAFT_VERSION}})

Best Practices

Update Variables Before Installation

For new servers, update variables before first start:

Restart After Changes

Most variable changes require a server restart:

Validate Before Updating

Check the current value and rules before updating: