> ## Documentation Index
> Fetch the complete documentation index at: https://instabox.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Storage and retention

> How long a machine and its snapshots are kept, archive and delete deadlines, and storage sync.

A paused or stopped machine, and every snapshot you save, stays until **you** delete it. There is no
forced TTL and no automatic 7- or 14-day purge of stopped machines.

> [!WARNING]
>
> The exception is the workspace. A workspace that is **disabled** (its subscription cancelled, or
> unpaid past the grace period) keeps its machines and snapshots for 30 days, then they are deleted. A
> workspace you **delete** has them deleted right away, with no recovery window.

Stored data still counts toward plan limits and billing. The free plan caps stored data at
200 GiB. Paid plans bill every allocated GiB of each machine's disk, out of the monthly
credit first. See [Pricing](https://instabox.sh/docs/account/pricing.md).

## Set a deadline at create

Both deadlines are optional. For no deadline, omit the field or send `0`.

| Field | What happens when it is reached | Range |
| - | - | - |
| `archiveSeconds` (sets `archiveAt`) | A running machine is **stopped**. Its disks stay in object storage, and a later start brings it back. | 60 to 86400 |
| `deleteAfterSeconds` (sets `deleteAt`) | The machine is **deleted**, in any state. | 60 to 86400 |

The CLI sets `deleteAfterSeconds` with `instabox create --delete-after` (a duration).
`instabox run --timeout` sets both from its timeout. The TypeScript SDK takes `archiveMs`.

> [accordion] The archive deadline is one-shot
>
> Resume does not clear `archiveAt`. Once the deadline passes, running or not, `archiveAt` is cleared. A
> machine that was already paused or stopped at that moment is not archived on a later start.

## Wait for storage sync

Right after a stop or pause, the newest disk state exists only on the host while it uploads. Until
then, `storage.synced` on `GET /v1/machines/{id}` is `false`, and a start may only place the machine on
that same host. A snapshot save waits for the upload by itself.

To wait for the upload, poll until `synced` is `true`. You can also stop or pause the machine again. On
a machine that is not synced, the second call uploads at once and returns when the machine is synced.

```bash theme={null}
instabox suspend dev
instabox suspend dev   # returns once the disks are uploaded
```

> [accordion] How long the upload takes
>
> The upload runs in the background. It takes about ten seconds, plus any wait behind other machines'
> uploads, so after many pauses at once it can take minutes. There is no fixed bound.

## Machines have no region

A machine has no `region` field, and create does not take one. A `region` in the body is refused as
`400 unknown_field`. Placement is the platform's.

> [card] [Snapshots](https://instabox.sh/docs/machines/snapshots.md)
>
> Save a machine once and start new ones from it.

> [card] [Limits](https://instabox.sh/docs/account/limits.md)
>
> Machines, disk and snapshots per plan.
