Guides (how-tos by job)

Problem-oriented how-tos for everyday use and operating grain in production-like setups.

How-to guides assume grain is installed and you have created at least one sandbox. Each page covers one job.

New to grain? Start with the quick start.

Highlights

GuideOutcome
Grain Desktop (GUI)Optional operator console — sandboxes, shell, recipes tab, warm pool, activity, multi-Run
Sandbox recipesLibrary + official catalog · grain new --recipe · Desktop import/deploy
Pause, suspend, restoreFast create / warm pool / latency (--from, --from-pool)
FirecrackerSupported Linux+KVM backend (vFC-1 agent + vFC-2 TAP publish/fwd)
bash
curl -fsSL …/install.sh | bash -s -- --desktop   # Desktop release assets (v0.8.0+)
grain recipe search && grain new --recipe python-dev
# Linux+KVM: hypervisor: firecracker  →  see Firecracker guide
GuideOutcome
GitHub Actions (act)Run nektos/act in an isolated microVM — host Docker stays clean
k3s labSingle-node Kubernetes with --preset k3s, API port + kubeconfig
bash
grain act -- -j test
grain new --preset k3s -n lab -p --wait userdata

Everyday use

GuideWhen you need it
Images & golden bootsPull, import, bake, lean golden for pool/claim
Guest agentExec, shell, cp, fs without living in SSH
Networking & portsPublish ports, live forwards, SLIRP limits
Overlay networkGuest↔guest L2 on one host (network: overlay)
Guest architecturearm64 / amd64 guests (TCG cross-arch)
Virtio GPUvirtio-gpu-pci for guests
Mounts & sharesShare host directories into the guest
Profiles & presetsNamed defaults and docker / k3s / act presets

Security & ops

GuideAudience
Remote lab happy pathHost + laptop CLI: token, tunnel, remote-coding, sync, ports
Remote sandbox hostTeam box: systemd, firewall, reverse proxy, SDKs
Egress proxyAdmins locking down outbound HTTP(S)
MCP serverClaude Code / Codex / OpenCode / Grok Build tool host
SecretsHost secrets and inject into VMs
TroubleshootingWhen boot, agent, or QEMU misbehaves

More recipes

RecipeOutcome
Coding agentIsolated agent with a mounted repo
Docker socketDocker in the VM, socket on the host
CI ephemeralCreate → test → destroy