Snapshots | Daytona
Snapshots
Snapshots are persistent, point-in-time captures of sandbox state, including the filesystem, installed packages, dependencies, and settings. A snapshot saves a sandbox’s state so you can restore it later, and any number of new sandboxes can start from the same snapshot.
Daytona provides default snapshots for creating sandboxes. You can also create snapshots from images, capture the state of existing sandboxes, or create warm pools for a snapshot:
- Create snapshots from an image: define the base operating system, language runtimes, packages, and project-level setup in an image or Dockerfile, and Daytona builds it into a snapshot you can use to create sandboxes
- Create snapshots from a sandbox: captures and persists a sandbox’s current state; container sandboxes capture filesystem state only ( cold snapshots), VM sandboxes capture filesystem and memory state ( hot snapshots)
- Warm pools: keep a configured number of pre-created, running sandboxes built from a snapshot; matching sandbox create requests claim one warm sandbox from the pool instantly instead of provisioning a new sandbox
Default snapshots
| Snapshot | vCPU | Memory | Storage | GPU | Sandbox Class |
|---|---|---|---|---|---|
daytona-small |
1 | 1GiB | 3GiB | Container | |
daytona-medium |
2 | 4GiB | 8GiB | Container | |
daytona-large |
4 | 8GiB | 10GiB | Container | |
daytona-gpu |
1 | 1GiB | 1GiB | 1 | GPU |
daytona-vm-small |
1 | 1GiB | 3GiB | Linux VM | |
daytona-vm-medium |
2 | 4GiB | 8GiB | Linux VM | |
daytona-vm-large |
4 | 8GiB | 10GiB | Linux VM | |
windows-small |
1 | 4GiB | 30GiB | Windows | |
windows-medium |
2 | 8GiB | 50GiB | Windows | |
windows-large |
4 | 16GiB | 50GiB | Windows |
- Go to Daytona Sandboxes ↗
- Click Create Sandbox
- Select a
snapshot - Click Create
from daytona import Daytona, CreateSandboxFromSnapshotParams
daytona = Daytona()
sandbox = daytona.create(
CreateSandboxFromSnapshotParams(
snapshot="daytona-small",
)
)
import { Daytona } from '@daytona/sdk'
const daytona = new Daytona()
const sandbox = await daytona.create({
snapshot: 'daytona-small',
})
require 'daytona'
daytona = Daytona::Daytona.new
sandbox = daytona.create(
Daytona::CreateSandboxFromSnapshotParams.new(
snapshot: 'daytona-small'
)
)
package main
import (
"context"
"github.com/daytona/clients/sdk-go/pkg/daytona"
"github.com/daytona/clients/sdk-go/pkg/types"
)
func main() {
client, _ := daytona.NewClient()
ctx := context.Background()
params := types.SnapshotParams{
Snapshot: "daytona-small",
}
_, _ = client.Create(ctx, params)
}
import io.daytona.sdk.Daytona;
import io.daytona.sdk.Sandbox;
import io.daytona.sdk.model.CreateSandboxFromSnapshotParams;
public class App {
public static void main(String[] args) {
try (Daytona daytona = new Daytona()) {
CreateSandboxFromSnapshotParams params = new CreateSandboxFromSnapshotFromParam();
params.setSnapshot("daytona-small");
Sandbox sandbox = daytona.create(params);
}
}
}
daytona create --snapshot daytona-small
curl 'https://app.daytona.io/api/sandbox' \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"snapshot": "daytona-small"
}'
Default snapshots include pre-installed Python and Node.js packages.
| Package | Version |
|---|---|
anthropic |
v0.120.2 |
beautifulsoup4 |
v4.14.3 |
claude-agent-sdk |
v0.2.130 |
openai-agents |
v0.19.4 |
daytona |
v0.203.0 |
django |
v6.0.1 |
flask |
v3.1.2 |
huggingface-hub |
v0.36.0 |
instructor |
v1.14.4 |
keras |
v3.13.0 |
langchain |
v1.2.7 |
llama-index |
v0.14.13 |
matplotlib |
v3.10.8 |
numpy |
v2.4.1 |
ollama |
v0.6.1 |
openai |
v2.53.0 |
opencv-python |
v4.13.0.90 |
pandas |
v2.3.3 |
pillow |
v12.1.0 |
pipx |
v1.8.0 |
pydantic-ai |
v1.47.0 |
python-lsp-server |
v1.14.0 |
requests |
v2.32.5 |
scikit-learn |
v1.8.0 |
scipy |
v1.17.0 |
seaborn |
v0.13.2 |
sqlalchemy |
v2.0.46 |
torch |
v2.10.0 |
transformers |
v4.57.6 |
uv |
v0.9.26 |
Create snapshots
Create a snapshot.
- Go to Daytona Snapshots ↗
- Click Create Snapshot
- Enter the snapshot
nameandimageof any publicly accessible image or container registry
- Snapshot name: identifier used to reference the snapshot
- Snapshot image: base image for the snapshot, must include either a tag or a digest (e.g.,
ubuntu:22.04); thelatest/lts/stabletags are not supported
- Snapshot image: base image for the snapshot, must include either a tag or a digest (e.g.,
- Click Create
from daytona import Daytona, CreateSnapshotParams
daytona = Daytona()
snapshot = daytona.snapshot.create(
CreateSnapshotParams(name="my-awesome-snapshot", image="ubuntu:22.04"),
)
import { Daytona } from "@daytona/sdk";
const daytona = new Daytona();
const snapshot = await daytona.snapshot.create({
name: "my-awesome-snapshot",
image: "python:3.12",
});
require 'daytona'
daytona = Daytona::Daytona.new
snapshot = daytona.snapshot.create(
Daytona::CreateSnapshotParams.new(name: 'my-awesome-snapshot', image: 'python:3.12')
)
package main
import (
"context"
"github.com/daytona/clients/sdk-go/pkg/daytona"
"github.com/daytona/clients/sdk-go/pkg/types"
)
func main() {
client, _ := daytona.NewClient()
ctx := context.Background()
snapshot, logCh, _ := client.Snapshot.Create(ctx, &types.CreateSnapshotParams{
Name: "my-awesome-snapshot",
Image: "python:3.12",
})
for range logCh {
}
}
import io.daytona.sdk.Daytona;
import io.daytona.sdk.model.Snapshot;
final class CreateSnapshot {
public static void main(String[] args) {
try (Daytona daytona = new Daytona()) {
Snapshot snapshot = daytona.snapshot().create("my-awesome-snapshot", "python:3.12");
}
}
}
daytona snapshot create my-awesome-snapshot --image python:3.11-slim --cpu 2 --memory 4
curl https://app.daytona.io/api/snapshots \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "my-awesome-snapshot",
"imageName": "python:3.11-slim",
"cpu": 2,
"memory": 4
}'
VM snapshots
Daytona provides methods to create VM snapshots for Linux VM and Windows.
VM snapshots are used to create VM sandboxes. VM snapshots are distinct from container snapshots and cannot be used to create container sandboxes. VM snapshots support VM-only capabilities such as creating a snapshot from a sandbox.
Create a Linux VM snapshot.
- Create a snapshot from an
image - Set the snapshot’s sandbox class to
LINUX_VM
from daytona import Daytona, CreateSnapshotParams, SandboxClass
daytona = Daytona()
snapshot = daytona.snapshot.create(
CreateSnapshotParams(
name="my-vm-snapshot",
image="ubuntu:22.04",
sandbox_class=SandboxClass.LINUX_VM,
)
)
import { Daytona, SandboxClass } from "@daytona/sdk";
const daytona = new Daytona();
const snapshot = await daytona.snapshot.create({
name: "my-vm-snapshot",
image: "ubuntu:22.04",
sandboxClass: SandboxClass.LINUX_VM,
});
require 'daytona'
daytona = Daytona::Daytona.new
snapshot = daytona.snapshot.create(
Daytona::CreateSnapshotParams.new(
name: 'my-vm-snapshot',
image: 'ubuntu:22.04',
sandbox_class: DaytonaApiClient::SandboxClass::LINUX_VM
)
)
package main
import (
"context"
"github.com/daytona/clients/sdk-go/pkg/daytona"
"github.com/daytona/clients/sdk-go/pkg/types"
)
func main() {
client, _ := daytona.NewClient()
ctx := context.Background()
sandboxClass := types.SandboxClassLinuxVM
snapshot, logCh, _ := client.Snapshot.Create(ctx, &types.CreateSnapshotParams{
Name: "my-vm-snapshot",
Image: "ubuntu:22.04",
SandboxClass: &sandboxClass,
})
for range logCh {
}
}
import io.daytona.sdk.Daytona;
import io.daytona.api.client.model.SandboxClass;
import io.daytona.sdk.model.Snapshot;
final class CreateVmSnapshot {
public static void main(String[] args) {
try (Daytona daytona = new Daytona()) {
Snapshot snapshot = daytona.snapshot().create("my-vm-snapshot", "ubuntu:22.04", SandboxClass.LINUX_VM);
}
}
}
daytona snapshot create my-vm-snapshot --image ubuntu:22.04 --sandbox-class linux-vm
curl https://app.daytona.io/api/snapshots \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "my-vm-snapshot",
"imageName": "ubuntu:22.04",
"sandboxClass": "linux-vm"
}'
Windows snapshots are used to create Windows sandboxes. They cannot be created from a base image. They are produced only through the snapshot from sandbox by starting from an existing Windows sandbox and capturing its current state as a snapshot.
GPU snapshots
Create a GPU snapshot. GPU snapshots are used to create GPU sandboxes.
GPU snapshots on shared regions belong to the earth region. Daytona selects the shared region, ignores the requested regionId, and reports earth in the snapshot regionIds. GPU snapshots on dedicated and custom regions keep their real region ID.
- Go to Daytona Snapshots ↗
- Click Create Snapshot
- Enter the snapshot
nameandimage - Select the
Allocate GPUcheckbox - Specify the
GPU type(s):NVIDIA H100NVIDIA H200NVIDIA B200NVIDIA B300NVIDIA RTX PRO 6000NVIDIA RTX 4090NVIDIA RTX 5090AMD Instinct MI355X
- Click Create
from daytona import CreateSnapshotParams, Daytona, Image, Resources
daytona = Daytona()
snapshot = daytona.snapshot.create(
CreateSnapshotParams(
name="my-gpu-snapshot",
image=Image.base("python:3.12"),
resources=Resources(cpu=1, memory=1, disk=1, gpu=1),
),
)
import { Daytona } from "@daytona/sdk";
const daytona = new Daytona();
const snapshot = await daytona.snapshot.create({
name: "my-gpu-snapshot",
image: "python:3.12",
resources: { cpu: 1, memory: 1, disk: 1, gpu: 1 },
});
require 'daytona'
daytona = Daytona::Daytona.new
snapshot = daytona.snapshot.create(
Daytona::CreateSnapshotParams.new(
name: 'my-gpu-snapshot',
image: 'python:3.12',
resources: Daytona::Resources.new(cpu: 1, memory: 1, disk: 1, gpu: 1)
)
)
package main
import (
"context"
"github.com/daytona/clients/sdk-go/pkg/daytona"
"github.com/daytona/clients/sdk-go/pkg/types"
)
func main() {
client, _ := daytona.NewClient()
ctx := context.Background()
snapshot, logCh, _ := client.Snapshot.Create(ctx, &types.CreateSnapshotParams{
Name: "my-gpu-snapshot",
Image: "python:3.12",
Resources: &types.Resources{
CPU: 1,
Memory: 1,
Disk: 1,
GPU: 1,
},
})
for range logCh {
}
}
import io.daytona.sdk.Daytona;
import io.daytona.sdk.Image;
import io.daytona.sdk.model.Resources;
import io.daytona.sdk.model.Snapshot;
final class CreateGpuSnapshot {
public static void main(String[] args) {
try (Daytona daytona = new Daytona()) {
Resources resources = new Resources();
resources.setCpu(1);
resources.setMemory(1);
resources.setDisk(1);
resources.setGpu(1);
Snapshot snapshot = daytona.snapshot().create(
"my-gpu-snapshot",
Image.base("python:3.12"),
resources,
null
);
}
}
}
curl https://app.daytona.io/api/snapshots \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "my-gpu-snapshot",
"imageName": "python:3.12",
"cpu": 1,
"memory": 1,
"disk": 1,
"gpu": 1
}'
Create snapshot from sandbox
Create a snapshot from a running or stopped sandbox.
Container sandboxes capture filesystem state only ( cold snapshot):
| Snapshot type | Include memory | Snapshot contents | Required sandbox state |
|---|---|---|---|
| Cold | false (default) |
Filesystem only | Stopped |
sandbox.create_snapshot("my-snapshot")
await sandbox.createSnapshot('my-snapshot')
sandbox.create_snapshot(name: 'my-snapshot')
err := sandbox.CreateSnapshot(ctx, "my-snapshot")
if err != nil {
return err
}
sandbox.createSnapshot("my-snapshot");
curl 'https://app.daytona.io/api/sandbox/{sandboxIdOrName}/snapshot' \
--request POST \
--header 'X-Daytona-Organization-ID: YOUR_ORGANIZATION_ID' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"name": "my-snapshot",
"includeMemory": false
}'
Snapshots from private registries
Create a snapshot from images from private container registries.
- Go to Daytona Registries ↗
- Click Add Registry and select your provider:
- Enter the required fields
- Go to Daytona Snapshots ↗
- Click Create Snapshot
- Enter the snapshot
nameand the fullimagereference, including the registry host and repository (e.g.my-registry.com/<repo>/custom-alpine:3.21)