Servers
Choose, price, buy and manage servers from the command line.
Choose
layerbeat regions
layerbeat plans --region sgp # prices and stock in Singapore
layerbeat plans --region sgp --family fast
layerbeat images --region sgpThese work without signing in. Plans and images accept a name or an ID: SG-B224 or bv-sgp-…, "Ubuntu 24.04" or ubuntu-24-04.
Price
layerbeat quote --region sgp --plan SG-B224 --image "Ubuntu 24.04" --term 3--term is 1, 3 or 12 months; --currency USD or IDR picks the balance to pay from (default: your preference). See Pricing for how prices work.
Buy
In a terminal, just run:
layerbeat newIt asks for everything it needs:
- a name and location;
- the operating system or application, grouped as Linux, Windows Server and applications, each with its lowest monthly price;
- a plan, from a table of only the plans that fit that choice (Windows plans for Windows Server, with enough disk);
- a term, and how you'll log in.
It then shows the order and the exact total, and buys only after you answer y.
In a script, or to skip the questions, pass the choices as flags. Every purchase needs a yes: in a terminal the CLI shows the order and asks. Scripts and agents add --yes; without it, and without a terminal, nothing is bought (exit 2, confirmation_required).
layerbeat new agent-01 \
--region sgp --plan SG-B224 --image "Ubuntu 24.04" \
--ssh-key laptop \
--max-price 5 \
--yes --wait| Flag | Meaning |
|---|---|
--ssh-key NAME | Install this SSH key (repeatable). Add keys with layerbeat ssh-key add laptop (reads ~/.ssh/id_ed25519.pub) |
--password random | Log in with a generated password instead; read it once with layerbeat password reveal agent-01. custom asks for your own, hidden |
--os linux|windows | Only offer this system's images and plans. Otherwise it follows from --image or --plan |
--max-price AMOUNT | Refuse to buy if the quoted total is higher |
--yes, -y | Buy without asking (scripts and agents) |
--term 1|3|12 | Prepaid months |
--auto-renew | Renew automatically from your credit before it expires |
--tag KEY=VALUE | A label (repeatable) |
--idempotency-key KEY | Retry safely: the same key never buys twice. See Scripting |
--dry-run | Show the price and stop |
--wait | Wait until the server is running |
Windows
Windows servers have their own plans (layerbeat plans --region sgp --os windows) and log in as Administrator over Remote Desktop with a password, never SSH keys:
layerbeat new win-01 --region sgp --plan SG-W225 --image "Windows Server 2022" \
--password random --max-price 8 --yes --wait
layerbeat password reveal win-01 # once it is runningA Windows image on a Linux plan, or --ssh-key with Windows, is refused before anything is priced. See Windows servers.
See
layerbeat ls # your servers
layerbeat ls -q # names only, one per line
layerbeat get agent-01 # one server: status, IP, plan, expiry
layerbeat metrics agent-01 # CPU, memory, disk and network, last 24 hours
layerbeat traffic agent-01 # this month's transferPower
layerbeat stop agent-01 --wait
layerbeat start agent-01 --wait
layerbeat reboot agent-01
layerbeat console agent-01 # open the browser consoleEvery change is an operation. Without --wait the command returns at once with an operation ID; follow it with layerbeat wait op_....
Renew
layerbeat renewal show agent-01 # when it expires, and renewal prices
layerbeat renew agent-01 --term 3 --max-price 15
layerbeat renewal set agent-01 --auto-renew on --max-price 5Renewing asks for a yes in a terminal; scripts add --yes. A server bought at a launch price renews at that price. See Renewals.
Delete
layerbeat rm agent-01 --confirm agent-01Deleting is permanent and the remaining term is not refunded. --confirm must repeat the server's name.
Passwords
layerbeat password reveal agent-01 # only the buyer, while it is kept
layerbeat password forget agent-01 # delete the stored copy now