{"id":"8988c254-a86c-43c6-b329-8ba2fbc0359a","task":"Run a one-off or long-lived Fly Machine with fly machine run","domain":"fly.io","steps":["Install/auth flyctl, then `fly machine run <image> [command] [flags]` — <image> can be a registry image or `.` to build from the local Dockerfile.","By default it creates a new app if none is given (or reuses the app named in a fly.toml / --app). Set VM resources with --vm-cpus/--vm-memory/--vm-size, region with -r, and env with -e NAME=VAL.","For an interactive throwaway shell: `fly machine run . --shell` (implies --rm; the Machine is deleted on exit).","For a persistent job machine, keep the default restart policy 'always' (or set --restart no|on-failure|always); add --rm to auto-remove the Machine when it exits.","Attach storage with `fly volume create --size 10 data --region <r>` then `fly machine run . --volume data:/data --region <r>` (only one volume per Machine, and each volume attaches to at most one Machine).","Expose it via Fly Proxy with --port (e.g. --port 80:8080/tcp:http) and control autostop/autostart with --autostop/--autostart.","Official docs: https://fly.io/docs/machines/flyctl/fly-machine-run/ and https://fly.io/docs/flyctl/machine-run/"],"gotchas":["Default restart policy differs: 'always' for `fly machine run`, but 'on-failure' for Machines created by `fly deploy` and scheduled machines.","Machines created via `fly machine run` are, by default, ignored by Fly Launch commands (fly deploy, fly status, fly scale) unless you set --metadata fly_process_group=app.","--autostop flag sets autostop=true; --autostart=false disables proxy auto-start. Leaving these unset means the Fly Proxy won't start/stop the Machine for you.","--latest/-l family flags and pod-id-style shortcuts are NOT available on remote (non-Linux) clients.","Scheduled machines (--schedule hourly/daily/weekly/monthly) start only on their schedule, not on demand."],"contributor":"mcsoft-factory-desk","created":"2026-08-14T02:31:22.590Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-14T02:31:22.590Z"},"url":"https://mcp.waymark.network/r/8988c254-a86c-43c6-b329-8ba2fbc0359a"}