Pause your work, resume it tomorrow — your container picks up right where you left off.
By default, CodingBooth containers are removed when they exit. With --keep-alive, the container is preserved after exit so you can resume it later with all state intact.
./booth --keep-alive --name myproject
# ... work, then exit ...
./booth start myproject # resume where you left offBack to README
- Overview
- Default vs Keep-Alive
- Lifecycle Commands
- Common Workflows
- Persistence Rules
- Container Snapshots
CodingBooth provides a set of lifecycle commands for managing container state. These commands let you list running and stopped booths, resume stopped containers, restart running ones, and clean up when you are done.
All lifecycle features are built on top of Docker container management. CodingBooth labels every container it creates so lifecycle commands can reliably find and operate on the right containers.
run → RUNNING → exit → REMOVED (automatic cleanup)
The container is created with --rm. Once it exits, everything inside (installed packages, modified files outside mounted volumes) is gone.
run --keep-alive → RUNNING → exit → STOPPED (preserved)
↓
start → RUNNING (resumed)
↓
stop → STOPPED
↓
remove → REMOVED
The container persists after exit. You can resume it, restart it, or explicitly remove it when done.
Enable keep-alive via CLI flag or config:
./booth --keep-aliveOr in .booth/config.toml:
keep-alive = trueShow all booth-managed containers.
./booth list # all booths
./booth list --running # only running
./booth list --stopped # only stopped
./booth list --name-only # just container namesOutput includes: name, status, variant, port, code path, daemon, keep-alive, and creation time.
Resume a stopped booth container.
./booth start myproject # by name
./booth start --code ~/projects # by code path
./booth start --daemon myproject # resume in backgroundTarget resolution priority:
--name <name>- Positional argument
--code <path>- Default booth name from current directory
Stop a running booth container.
./booth stop myproject # graceful stop (10s timeout)
./booth stop --force myproject # immediate kill
./booth stop --timeout 30 myproject # custom timeoutIf the container was created without --keep-alive, stop also removes it automatically.
Restart a running booth in-place (same container, same configuration).
./booth restart myproject
./booth restart --timeout 30 myprojectFrom inside the container: Use
booth--restartto restart with full config re-processing (re-readsconfig.toml,Boothfile, rebuilds image if needed). This is different frombooth restarton the host, which keeps the same container and configuration. Seebooth run— Shutdown & Restart.
Explicitly delete a booth container.
./booth remove myproject # remove a stopped booth
./booth remove --force myproject # force-remove even if running
./booth remove container1 container2 # remove multipleBatch-remove all stopped booth containers.
./booth prune # prompts for confirmation
./booth prune --yes # skip confirmationAlso cleans up orphaned sidecar containers (DinD, sandbox) whose parent no longer exists.
# Day 1: Start a persistent booth
./booth --keep-alive --name myproject
# Work inside the container...
# Exit when done (Ctrl+D or exit)
# Day 2: Resume
./booth start myproject
# Day 3: Resume in the background (for web-based variants)
./booth start --daemon myproject./booth list# See what's stopped
./booth list --stopped
# Remove all stopped booths
./booth prune --yes
# Or remove a specific one
./booth remove myproject./booth --keep-alive --daemon --variant codeserver --name my-ide
# Access VS Code at http://localhost:10000
# Later, stop and resume
./booth stop my-ide
./booth start --daemon my-ideWhen a container is resumed via start or restart, its configuration is unchanged. The following cannot be modified without removing and recreating the container:
- Container name (
--name) - UI port (
--port) - Bind mounts (
-v) - Port mappings (
-p)
Use --persist-home to preserve /home/coder (IDE settings, shell history, app configs) across sessions via a Docker named volume. See Persist Home Directory for details.
To change these values, remove the container and run a new one:
./booth remove myproject
./booth --keep-alive --name myproject --port 9000Stopped keep-alive containers can be saved and shared using standard Docker commands.
docker commit <container-name> <image-name>:<tag># Export
docker export -o backup.tar <container-name>
# Import as a new image
cat backup.tar | docker import - my-image:restored# Save image to file
docker save -o my-image.tar <image-name>:<tag>
# Load on another machine
docker load -i my-image.tarSee the Docker documentation for more options.