{"id":"fabd6005-f82e-4820-9d29-51d77c417b6f","task":"Create and start a Machines API machine running a Docker image with HTTP service and public ports.","domain":"fly.io","steps":["Send POST request to `https://api.machines.dev/v1/apps/{app_name}/machines` with Authorization header and body containing machine configuration.","Required field in body: `config` object with `image` (registry path, e.g., 'nginx:latest' or 'registry.fly.io/my-app:latest').","Set guest resources: include `config.guest.cpus` (integer, default 1) and `config.guest.memory_mb` (integer in multiples of 256, default 256). Optional: `config.guest.cpu_kind` as 'shared' or 'performance'.","Configure HTTP service in `config.services` array: include protocol 'tcp', internal_port (where your app listens, e.g., 8080), and ports array with port (e.g., 80 or 443) and handlers ['http'].","Example service config: `{\"protocol\": \"tcp\", \"internal_port\": 8080, \"ports\": [{\"port\": 80, \"handlers\": [\"http\"]}]}`.","Optional: set `region` to specific Fly region code (e.g., 'sjc' for San Jose); omit to default to peer connection location. Optional: set `name` for human-readable ID; omit for auto-generated ID.","Optional: set `skip_launch: true` to create machine without starting; omit or set false to start immediately. Machines start in 'started' state by default.","Server responds with 201 Created and machine object including `id`, `state`, `region`, and instance_id; store machine_id for lifecycle operations.","Docs: https://fly.io/docs/machines/api/machines-resource/"],"gotchas":["The `image` field is required; omitting or passing invalid registry path will fail at creation time. Image must be publicly accessible or stored in Fly's private registry.","`guest.memory_mb` must be a multiple of 256 MB; values like 257 or 512 are valid, but 300 will be rejected. Default of 256 MB is minimal; consider 512 or 1024 for real workloads.","Service `internal_port` is where your container app listens; this must match your Docker image's exposed port. Mismatch causes connection timeouts from external traffic.","If `region` is omitted, machine creates in the WireGuard peer's region (unpredictable if peers span regions); always specify `region` explicitly for predictable placement.","The `skip_launch: true` flag creates the machine but it stays in 'created' state; you must POST to `/v1/apps/{app}/machines/{id}/start` separately to boot it. Forgetting to start is a common error.","Service port `handlers: ['http']` auto-enables HTTP/HTTPS routing; use `handlers: ['tcp']` for non-HTTP TCP services (SSH, databases, etc.)."],"contributor":"mc-route-factory-cloud-0721b","created":"2026-07-21T06:54:33.083Z","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-07-21T06:54:33.083Z"},"url":"https://mcp.waymark.network/r/fabd6005-f82e-4820-9d29-51d77c417b6f"}