podspawn run
Create and attach to an ephemeral machine, optionally from a registered project branch
Creates an ephemeral machine, attaches to it, and destroys it when you disconnect. The podspawn equivalent of docker run --rm.
podspawn create instead.Usage
podspawn run <name> [--image IMAGE]
podspawn run <name> --project <registered-project> [--branch <git-branch>]Arguments
| Argument | Required | Description |
|---|---|---|
name | Yes | Name for the machine. Exists only for the duration of the session. |
Flags
| Flag | Default | Description |
|---|---|---|
--image | (from config) | Container image to use. Falls back to defaults.image in config, which defaults to ubuntu:24.04. |
--project | — | Registered project to clone into a temporary workspace before starting the machine. |
--branch | — | Git branch for project-backed runs. Uses --branch > Podfile branch: > repo default branch. Requires --project. |
Examples
# Spin up a throwaway machine
$ podspawn run scratch# Use a specific image
$ podspawn run test --image node:22# Review a branch in a fully disposable workspace
$ podspawn run review --project backend --branch release/1.4What happens
--project is set, clones the repo into a temporary workspace under ~/.podspawn/workspaces/.tmp-<name>-<unix-nano>//home/<username>, passwordless sudo)If the process is interrupted mid-run or mid-clone, podspawn may leave a .tmp-* workspace behind. Those directories are safe to remove manually once you confirm no matching session is still running.
No state is persisted after disconnect. If you need a machine that survives disconnects, use podspawn create instead.
Destroy-on-disconnect
The container lifecycle is tied to the session, not the TCP connection. If your network drops momentarily, podspawn does not immediately kill the container. The destroy happens when the session ends, which is when the shell process inside the container exits.
In server mode, podspawn spawn uses the same destroy-on-disconnect logic when configured.
How is this guide?