Docs · Drives and data

Drives and data

Each user's work stays on a drive of their own, back on their next Mac. Here is what it costs, what NoMac keeps for a user, and how to delete it.

Their drive

  • 20 GB at ~/drive, made empty on the user's first Mac and saved when each Mac stops, build cache included, so their next build is incremental.
  • One drive per user, on one of their Macs at a time. A second Mac for the same user at the same time starts with access: { drive: "none" }.
  • require_drive: true ends a start rather than run without the drive.
  • A Mac that does not hold the drive yet downloads it as it starts: keep drives small, and use the Mac's own disk for scratch.

What it costs

An account has 10 drives included, your team's own drives counting too. Past them, each save of a user's drive costs 1¢ per GB of changed data, from your credit; a drive is never refused or replaced for it. Each drive.saved webhook carries the save's charge, and labels.get says whether a user's saves are charged.

What NoMac keeps for a user

Their drive
Until it is 90 days unused (a Mac running counts as use), then deleted, with a drive.deleted webhook.
File links
The upload and download links your user's Mac made, until they expire.
Their Macs' records
Times, cost and label, for your billing and ours.

Never your account's secrets, and nothing your user's agent put outside ~/drive.

Read and delete a user

const user = await nomac.labels.get("user-42");
// { macs: { running: [...], drive: { used_bytes, saved_at, saving, charged, expires_at } }, phones: { running: [...] } }

await nomac.labels.delete("user-42"); // when they delete their account with you

Deleting removes the user's drive and file copies, and their phones' workspaces and saved states; a repeat finds nothing left. It answers label_in_use while a Mac or phone of theirs runs, and label_busy while their last drive save or phone replay is still saving (try again in a minute). The records stay for billing.

Over REST: GET and DELETE /api/v1/labels/{label}. To bill a user, see Webhooks and billing.