Quickstart: HTTPS service
Last updated 2 November 2026
Machines are not open yet. These pages describe Machines as they will open; until then, a create answers region_not_offered (422), “Machines are not offered in any region yet.”
Run a public arm64 image as an HTTPS service from your laptop: create a Machine, call it, put it to sleep, wake it and delete it, in a few minutes.
You need Node.js 22 or later for the CLI, curl and jq. The quickstart uses a few cents of your account’s monthly free usage.
Sign in
Sign in at tonbo.dev with GitHub or Google. A new account asks you to choose a username: it names your personal account, which holds your databases, streams and keys, and appears in the console’s addresses. You can change it once every 90 days.
Install the CLI and sign in
npm i -g @tonbo/cli@^0.9
tonbo logintonbo login signs you in through a browser on the same machine. On a machine without one, such as a remote server, set TONBO_API_KEY to a key that acts as you and is not narrowed, created in the console under API keys, and the CLI uses it instead.
Create a Machine
tonbo machine create hello --image public.ecr.aws/docker/library/nginx:1.28-bookworm --shape s-1 --port 80:public --region us-east-1 --wait--wait waits until the Machine is active: Tonbo pulls the image first, usually in under a minute. The command then prints the Machine: Power is asleep, since a new Machine waits asleep for its first request, and HTTPS is its address. If the creation fails, it says why.
- The image is nginx, built for
linux/arm64. --shape s-1is the smallest shape, 1 vCPU and 2 GiB of memory. Without--shapethe CLI takes m-8, at up to $0.6888 an awake hour against $0.0861;tonbo machine shapeslists them all.--port 80:publicserves nginx’s port 80 to anyone at the Machine’s name. Making a port public needs an owner or admin of the account, and in your personal account that is you.--region us-east-1names a region where Machines run.
A member of an organization without owner or admin rights creates it with a private port instead, and Call it sends a key:
tonbo machine create hello --image public.ecr.aws/docker/library/nginx:1.28-bookworm --shape s-1 --port 80 --region us-east-1 --waitCall it
URL=$(tonbo machine show hello --json | jq -r .hostnames.https)
curl -i --retry 5 "$URL/"The first request wakes the Machine, which starts nginx in seconds, and the answer is nginx’s welcome page. If it takes longer, the request is answered 503 with Retry-After, and --retry sends it again (see the Machine is still starting).
On a private port, create a key, keep it in a shell variable and send it. A variable named TONBO_API_KEY would override your tonbo login for the CLI too:
tonbo api-key create hello-quickstart --expires-in 15_days
KEY=tbo_...
curl -i --retry 5 -H "Authorization: Bearer $KEY" "$URL/"You are charged for what nginx uses while the Machine is awake. Asleep, it pays only for what its database stores, and nginx stores nothing there (see Pricing).
Put it to sleep and wake it
tonbo machine sleep hello --wait--wait waits until Power is asleep. Call it again, and the request wakes it; the wake starts nginx fresh (see What a wake starts with):
curl -i --retry 5 "$URL/"Left alone, it goes to sleep by itself, at most 10 minutes after its last request, and Tonbo may put it to sleep after about 2 minutes, since an idle nginx uses almost no CPU or network (see Sleep, wake and stop).
Delete it
tonbo machine delete helloType hello to confirm. Its disks and database go with it. If you created a key for a private port, revoke it with the id tonbo api-key create printed:
tonbo api-key revoke <key-id> --yesNext steps
- Run your own imageBuild your own image, and run it with your command and env.
- Keep data in its database and VolumeKeep what must last in the Machine’s own database.
- Serve requestsPrivate and public ports, keys, and what reaches your program.
- Rules for MachinesWhat to do and what not to, before you rely on a Machine.