https://api.machines.dev) on a configurable interval.
Prerequisites
- Organization Admin role in Kestrel
- Fly.io account with app access
flyctlinstalled (to mint a token)
Setup
1
Create an API token
Create an org-scoped token so Kestrel can read machine state and perform machine actions across all apps in the org:A deploy token also works for a single app. Copy the token value.
2
Find your organization slug
personal.3
Connect in Kestrel
- Navigate to Integrations → Fly.io in your Kestrel dashboard
- Click Connect
- Paste the API token and enter the organization slug. The token is sent as a Bearer token to
https://api.machines.dev. - Choose a Poll Interval — faster intervals detect incidents sooner; the minimum is 30 seconds.
- Save — your Fly.io account appears as connected.
No webhook setup is required — there is nothing to configure inside Fly.io. Just keep the integration connected and Kestrel will poll for Machine lifecycle events.
How It’s Used
In Workflows
Trigger blocks:- Machine Stopped — fires when a Machine transitions to the stopped state
- Machine Failed / Crashed — fires when a Machine enters a failed state
- Machine Started — fires when a Machine starts
- Machine Created — fires when a new Machine is created
- Machine Destroyed — fires when a Machine is destroyed
- Get Machine — retrieve a Machine’s state, config, and metadata
- Start Machine — start a stopped Machine
- Stop Machine — stop a running Machine
- Restart Machine — restart a Machine
- List Machines — list Machines for an app
- Get App — retrieve app details
- Set Secrets — set app secrets
- Investigate Fly.io — run an AI investigation combining machine state, logs, and lifecycle history
{{signal.app_name}} and {{signal.machine_id}} from the trigger.
Example: A workflow triggers when a Machine crashes, fetches its state and logs, runs an AI investigation, restarts the Machine, and posts a summary to Slack.
Disconnecting
- Navigate to Integrations → Fly.io
- Click Disconnect
- Confirm the disconnection