---
description: Practical guides for solving specific tasks with the Sandbox SDK 0.x.
title: How-to guides
image: https://developers.cloudflare.com/sandbox/sdk/guides/og.png?v=1c45ebe13abdbb9d
---

[Skip to content](#main-content)

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/sandbox/llms.txt  
> Use this file to discover all available pages before exploring further.

# How-to guides

Last updated Sep 30, 2026|Copy as Markdown| [View as Markdown](https://developers.cloudflare.com/sandbox/sdk/guides/index.md)| [Agent setup](https://developers.cloudflare.com/agent-setup/)

Note

This page documents Sandbox SDK 0.x for existing applications. For new applications, refer to [Sandboxes on Cloudflare](https://developers.cloudflare.com/sandbox/). To move an existing application to `@cloudflare/sandbox` 1.0, refer to [Migrate from Sandbox SDK 0.x](https://developers.cloudflare.com/sandbox/sdk/migrate/).

These guides show you how to solve specific problems and implement features with the Sandbox SDK. Each guide focuses on a particular task and provides practical, production-ready solutions.

[**Run background processes (Sandbox SDK 0.x)** Start and manage long-running services and applications with the Sandbox SDK 0.x.](https://developers.cloudflare.com/sandbox/sdk/guides/background-processes/)

[**Backup and restore (Sandbox SDK 0.x)** Snapshot a sandbox directory to R2 and restore it later with the Sandbox SDK 0.x.](https://developers.cloudflare.com/sandbox/sdk/guides/backup-restore/)

[**Browser terminals (Sandbox SDK 0.x)** Connect browser-based terminals to Sandbox SDK 0.x shells using xterm.js or raw WebSockets.](https://developers.cloudflare.com/sandbox/sdk/guides/browser-terminals/)

[**Use code interpreter (Sandbox SDK 0.x)** Execute Python and JavaScript code with rich outputs using the Sandbox SDK 0.x code interpreter.](https://developers.cloudflare.com/sandbox/sdk/guides/code-execution/)

[**Deploy a Sandbox application (Sandbox SDK 0.x)** Deploy a Sandbox SDK 0.x Worker and keep the npm package and container image on the same release line.](https://developers.cloudflare.com/sandbox/sdk/guides/deploy/)

[**Run Docker-in-Docker (Sandbox SDK 0.x)** Run Docker commands inside a Sandbox SDK 0.x container.](https://developers.cloudflare.com/sandbox/sdk/guides/docker-in-docker/)

[**Execute commands (Sandbox SDK 0.x)** Run commands with streaming output, error handling, and shell access in the Sandbox SDK 0.x.](https://developers.cloudflare.com/sandbox/sdk/guides/execute-commands/)

[**Expose services (Sandbox SDK 0.x)** Create preview URLs and expose ports for web services with the Sandbox SDK 0.x.](https://developers.cloudflare.com/sandbox/sdk/guides/expose-services/)

[**Watch filesystem changes (Sandbox SDK 0.x)** Monitor files and directories in real time with the Sandbox SDK 0.x to build development tools and automation workflows.](https://developers.cloudflare.com/sandbox/sdk/guides/file-watching/)

[**Work with Git (Sandbox SDK 0.x)** Clone repositories, manage branches, and automate Git operations with the Sandbox SDK 0.x.](https://developers.cloudflare.com/sandbox/sdk/guides/git-workflows/)

[**Manage files (Sandbox SDK 0.x)** Read, write, organize, and synchronize files in a sandbox with the Sandbox SDK 0.x.](https://developers.cloudflare.com/sandbox/sdk/guides/manage-files/)

[**Mount buckets (Sandbox SDK 0.x)** Mount S3-compatible object storage as local filesystems with the Sandbox SDK 0.x.](https://developers.cloudflare.com/sandbox/sdk/guides/mount-buckets/)

[**Handle outbound traffic (Sandbox SDK 0.x)** Intercept and handle outbound HTTP from Sandbox SDK 0.x sandboxes using Workers.](https://developers.cloudflare.com/sandbox/sdk/guides/outbound-traffic/)

[**Configure preview URLs on a custom domain (Sandbox SDK 0.x)** Set up wildcard DNS, routes, and TLS so Sandbox SDK 0.x exposePort preview URLs work on your domain.](https://developers.cloudflare.com/sandbox/sdk/guides/preview-urls-custom-domain/)

[**Stream output (Sandbox SDK 0.x)** Handle real-time output from commands and processes with the Sandbox SDK 0.x.](https://developers.cloudflare.com/sandbox/sdk/guides/streaming-output/)

[**WebSocket connections (Sandbox SDK 0.x)** Connect to WebSocket servers running in Sandbox SDK 0.x sandboxes.](https://developers.cloudflare.com/sandbox/sdk/guides/websocket-connections/)

[**Connect to Workers bindings (Sandbox SDK 0.x)** Access KV, R2, Durable Objects, and other bindings from a Sandbox SDK 0.x sandbox.](https://developers.cloudflare.com/sandbox/sdk/guides/workers-connections/)

## Related resources

- [Tutorials](https://developers.cloudflare.com/sandbox/sdk/tutorials/) - Step-by-step learning paths
- [API reference](https://developers.cloudflare.com/sandbox/sdk/api/) - Complete method documentation

Was this helpful?

YesNo

## On this page

[![](https://developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/sandbox/sdk/guides/#page","headline":"How-to guides","description":"Practical guides for solving specific tasks with the Sandbox SDK 0.x.","url":"https://developers.cloudflare.com/sandbox/sdk/guides/","inLanguage":"en","image":"https://developers.cloudflare.com/sandbox/sdk/guides/og.png?v=1c45ebe13abdbb9d","dateModified":"2026-09-30","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
