---
title: "CLI — Bare metal"
description: "Metalhost CLI commands for bare-metal hosts — browse, lease, power, ISO library, and release."
url: "https://metalhost.net/docs/developers/guides/cli-bare-metal"
---

# CLI — Bare metal

`metalhost baremetal` (aliases `bare-metal`, `bm`) leases and operates dedicated single-tenant hosts. Leases include **unlimited bandwidth** — no transfer metering or egress line items.

## Browse & order

| Command | What it does |
| --- | --- |
| `baremetal offers` | List leasable hosts with specs + monthly price. |
| `baremetal inventory` | Full published fleet (available + leased). |
| `baremetal quote --host HOST --billing-mode MODE` | Quote a lease. |
| `baremetal order NAME --host HOST --os-image ID` | Lease a host. |

Order flags: `--billing-mode`, `--autorenew`, `--custom-image-url`, `--hostname`, `--user`, `--ssh-key-name`, `--user-data`, `--ipv4-prefix-len`.

```
metalhost baremetal offers
metalhost baremetal quote --host hosts/dal-r740-01 --billing-mode monthly-1
metalhost baremetal order my-box \
  --host hosts/dal-r740-01 --os-image ubuntu-24-04 \
  --ssh-key-name projects/my-app/ssh-keys/laptop \
  --billing-mode monthly-1 --ipv4-prefix-len 32
```

## Instances

| Command | What it does |
| --- | --- |
| `baremetal list` | List your instances. |
| `baremetal get NAME` | Get an instance. |
| `baremetal release NAME` | End the lease. |
| `baremetal renew NAME` | Renew a prepaid monthly lease. |

## BMC operations

| Command | What it does |
| --- | --- |
| `baremetal power NAME --action on\|off\|reboot` | BMC power action. |
| `baremetal reinstall NAME --os-image ID` | Reinstall OS (wipes disk). |
| `baremetal console NAME` | KVM console URL + VNC password. |
| `baremetal rescue enter\|exit NAME` | Rescue mode. |
| `baremetal boot-device NAME --device disk\|cdrom\|pxe` | One-time boot device + power-cycle. |

## ISO library

| Command | What it does |
| --- | --- |
| `baremetal iso list` | List uploaded ISOs. |
| `baremetal iso upload-url --filename NAME` | Presigned PUT URL. |
| `baremetal iso from-url --url URL` | Import by URL. |
| `baremetal iso attach NAME --object-key KEY` | Mount virtual CD. |
| `baremetal iso detach NAME` | Eject virtual media. |

## What's next

- [Dashboard → Lease bare metal](https://metalhost.net/docs/dashboard/guides/bare-metal-lease.md)
- [Go SDK — Bare metal](https://metalhost.net/docs/developers/guides/sdk-bare-metal.md)
