Daytona
Daytona is a cloud development environment platform that lets you spin up isolated, pre-configured workspaces on demand. Use it as Mona's terminal backend for ephemeral, cloud-based execution.
When to use Daytona
- You need ephemeral workspaces that start clean every time
- You want pre-configured environments with specific tools
- You need workspaces accessible from multiple locations
- You want cloud-based isolation without managing Docker
Installation
The Daytona extra is included in the [all] install. If you installed the minimal bundle:
cd ~/.monoclaw/monoclaw-runtime
uv pip install -e ".[daytona]"
Authentication
- Sign up at daytona.io
- Generate an API key from your dashboard
- Configure MonoClaw:
monoclaw config set DAYTONA_API_KEY "your-key"
Configure as terminal backend
monoclaw config set terminal.backend daytona
Or in config.yaml:
terminal:
backend: daytona
daytona:
image: "ubuntu:24.04"
cpu: 4
memory: "8gb"
disk: "20gb"
timeout: 3600
How it works
When Mona needs to run a command:
- MonoClaw creates a Daytona workspace
- The command executes inside the workspace
- Output streams back to Mona
- The workspace can be destroyed or kept for reuse
Pre-configured environments
Use Daytona images with tools pre-installed:
terminal:
daytona:
image: "daytonaio/workspace-node:latest"
Available images include:
daytonaio/workspace-node— Node.js, npm, yarndaytonaio/workspace-python— Python, pip, uvdaytonaio/workspace-go— Go toolchaindaytonaio/workspace-rust— Rust, cargo
Workspace lifecycle
Ephemeral (default)
Workspaces are created per-command and destroyed after:
terminal:
daytona:
keep_alive: false
Persistent
Keep workspaces warm for faster execution:
terminal:
daytona:
keep_alive: true
max_idle: 600 # Keep alive for 10 minutes of idle
Cost optimization
- Use ephemeral workspaces for one-off commands
- Enable
keep_aliveonly for interactive sessions - Choose smaller CPU/memory configs for light tasks
- Destroy unused workspaces promptly
Troubleshooting
| Problem | Fix |
|---|---|
| "Daytona API key not set" | Run monoclaw config set DAYTONA_API_KEY |
| "Workspace creation failed" | Check your Daytona dashboard for quota limits |
| Slow startup | Use keep_alive or a lighter base image |
| Commands timeout | Increase timeout in config |