api.server() to inspect and manage that instance. To change how servers are created, update the owning group or persistent server instead.
Find available capacity
UseServerQuery to find instances by source, state, host, or numerical ID. This example calculates the reported free slots across playable lobby servers:
getAllServers() without a query to return every instance, or use getServersByGroup("lobby") as a group-name shortcut. List methods return an empty list when nothing matches.
ServerQuery filters
ServerQuery filters
Repeated calls to a multi-value filter add values to the query.
ServerQuery
Match one or more group IDs.
ServerQuery
Match one or more lifecycle states.
ServerQuery
Match instances running on one serverhost.
ServerQuery
Match the instance of one persistent server.
ServerQuery
Match
SERVER or PROXY sources.ServerQuery
Match one or more group or persistent server names.
ServerQuery
Match sources with any supplied tag.
ServerQuery
Match one or more numerical IDs.
ServerQuery
Sort by
created_at, updated_at, numerical_id, or state.ServerQuery
Use
asc or desc.Find one server
Look up an instance by its unique ID, or by its group name and numerical ID:Get the current server
Code running inside a SimpleCloud-managed server can resolve its own instance:getCurrentServer() uses the SIMPLECLOUD_UNIQUE_ID environment variable and completes exceptionally when the current process is not associated with an instance.
Access the owning configuration
Every instance belongs to either a group or a persistent server.getServerBase() provides their shared configuration, while getGroup() and getPersistentServer() expose source-specific fields.
getGroup() and getPersistentServer() is available for an instance. Avoid the deprecated getServerGroup(), which throws for persistent server instances.
Update an instance
UpdateServerRequest changes only the fields you set:
playerCount, state, properties, minMemory, maxMemory, and maxPlayers. Changes apply to this instance, not its owning configuration. The platform normally reports state and playerCount; only set them when your integration owns that reporting.
Manage instance properties
Properties attach application data to one instance. Updates merge with the existing map.updateServerProperty to set one key and deleteServerProperties to remove several keys. Each method returns the resulting property map.
Stop an instance
Server model
string
required
Unique instance ID.
integer
required
Numerical ID within the source group or persistent server.
string | null
Source group ID, or
null for a persistent server instance.string | null
Source persistent server ID, or
null for a group instance.string
required
Serverhost running the instance.
string
required
Network that owns the instance.
string | null
Assigned IP address, or
null before one is available.integer | null
Assigned port, or
null before one is available.integer
required
Minimum memory in MB.
integer
required
Maximum memory in MB.
number | null
Current CPU usage percentage, or
null when unavailable.number | null
Current memory usage in MB, or
null when unavailable.integer | null
Current connected player count, or
null when unavailable.integer
required
Player limit for the instance.
ServerState
required
Current lifecycle state.
string
required
Creation timestamp in ISO 8601 format.
string
required
Last update timestamp in ISO 8601 format.
string | null
Last activity timestamp in ISO 8601 format, or
null when unavailable.Map<String, Object> | null
Instance properties, or
null when none are available.Blueprint | null
Reserved accessor. The current implementation returns
null; use the source configuration instead.ServerBase
required
Shared configuration from the source group or persistent server.
Group | null
Source group, or
null for a persistent server instance.PersistentServer | null
Source persistent server, or
null for a group instance.