> Fetch the index of every Tonbo docs page as Markdown at https://tonbo.dev/llms.txt

# 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`](https://tonbo.dev/docs/machines/troubleshooting/manage.md#region_not_offered) (422), “Machines are not offered in any region yet.”

Run a public 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](https://tonbo.dev/login) 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

```shell
npm i -g @tonbo/cli@^0.9
tonbo login
```

`tonbo 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

```shell
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-1` is the smallest shape, 1 vCPU and 2 GiB of memory. Without `--shape` the CLI takes m-8, at up to $0.6888 an awake hour against $0.0861; `tonbo machine shapes` lists them all.
- `--port 80:public` serves 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-1` names 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](#call) sends a key:

```shell
tonbo machine create hello --image public.ecr.aws/docker/library/nginx:1.28-bookworm --shape s-1 --port 80 --region us-east-1 --wait
```

## Call it

```shell
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](https://curl.se/docs/manpage.html#--retry) sends it again (see [the Machine is still starting](https://tonbo.dev/docs/machines/troubleshooting/call.md#machine_waking)).

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:

```shell
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](https://tonbo.dev/docs/machines/pricing.md)).

## Put it to sleep and wake it

```shell
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](https://tonbo.dev/docs/machines/sleep.md#continue)):

```shell
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](https://tonbo.dev/docs/machines/sleep.md)).

## Delete it

```shell
tonbo machine delete hello
```

Type `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:

```shell
tonbo api-key revoke <key-id> --yes
```

## Next steps

- [Run your own image](https://tonbo.dev/docs/machines/images.md): Build your own image, and run it with your command and env.
- [Keep data in its database and Volume](https://tonbo.dev/docs/machines/database.md): Keep what must last in the Machine’s own database.
- [Serve requests](https://tonbo.dev/docs/machines/requests.md): Private and public ports, keys, and what reaches your program.
- [Rules for Machines](https://tonbo.dev/docs/machines/rules.md): What to do and what not to, before you rely on a Machine.
