Skip to main content

Sailboxes vs. Daytona: CPU and memory billing

Sail charges lower CPU and RAM rates than Daytona. Sail charges $0.015 per used vCPU-hour and $0.008 per GiB-hour of RAM used. RAM usage includes the Linux filesystem cache. Daytona charges $0.0504 per reserved vCPU-hour and $0.0162 per reserved GiB-hour while the sandbox runs. Both platforms stop CPU and RAM charges during pause. Daytona still charges for reserved disk. Sail stops local disk charges. Separate Sail volumes still have storage charges. Sail pricing · Daytona rates · Daytona billing states

Create the Sailbox

Install the Sail Python SDK on the machine that runs your controller. Run python -m pip install sail. Sign in with sail auth login. Create one Sailbox per session. This example saves its ID in a local file. In your application, store the ID with the agent session.

Transfer files

Daytona’s fs.upload_file(data, path) takes the file contents first. Sail’s fs.write(path, data) takes the destination first. Run this code from the directory that contains worker.py and job.json. The example worker reads /tmp/job.json and writes /tmp/result.json inside the Sailbox. Use the paths your worker needs.
Before you close the old workspace, copy uncommitted changes and any files you need. Export mounted volumes separately.

Run your existing worker

Replace sandbox.process.exec() with sb.run(). Read the output from result.stdout. Set the working directory and environment for each command. A new shell does not keep the previous shell’s cd or export settings.
Set up interactive terminals and previews separately. For a preview, configure the listener and access policy. Update the preview URL in your frontend.

Reconnect after sleep

An idle Sailbox sleeps automatically by default. Use the saved ID to find the same Sailbox. Read the result file. This operation wakes a sleeping Sailbox.
Sleep preserves files and memory. Termination deletes the Sailbox.

Check the worker output

Run your worker with the same input on Daytona and on Sail. Compare the command output and the files from both runs.