---
title: "Guides"
description: "Task-oriented How-To guides for getting things done with Freestyle."
url: "/docs/guides"
---

Guides are short, task-oriented recipes — each one walks through a single "How do I…"
end to end. For complete API and concept reference, see the [Docs](https://www.freestyle.sh/docs).

- [How to Run Node.js in a Sandbox](https://www.freestyle.sh/docs/guides/run-nodejs-in-a-sandbox): Build a reusable VM snapshot with the Node.js runtime, then run as many JavaScript snippets as you like on one long-lived sandbox VM.
- [How to Run Claude Code in a Sandbox](https://www.freestyle.sh/docs/guides/run-claude-code-in-a-sandbox): Bake the Claude Code CLI into a VM snapshot, run it interactively over the PTY API, run one-off prompts, and drive it from the Claude Agent SDK with spawnClaudeCodeProcess.
- [How to Run GitHub Copilot in a Sandbox](https://www.freestyle.sh/docs/guides/run-github-copilot-in-a-sandbox): Run the GitHub Copilot CLI headless inside a sandbox and drive it from the Copilot SDK over a private VPC — or from your own machine over a WireGuard VPN. The runtime link is raw-TCP JSON-RPC, so it needs VPC reachability and a fine-grained Copilot token, not an HTTPS domain or a classic PAT.
- [How to Run Docker in a Sandbox](https://www.freestyle.sh/docs/guides/run-docker-in-a-sandbox): Bake the Docker Engine and Compose plugin into a VM snapshot, then boot sandboxes that run containers and multi-service docker compose stacks — with native overlayfs storage, cgroup v2, and published ports — and stream container logs live.
- [How to Run OpenClaw in a Sandbox](https://www.freestyle.sh/docs/guides/run-openclaw-in-a-sandbox): Install OpenClaw in a VM snapshot, run its agent gateway under systemd, and open the web UI in your browser over a Freestyle domain with token auth — HTTP and WebSocket proxied directly. Bring an OpenAI key for the model.
- [How to Give Your Mastra Agent a Sandbox](https://www.freestyle.sh/docs/guides/give-your-mastra-agent-a-sandbox): Give a Mastra agent a fresh Linux VM to work in by implementing Mastra's Workspace sandbox interface on Freestyle — then watch a computer-use agent inspect the machine, write code, and run it. Bring a model API key.
- [How to Give Your OpenAI Agent a Sandbox](https://www.freestyle.sh/docs/guides/give-your-openai-agent-a-sandbox): Give an OpenAI Agents SDK agent a fresh Linux VM by implementing the SDK's SandboxClient on Freestyle — run commands, and turn any port the agent serves into a real HTTPS domain. Bring an OpenAI key.
- [How to Run a Web Terminal in a Sandbox](https://www.freestyle.sh/docs/guides/run-a-web-terminal-in-a-sandbox): Stream a VM's PTY to the browser — bridge it to an xterm.js client through a small WebSocket proxy (read-only or interactive), or bake ttyd into a snapshot.
- [How to Run Python in a Sandbox](https://www.freestyle.sh/docs/guides/run-python-in-a-sandbox): Build a reusable VM snapshot with Python, then run many scripts on one long-lived, isolated sandbox VM.
- [How to Run Postgres in a Sandbox](https://www.freestyle.sh/docs/guides/run-postgres-in-a-sandbox): Build a snapshot with PostgreSQL already running, then boot a VM and run SQL queries against the live database.
- [How to Run Bun in a Sandbox](https://www.freestyle.sh/docs/guides/run-bun-in-a-sandbox): Bake the Bun runtime into a VM snapshot, then reuse one sandbox VM to run as much TypeScript and JavaScript as you like.
- [How to Run Python with uv in a Sandbox](https://www.freestyle.sh/docs/guides/run-python-with-uv-in-a-sandbox): Bake uv into a VM snapshot, then reuse one sandbox to run many Python scripts with a small helper.
- [How to Run MongoDB in a Sandbox](https://www.freestyle.sh/docs/guides/run-mongodb-in-a-sandbox): Bake a running MongoDB server into a VM snapshot, then run real document insert and find queries inside an isolated sandbox with no startup wait.
- [How to Run a Vite Dev Server in a Sandbox](https://www.freestyle.sh/docs/guides/run-vite-in-a-sandbox): Bake a Vite dev server into a VM snapshot, run it under systemd, and open it on a public domain.
- [How to Run PHP in a Sandbox](https://www.freestyle.sh/docs/guides/run-php-in-a-sandbox): Bake the PHP runtime into a VM snapshot, boot one VM, and run many PHP scripts on it with an isolated, reusable runPhp() helper — then serve PHP over a public domain from the same snapshot.

- [How to Run a Jupyter Notebook Server in a Sandbox](https://www.freestyle.sh/docs/guides/run-jupyter-in-a-sandbox): Bake JupyterLab into a VM snapshot, boot it as a systemd service, and open the notebook on a public domain.
- [How to Run VS Code in the Browser in a Sandbox](https://www.freestyle.sh/docs/guides/run-vs-code-in-a-sandbox): Bake code-server — VS Code in the browser — into a VM snapshot, run it under systemd, and open the editor on a public domain.
- [How to Run Go in a Sandbox](https://www.freestyle.sh/docs/guides/run-go-in-a-sandbox): Bake the Go toolchain into a reusable VM snapshot, then run as many Go programs as you like on one long-lived sandbox VM.
- [How to Run a Next.js Dev Server in a Sandbox](https://www.freestyle.sh/docs/guides/run-nextjs-in-a-sandbox): Bake a Next.js dev server into a VM snapshot, run it under systemd, and open it on a public domain — binding 0.0.0.0 and allowing the dev origin so the App Router app loads with HMR over HTTPS.
- [How to Run Java in a Sandbox](https://www.freestyle.sh/docs/guides/run-java-in-a-sandbox): Bake the JDK into a VM snapshot, boot one VM, and run many Java programs on it with an isolated, reusable runJava() helper — then serve a Java HTTP server from the same snapshot over HTTPS.
- [How to Run Deno in a Sandbox](https://www.freestyle.sh/docs/guides/run-deno-in-a-sandbox): Bake the Deno runtime into a VM snapshot, then reuse one isolated sandbox to run as many TypeScript snippets as you like — or boot the same snapshot as a public HTTP server.
- [How to Run Ruby in a Sandbox](https://www.freestyle.sh/docs/guides/run-ruby-in-a-sandbox): Build a reusable VM snapshot with the Ruby runtime, then run as many Ruby scripts as you like on one long-lived sandbox VM.
- [How to Run Redis in a Sandbox](https://www.freestyle.sh/docs/guides/run-redis-in-a-sandbox): Bake a running Redis server into a VM snapshot, then create fresh sandboxes that serve key-value queries instantly with no startup step.
