Guides (how-tos by job)

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

How-to guides assume you already installed grain and created at least one sandbox. Each page solves a specific job.

If you are brand new, start with the quick start.

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, choose ubuntu/alpine/golden
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
Pause, suspend, restoreFree CPU or RAM while keeping work

Security & ops

GuideAudience
Egress proxyAdmins locking down outbound HTTP(S)
Remote sandbox hostTeam box: systemd, API token, SSH tunnels, SDKs
MCP serverClaude Code / Codex / OpenCode / Grok Build tool host
SecretsHost secrets and inject into VMs
FirecrackerLinux experimental backend
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