# Sandbox lifetime and your data

Choose how long a sandbox lasts, what warnings you get, what happens at expiry, and which data survives.

## Choose a lifetime

Each sandbox lives 8 hours today; 12 and 24 hour lifetimes are coming soon. Once Runzivo offers them, you choose 8 hours (the default), 12 hours or 24 hours when you create a sandbox. 24 hours is the maximum.

While only 8 hours is offered, the timer starts when the sandbox first starts. Once 12 and 24 hours are offered, it starts when the sandbox first becomes running, not when you create it. Stopping and starting, restarts and reconnecting do not reset or pause the timer. Stopped time counts.

A lifetime cannot be extended, by you or by Runzivo staff. To keep working after expiry, create a new sandbox.

12 and 24 hours are offered only after Runzivo turns them on for an environment. Until then only 8 hours is offered. The lifetimes field of the list response shows what you can choose now. We have not set a date.

If a sandbox's very first start fails after its disk was created and it never runs, it is still removed. Its deadline is then counted from that first start request: the lifetime plus 5 minutes.

## Set and read the lifetime

- Portal: the create form has a lifetime picker. It says: This sandbox will stop and its temporary files will be deleted when the timer expires. The sandbox page shows the exact expiry date and time, in local time and UTC, and a live countdown.
- CLI: rzv sandboxes create --lifetime 12h or --lifetime 24h, once offered (8 hours is the default). rzv sandboxes list and rzv sandboxes get show the expiry and the time left.
- API: create accepts lifetime_hours (8, 12 or 24). Other values are refused with HTTP 400 and invalid_lifetime. Each sandbox returns lifetime_hours, expires_at and remaining_seconds. expires_at is empty until the sandbox first runs. The list response has a lifetimes field with the lifetimes offered now, like sizes.

Terminal · see the lifetimes on offer, then read the expiry

```
rzv sandboxes list
rzv sandboxes get <sandbox-id>
```

[Sandbox API reference](https://runzivo.dev/docs/sandboxes-api/)

## Warnings before expiry

Runzivo warns you about 1 hour before expiry and again about 10 minutes before. Each warning is sent once.

Warnings go to workspace members who can view sandboxes. They are the notification event sandbox_expiring, titled Sandbox expiring soon. It is filed under the System category in the bell and appears in the Sandboxes group of the per-event channel preferences. Each person sees them in the in-app bell and on the channels they turned on for that event in notification preferences. Email is on by default.

[Notification settings](https://runzivo.dev/docs/notifications/)

## What happens at expiry

- The sandbox VM stops. Open terminal, exec, SSH and agent sessions end.
- Its compute is released. Compute billing stops at the expiry time. You are never billed for compute after the stop.
- Its temporary files are deleted: the sandbox system disk copy and its workspace disk.
- The sandbox then shows as Expired.

## If cleanup does not finish

If deleting the files fails, Runzivo retries automatically, waiting longer each time. If it still cannot finish, the sandbox has the status cleanup_pending and the portal shows it as Cleanup pending. Removal was asked for repeatedly and is not confirmed yet. Runzivo operations is alerted and keeps retrying. The sandbox is never reported as deleted until the files are gone.

No compute is billed while cleanup is pending.

## Keep your work

Everything inside a sandbox is temporary unless it is on a persistent disk. Before the timer ends, copy what you need to keep. Push it to git, download it, or put it on a persistent disk.

Do not rely on Runzivo to keep a copy of temporary sandbox files.

[Copy files out over SSH](https://runzivo.dev/docs/sandboxes-ssh/)

## Persistent disks (Coming soon)

Persistent disks are a separate product. They are not offered to customers yet.

When a sandbox with a persistent disk attached expires, the disk will be detached. It will never be deleted, and its files will stay on the disk.

A persistent disk will be billed for its storage while it exists, even when no sandbox uses it. No disk price is published yet. Pricing will be shown before the feature is offered.

If a persistent disk charge cannot be paid, a 30-day grace period will start. Runzivo will notify you when it starts, 7 days before the deletion and 1 day before it, each time with the exact deletion date and time in UTC. The disk and its files will be kept during the grace period, and paying the charge ends it. If the charge is still unpaid when the grace period ends, the disk and its files will be deleted.

[Persistent disks for sandboxes (Coming soon)](https://runzivo.dev/docs/sandboxes-persistent-disks/)

## Backups

After deletion, some data can remain in Runzivo backup copies for a limited time, until those copies expire on their normal schedule. Runzivo does not promise immediate deletion of every backup copy.

On this page and page tools
