Deploying servers
Create, list, resize and delete servers.
Create
POST /v1/servers
json{ "name": "lobby-smp", "eggId": 3, "instanceId": "0e8f...", // optional — auto-picked if omitted "region": "USA", // optional — null = auto "ramMb": 2048, "cpuPercent": 200, "diskMb": 10240, "environment": { "MINECRAFT_VERSION": "1.21" }, // optional "dockerImage": "ghcr.io/..." // optional }
Cloud API validates the spec against platform limits, checks you have at least ~24h of runway in credits, runs the stock engine to choose a node, provisions the server, and records it. The response is the created server:
json{ "id": "f3c1...", "identifier": "a1b2c3d4", "name": "lobby-smp", "region": "USA", "resources": { "ramMb": 2048, "cpuPercent": 200, "diskMb": 10240 }, "priceCentsPerHour": 4, "status": "active", "createdAt": "2026-06-13T12:00:00Z" }
List & get
bashGET /v1/servers # your servers GET /v1/servers/:id # one server (+ live panel state)
Resize
PATCH /v1/servers/:id updates the resource limits and recomputes the hourly price. The change is applied to the panel immediately.
tsawait cloud.servers.resize(id, { ramMb: 4096, cpuPercent: 400, diskMb: 20480 });
Delete
DELETE /v1/servers/:id removes the server from the panel and marks it deleted. Hourly billing stops at the next pass.
Environment variables
Each egg declares its own variables. Fetch them before deploying so you can supply non-default values:
tsconst egg = await cloud.egg(instanceId, eggId); egg.variables.forEach(v => console.log(v.env, v.default, v.editable));
Any variable you omit falls back to the egg's default.