Skip to main content
A snapshot saves a machine’s installed software and its files, so that every machine you start from it is already set up. You can use one to set up a development environment once and start new machines from it later, to give several agents the same starting point, or to put a machine back to an earlier state when something goes wrong. When you want a copy of a machine right now, you can fork the machine instead, which does not need a snapshot.
The snapshot holds the installed software and the files under /data, which are your home directory, your workspace, and your saved sign-ins (gh, Claude, Codex, git, SSH). Memory and running processes are not saved, so a machine from a snapshot starts without the programs that were running. A snapshot is shared with the org of its machine. In your personal org that is only you, and in a workspace it is the workspace’s members. You can do the same in the dashboard. Choose Save snapshot in a machine’s menu, and then choose New machine from it, either right away or later on the Snapshots page.
Set up once, reuse everywhere. In the Playground, start a machine and install your tools, repos, and agent sign-ins in its terminal. Then choose Save as snapshot, and every machine you start from it is already set up.

Save a snapshot

You can save a machine while it runs or after you stop it, so you do not have to interrupt your work to take a snapshot. The CLI command waits until the snapshot is saved, which means the next command can already use it. When you want the command to return at once, add --no-wait.
What happens during the save depends on the state that the machine is in:
  • A stopped machine is saved as it is.
  • A running machine is saved live. It keeps running during the save, but the snapshot may leave out data that programs have not written to disk yet.
  • A running GPU machine cannot be saved live, so the save is refused with 409 until the machine is stopped. Add --restart and the CLI stops it, saves it, and starts it again, also when the save fails. It prints each step on stderr. Your files are kept, but the programs that were running must be started again. --restart does not stop a machine that can be saved live, and a stopped machine stays stopped.
  • A paused machine is refused with 409, and it cannot be stopped while it is paused. To save it, resume it and then save it live. Where live saves are off, resume it, then stop it, and then save it. Your files are kept either way.
You can also save only the installed software by adding --root-only. Machines that you start from that snapshot have the software, but they start with an empty home and workspace.

Start a machine from a snapshot

When you create a machine from a snapshot, the new machine starts with the snapshot’s software and files in place, so you can skip the setup. The CLI takes the snapshot’s name with --snapshot, and the API takes its ID as snapshotId.
For machines without a GPU, start at the size of the machine you saved the snapshot from when you can. At that size InstaBox can resume a copy of the system that is already booted, which takes a few seconds when that copy is available. At another size the machine boots its own copy from the snapshot’s disks, which takes several seconds longer. Machines with a GPU always boot from the disks, whatever their size. Only a snapshot whose template.version is from 2026-11-14 or later has a booted copy. An older one always boots from the disks. To check, see template.version in the output of:
To get the faster start, save a new snapshot from a machine created from the current template. A machine from a GPU machine’s snapshot gets the same GPU type and, by default, the same number of GPUs. To fan a prepared one-GPU setup out to bigger machines, ask for another count of that type: instabox create --name render-1 --snapshot gpu-base --gpu l4:4 (API: "gpu": "l4:4" with snapshotId). The size follows the count, as for a new GPU machine. Another GPU type is refused.

Wait for your app to start

create can return a few seconds before an app that starts at boot is listening. To wait for the app, poll it in a setup script, because create returns when the script ends.
wait-app.sh
With the API or an SDK, wait for the sandbox.started webhook, then run the same check inside the machine with exec.

Move your files to a new machine

A machine’s /data disk belongs to that machine, so deleting the machine deletes the disk. To keep your files and use them on another machine, save a snapshot and create the new machine from it. The snapshot is kept when you delete the old machine. Save the machine that holds the files. Stop its databases first, or stop the machine, so that everything they hold is written to disk before the save.
Create the new machine from the snapshot. Its /data holds the same files.
When the new machine has what you need, you can delete the old machine and the snapshot.
A snapshot carries the whole system disk as well as /data, so the new machine is a copy of the old one, not an empty machine with your files. Installed packages come along, and so does every service that the old machine started at boot. A database that was enabled on the old machine starts on the new one too, and a second copy that you start by hand then fails with Address already in use. To see what starts at boot, run systemctl list-unit-files --state=enabled on the new machine, and disable what you do not want.
To bring only some files to a machine that is already set up, copy them out of the old machine and into the new one instead. Files shows how.

List your snapshots

List your snapshots to see what you have saved, for example before you start a machine from one or delete one that you no longer need.

Browse a snapshot’s files

You can list the files in a snapshot without starting a machine from it, which lets you check what a snapshot holds before you use it. This command lists the snapshot’s /etc directory.

Delete a snapshot

Delete a snapshot when you no longer want to start machines from it. The machines that you already made from it are not affected. The CLI asks before it deletes, and you can skip the question with --yes.
The reverse also holds: when you delete a machine, its snapshots are kept.

Fork a machine

Fork a machine when you want a copy of it now and do not need to keep a snapshot for later. fork (or clone) copies a running or stopped machine into one new machine with the same template and size, and the command waits until the copy runs.
You can make up to 5 copies at once with --count, for example to try several approaches side by side. This command creates try-1, try-2, and try-3.
The server copies the disks on the machine’s host and boots the copies in a few seconds, so it does not need a snapshot. Memory and running programs are not copied, and the source machine is not changed. To see what a fork keeps and when it uses a snapshot, read Fork.
A paused machine cannot be forked or stopped, so resume it first. Each new machine counts toward your plan’s machine starts a minute, and fork waits that limit out. Each new machine also runs, so when your workspace cannot run --count more machines, fork creates none and says how many fit.
In three cases fork saves a snapshot and creates the copies from it: with an older server that has no native fork, with a source host that is under maintenance or full, and with --keep-snapshot. Afterwards it deletes the snapshot, also on error or Ctrl-C, unless you passed --keep-snapshot. Over the API, a native fork is POST /v1/machines/{id}/fork.

Restore a machine in place

Restore a machine when you want to undo what happened on it since a snapshot, such as a broken install or a failed experiment. restore puts the machine’s disks back to the snapshot’s. The machine keeps its ID, name, hostname, public port URLs, and ssh-config block, so everything that names the machine keeps working.
Everything on the root disk and /data since the snapshot is gone, running programs included. restore asks first, and --yes skips the question. To keep the machine as it is, use create --snapshot or fork instead.
When the machine is running, restore stops it first. The machine then boots from the restored disks, and the command waits until it runs. The API call needs the machines:write scope and answers with a restore operation. When you leave out --snapshot, restore uses the snapshot that the machine was created from. You can also add --stopped when you want the machine to stay stopped after the restore.
The machine gets new SSH host keys in a restore, so an SSH client that pinned the old keys asks you about them again.

Limits

  • The free plan keeps snapshots.
  • A machine has one /data disk, and you cannot attach that disk to another machine. A snapshot is the way to move your files to a new machine.
  • Older snapshots that hold only installed software start machines with an empty home and workspace, as --root-only snapshots do.
  • A restore is refused when the snapshot was saved with --root-only, or when its /data is larger than the machine’s disk. Grow the disk first with instabox resize <machine> --disk N.
On a server without live snapshots, a save of a running machine is refused too. Stop the running machine and then save it, or add --restart (api.instabox.sh has live snapshots on, except on GPU machines). If the save is refused because the machine has unsaved changes, stop it again and then retry.

Custom images

Turn a Docker image into a snapshot.

Run many agents in parallel

Run several agents from one set-up machine.