The Fly.io connector lets your AI agent act in each user's Fly.io account. Each user connects their own Fly.io access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 54 tools.
- Tools
- 54
- What they doRead · write · destructive
- 24 · 22 · 824 read22 write8 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Fly.io connection
In AgentKit > Connections, create a Fly.io connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'fly'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Fly.io:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'fly_get_current_token',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "fly"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Fly.io:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="fly_get_current_token",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Fly.io credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolfly_check_placementsSimulate where Machines could be placed without creating any.Read-onlyCheck Machine Placement
Simulate where Machines could be placed without creating any. Returns each candidate region with its count and concurrency. Read-only despite using POST. Use before fly_create_machine to pick a region with capacity.
Inputs
org_slugstringrequired- Slug of the Fly organization, or personal for your personal organization.
countinteger- Number of Machines to simulate. Defaults to 0, which returns the organization's limit per region.
regionstring- Region code, for example iad, ams or syd. Use fly_list_regions to see valid codes.
fly_get_appRetrieve one Fly app by name.Read-onlyGet App
Retrieve one Fly app by name. Returns the app's id, name, status, network, machine count and organization. Use fly_list_apps to browse apps.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
fly_get_certificateRetrieve the certificate for one hostname on a Fly app.Read-onlyGet Certificate
Retrieve the certificate for one hostname on a Fly app. Returns the hostname, status, DNS requirements, validation state and issued certificates. Use fly_list_certificates to browse.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
hostnamestringrequired- Hostname the certificate covers, for example www.example.com.
fly_get_current_tokenShow what the connected Fly API token can access.Read-onlyGet Current Token
Show what the connected Fly API token can access. Returns each token's organization, org slug, permitted apps and any Machine restriction. Use this to find the org_slug other tools need.
Inputs
This tool takes no inputs.
fly_get_machineRetrieve one Machine in a Fly app.Read-onlyGet Machine
Retrieve one Machine in a Fly app. Returns the Machine's id, name, state, region, config, image ref, events and checks. Use fly_list_machines to find Machine IDs.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
include_leasesboolean- When true, include the Machine's lease.
versionstring- 26-character Machine version ID. When set, returns that version of the Machine instead of the current one.
fly_get_machine_leaseRetrieve the current lease on a Machine.Read-onlyGet Machine Lease
Retrieve the current lease on a Machine. Returns the lease nonce, owner, description and expiry time. Use fly_create_machine_lease to take a lease.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
fly_get_machine_metadataRetrieve all metadata key-value pairs on a Machine.Read-onlyGet Machine Metadata
Retrieve all metadata key-value pairs on a Machine. Returns an object mapping each metadata key to its string value. Use fly_get_machine_metadata_value for a single key.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
fly_get_machine_metadata_valueRetrieve the value of one metadata key on a Machine.Read-onlyGet Machine Metadata Value
Retrieve the value of one metadata key on a Machine. Returns an object with the value. Use fly_get_machine_metadata to see all keys.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
keystringrequired- Metadata key to read, for example role.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
fly_get_secretRetrieve metadata for one secret on a Fly app.Read-onlyGet App Secret
Retrieve metadata for one secret on a Fly app. Returns the secret's name, digest and timestamps. The value is never returned. Use fly_list_secrets to browse.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
secret_namestringrequired- Name of the app secret, for example DATABASE_URL.
fly_get_volumeRetrieve one volume of a Fly app.Read-onlyGet Volume
Retrieve one volume of a Fly app. Returns the volume's id, name, state, region, size, block counts and attached Machine. Use fly_list_volumes to find volume IDs.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
volume_idstringrequired- ID of the volume, for example vol_18g2nqv2opd1rk54. Use fly_list_volumes to find volume IDs.
fly_list_appsList the Fly apps in an organization.Read-onlyList Apps
List the Fly apps in an organization. Returns each app's id, name, network, machine count and organization, plus a next_cursor when more pages remain. Use this to find app names for other tools. Use fly_get_app for one app's details.
Inputs
org_slugstringrequired- Slug of the Fly organization, or personal for your personal organization.
app_rolestring- Filter apps by role. Leave empty to list all apps.
cursorstring- next_cursor value from the previous page. Requires limit to be set.
limitinteger- Maximum number of apps to return (1 to 5000). Omit to return the API default.
fly_list_certificatesList the TLS certificates of a Fly app.Read-onlyList Certificates
List the TLS certificates of a Fly app. Returns each certificate's hostname, status, configured flags and issuance details, plus a next cursor when more remain. Use fly_get_certificate for one hostname.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
cursorstring- Pagination cursor from the previous response.
filterstring- Only return certificates whose hostname contains this text.
limitinteger- Results per page, default 25, at most 500.
fly_list_ip_assignmentsList the IP addresses assigned to a Fly app.Read-onlyList IP Assignments
List the IP addresses assigned to a Fly app. Returns each assignment's ip, region, service name, shared flag and creation time. Use fly_assign_ip to add one and fly_remove_ip to release one.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
fly_list_machine_eventsList recent lifecycle events for a Machine, such as start, stop, exit and restart.Read-onlyList Machine Events
List recent lifecycle events for a Machine, such as start, stop, exit and restart. Returns each event's id, type, status, source, timestamp and request details. Use this to debug why a Machine stopped or restarted.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
limitinteger- Number of events to return, at most 50. Defaults to 20.
fly_list_machine_processesList the processes running inside a Machine.Read-onlyList Machine Processes
List the processes running inside a Machine. Returns each process's pid, command, directory, cpu, rss and listening sockets. The Machine must be running.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
orderstring- Sort order: asc or desc.one of
ascdesc sort_bystring- Field to sort by, for example cpu or rss.
fly_list_machine_versionsList the configuration versions a Machine has had.Read-onlyList Machine Versions
List the configuration versions a Machine has had. Returns each version's id and the config that was in effect. Use fly_get_machine with a version to read one in full.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
fly_list_machinesList the Machines in a Fly app, optionally filtered by region or state.Read-onlyList Machines
List the Machines in a Fly app, optionally filtered by region or state. Returns each Machine's id, name, state, region, image, config and creation time. Use fly_list_org_machines to span all apps in an organization. Use fly_get_machine for one Machine.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
include_deletedboolean- When true, include Machines that were destroyed.
include_leasesboolean- When true, include each Machine's lease.
regionstring- Region code, for example iad, ams or syd. Use fly_list_regions to see valid codes.
statestring- Comma-separated list of states to keep: created, started, stopped, suspended.
summaryboolean- When true, return only summary fields for each Machine and omit the full configuration.
fly_list_org_machinesList the Machines across every app in a Fly organization.Read-onlyList Organization Machines
List the Machines across every app in a Fly organization. Returns each Machine's id, name, state, region, app and config. Use fly_list_machines to list one app's Machines.
Inputs
org_slugstringrequired- Slug of the Fly organization, or personal for your personal organization.
include_deletedboolean- When true, include Machines that were destroyed.
limitinteger- Maximum number of machines to return, at most 1000.
regionstring- Region code, for example iad, ams or syd. Use fly_list_regions to see valid codes.
statestring- Comma-separated list of Machine states to keep.
summaryboolean- When true, return only summary fields for each machine and omit the full configuration.
updated_afterstring- Only return items updated after this RFC 3339 timestamp.
fly_list_org_volumesList the volumes across every app in a Fly organization.Read-onlyList Organization Volumes
List the volumes across every app in a Fly organization. Returns each volume's id, name, state, region, size and app. Use fly_list_volumes to list one app's volumes.
Inputs
org_slugstringrequired- Slug of the Fly organization, or personal for your personal organization.
include_deletedboolean- When true, include Volumes that were destroyed.
limitinteger- Maximum number of volumes to return, at most 1000.
regionstring- Region code, for example iad, ams or syd. Use fly_list_regions to see valid codes.
statestring- Comma-separated list of Volume states to keep.
summaryboolean- When true, return only summary fields for each volume and omit the full configuration.
updated_afterstring- Only return items updated after this RFC 3339 timestamp.
fly_list_regionsList the Fly.io regions with their details.Read-onlyList Regions
List the Fly.io regions with their details. Returns each region's code, name, geo region, latitude, longitude and gateway availability, plus the nearest region. Use this to find valid region codes for creating Machines and volumes.
Inputs
This tool takes no inputs.
fly_list_secretsList the secrets set on a Fly app.Read-onlyList App Secrets
List the secrets set on a Fly app. Returns each secret's name, digest and timestamps. Values are never returned. Use fly_set_secret to add or change one.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
fly_list_volume_snapshotsList the snapshots of a volume.Read-onlyList Volume Snapshots
List the snapshots of a volume. Returns each snapshot's id, size, digest, status and creation time. Use fly_create_volume_snapshot to take a new one.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
volume_idstringrequired- ID of the volume, for example vol_18g2nqv2opd1rk54. Use fly_list_volumes to find volume IDs.
fly_list_volumesList the volumes of a Fly app.Read-onlyList Volumes
List the volumes of a Fly app. Returns each volume's id, name, state, region, size, attached Machine and encryption flag. Use fly_list_org_volumes to span all apps in an organization.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
summaryboolean- When true, return only summary fields for each volume and omit the full configuration.
fly_wait_machineBlock until a Machine reaches a state, or until the timeout.Read-onlyWait for Machine State
Block until a Machine reaches a state, or until the timeout. Returns ok, the state reached, the event id and the version. Use after fly_start_machine or fly_stop_machine. Blocks for up to 60 seconds.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
from_event_idstring- 26-character Machine event ID to start waiting after.
statestring- State to wait for. Defaults to started.one of
startedstoppedsuspendeddestroyedfailedsettled timeoutinteger- Seconds to wait before giving up. Defaults to 60.
versionstring- 26-character Machine version ID to wait on.
fly_assign_ipAssign a new IP address to a Fly app.WriteAssign IP Address
Assign a new IP address to a Fly app. Returns the created assignment with its ip, type, region and creation time. An egress_pair request returns an ip_pair instead of a single ip. Use fly_list_ip_assignments to see existing addresses first.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
typestringrequired- Type of address to allocate. Use v4 or v6 for a dedicated public address, shared_v4 for a shared IPv4, private_v6 for a private address, egress_v4 or egress_v6 for outbound addresses, or egress_pair for both outbound addresses.one of
v4v6shared_v4private_v6egress_v4egress_v6egress_pair networkstring- Name of a custom private network for the address. Leave empty for the default network.
org_slugstring- Slug of the Fly organization, or personal for your personal organization.
regionstring- Region code, for example iad, ams or syd. Use fly_list_regions to see valid codes.
service_namestring- Name of the service the address is assigned to. Leave empty for the whole app.
fly_check_certificateCheck a hostname's DNS and re-run certificate validation.WriteCheck Certificate
Check a hostname's DNS and re-run certificate validation. Returns the updated certificate state and DNS requirements. Use after changing DNS records, following fly_request_acme_certificate.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
hostnamestringrequired- Hostname the certificate covers, for example www.example.com.
fly_cordon_machineDisable a Machine's services so the Fly proxy stops routing requests to it.WriteCordon Machine
Disable a Machine's services so the Fly proxy stops routing requests to it. Returns no body on success. Use this to drain a Machine before maintenance. Use fly_uncordon_machine to route traffic again.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
fly_create_appCreate a new Fly app in an organization.WriteCreate App
Create a new Fly app in an organization. Returns the new app's id and creation timestamp. Use this before creating Machines or volumes. Returns a 422 error when the app name is already taken.
Inputs
namestringrequired- Unique app name, for example my-app. Lowercase letters, numbers and dashes only.
org_slugstringrequired- Slug of the Fly organization, or personal for your personal organization.
enable_subdomainsboolean- When true, enable subdomains for the app.
idempotency_keystring- Key that makes a retry of this exact create request safe: a second call with the same key and name returns the app the first call created.
networkstring- Name of a custom private network to place the app in. Leave empty for the default network.
fly_create_machineCreate and launch a Machine in a Fly app from a Docker image and configuration.WriteCreate Machine
Create and launch a Machine in a Fly app from a Docker image and configuration. Returns the new Machine's id, name, state, region, config and instance id. Use fly_update_machine to change an existing Machine. Capacity errors can occur; retry or pick another region.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
configobjectrequired- Machine configuration object. It needs an image (the Docker image to run) and usually a guest block for CPU and memory. It can also carry env (environment variables), services (ports and health checks), mounts (volumes), restart, metadata, checks, files and init settings. Example: {"image": "flyio/hellofly:latest", "guest": {"cpu_kind": "shared", "cpus": 1, "memory_mb": 256}, "env": {"PORT": "8080"}, "services": [{"protocol": "tcp", "internal_port": 8080, "ports": [{"port": 443, "handlers": ["tls", "http"]}]}]}
lease_ttlinteger- Seconds to hold a lease on the new Machine, so it cannot be modified by others while you finish setup.
min_secrets_versioninteger- Minimum app secrets version the Machine must have available when it starts.
namestring- Unique name for the Machine. Leave empty and Fly generates one.
regionstring- Region code, for example iad, ams or syd. Use fly_list_regions to see valid codes.
skip_launchboolean- When true, create the Machine without starting it.
skip_secretsboolean- When true, do not inject app secrets into the Machine.
skip_service_registrationboolean- When true, skip registering the Machine's services with the Fly proxy.
fly_create_machine_leaseTake an exclusive lease on a Machine so other callers cannot modify it until the lease expires or is released.WriteCreate Machine Lease
Take an exclusive lease on a Machine so other callers cannot modify it until the lease expires or is released. Returns the lease nonce, description and expiry time. Keep the nonce, since releasing the lease needs it. Use fly_release_machine_lease when you are done.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
descriptionstring- Reason for the lease, shown to other callers.
ttlinteger- Seconds the lease stays valid.
fly_create_volumeCreate a persistent volume for a Fly app, optionally restoring a snapshot or forking another volume.WriteCreate Volume
Create a persistent volume for a Fly app, optionally restoring a snapshot or forking another volume. Returns the new volume's id, name, region, size, state and encryption flag. A volume attaches to one Machine in the same region.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
namestringrequired- Volume name, for example data. Lowercase letters, numbers and underscores.
regionstringrequired- Region code, for example iad, ams or syd. Use fly_list_regions to see valid codes.
auto_backup_enabledboolean- When true, take scheduled automatic snapshots. Fly defaults to true.
encryptedboolean- When true, encrypt the volume. Fly defaults to encrypted.
fstypestring- Filesystem type for the volume.
require_unique_zoneboolean- When true, place the volume in a hardware zone that holds no other volume of this app.
size_gbinteger- Volume size in gigabytes.
snapshot_idstring- ID of a snapshot to restore the new volume from.
snapshot_retentioninteger- Days to keep automatic snapshots.
source_volume_idstring- ID of an existing volume to fork the new volume from.
fly_create_volume_snapshotTake an on-demand snapshot of a volume.WriteCreate Volume Snapshot
Take an on-demand snapshot of a volume. Returns no body on success; use fly_list_volume_snapshots to see the snapshot once it appears. Use before risky changes such as fly_delete_volume.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
volume_idstringrequired- ID of the volume, for example vol_18g2nqv2opd1rk54. Use fly_list_volumes to find volume IDs.
fly_exec_machineRun a command inside a running Machine and wait for it to finish.WriteExecute Machine Command
Run a command inside a running Machine and wait for it to finish. Returns stdout, stderr, exit_code and exit_signal. The Machine must be started. Use fly_list_machine_processes to inspect what is already running.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
commandarrayrequired- Command and arguments as a list of strings, for example ["ls", "-la", "/app"].
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
stdinstring- Text to send to the command on standard input.
timeoutinteger- Seconds to let the command run before it is cancelled.
fly_extend_volumeGrow a volume to a larger size.WriteExtend Volume
Grow a volume to a larger size. Volumes cannot shrink. Returns the updated volume and needs_restart, which is true when the attached Machine must restart to use the new size. Use fly_get_volume to see the current size.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
size_gbintegerrequired- New total size in gigabytes. Must be larger than the current size.
volume_idstringrequired- ID of the volume, for example vol_18g2nqv2opd1rk54. Use fly_list_volumes to find volume IDs.
fly_request_acme_certificateRequest a free Let's Encrypt certificate for a custom hostname on a Fly app.WriteRequest ACME Certificate
Request a free Let's Encrypt certificate for a custom hostname on a Fly app. Returns the certificate record with DNS requirements and validation state. Point the hostname's DNS at the app first, then use fly_check_certificate to re-validate.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
hostnamestringrequired- Custom domain to secure, for example www.example.com.
fly_restart_machineRestart a Machine, stopping it with a signal and starting it again.WriteRestart Machine
Restart a Machine, stopping it with a signal and starting it again. Returns no body on success. Use fly_stop_machine and fly_start_machine to control the stop and start separately.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
signalstring- Unix signal used to stop the Machine.one of
SIGHUPSIGINTSIGQUITSIGKILLSIGUSR1SIGUSR2SIGTERM timeoutstring- How long to wait for the Machine to stop, as a duration such as 30s or a number of seconds.
fly_set_machine_metadata_valueCreate or overwrite one metadata key on a Machine.WriteSet Machine Metadata Value
Create or overwrite one metadata key on a Machine. Returns no body; the API replies 204 No Content. Use fly_update_machine_metadata to change several keys at once.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
keystringrequired- Metadata key to set, for example role.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
valuestringrequired- The string value to store for the key.
fly_set_secretCreate or overwrite one secret on a Fly app.WriteSet App Secret
Create or overwrite one secret on a Fly app. Returns the secret's name, digest, version and timestamps. Running Machines pick the new value up on their next update or restart. Use fly_delete_secret to remove one.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
secret_namestringrequired- Name of the app secret, for example DATABASE_URL.
valuestringrequired- The secret value to store. It cannot be read back later.
fly_signal_machineSend a Unix signal to the main process of a Machine.WriteSignal Machine
Send a Unix signal to the main process of a Machine. Returns no body on success. Use fly_stop_machine to shut a Machine down cleanly.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
signalstringrequired- Signal to send.one of
SIGABRTSIGALRMSIGFPESIGHUPSIGILLSIGINTSIGKILLSIGPIPESIGQUITSIGSEGVSIGTERMSIGTRAPSIGUSR1SIGUSR2
fly_start_machineStart a stopped or suspended Machine.WriteStart Machine
Start a stopped or suspended Machine. Returns no body on success. Use fly_wait_machine to wait until it reports started.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
fly_stop_machineStop a running Machine, optionally choosing the signal and the time to wait.WriteStop Machine
Stop a running Machine, optionally choosing the signal and the time to wait. Returns no body on success. Use fly_suspend_machine to keep a memory snapshot, or fly_delete_machine to remove it.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
signalstring- Unix signal used to stop the Machine. Defaults to the Machine's configured stop signal.one of
SIGHUPSIGINTSIGQUITSIGKILLSIGUSR1SIGUSR2SIGTERM timeoutstring- How long to wait for the Machine to stop, as a duration such as 30s.
fly_suspend_machineSuspend a Machine, taking a snapshot so the next start can resume from it instead of cold booting.WriteSuspend Machine
Suspend a Machine, taking a snapshot so the next start can resume from it instead of cold booting. Returns no body on success. Resuming is attempted but not guaranteed. Use fly_stop_machine for a normal stop.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
fly_uncordon_machineRe-enable a cordoned Machine's services so the Fly proxy routes requests to it again.WriteUncordon Machine
Re-enable a cordoned Machine's services so the Fly proxy routes requests to it again. Returns no body on success. Use after fly_cordon_machine.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
fly_update_machineUpdate a Machine's configuration, which replaces the config and restarts the Machine.WriteUpdate Machine
Update a Machine's configuration, which replaces the config and restarts the Machine. Returns the updated Machine with its new version, state and config. Use fly_get_machine first and send the full config you want, since the config is replaced rather than merged.
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
configobjectrequired- Machine configuration object. It needs an image (the Docker image to run) and usually a guest block for CPU and memory. It can also carry env (environment variables), services (ports and health checks), mounts (volumes), restart, metadata, checks, files and init settings. Example: {"image": "flyio/hellofly:latest", "guest": {"cpu_kind": "shared", "cpus": 1, "memory_mb": 256}, "env": {"PORT": "8080"}, "services": [{"protocol": "tcp", "internal_port": 8080, "ports": [{"port": 443, "handlers": ["tls", "http"]}]}]}
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
current_versionstring- The Machine's current version, as returned by get or a previous update. When set and no longer current, the update is rejected instead of overwriting newer changes.
lease_ttlinteger- Seconds to hold a lease on the Machine during the update.
min_secrets_versioninteger- Minimum app secrets version the Machine must have available when it starts.
namestring- New unique name for the Machine. Leave empty to keep the current name.
regionstring- Region code, for example iad, ams or syd. Use fly_list_regions to see valid codes.
skip_launchboolean- When true, update without starting the Machine.
skip_secretsboolean- When true, do not inject app secrets into the Machine.
skip_service_registrationboolean- When true, skip registering the Machine's services with the Fly proxy.
fly_update_machine_metadataSet or remove several metadata keys on a Machine in one call.WriteUpdate Machine Metadata
Set or remove several metadata keys on a Machine in one call. Keys you leave out stay unchanged. Returns no body; the API replies 204 No Content. A null or empty-string value removes that key. Use fly_set_machine_metadata_value to set one key.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
metadataobjectrequired- Object of metadata keys to string values to set. A null or empty-string value removes the key. Example: {"role": "web", "stale": ""}.
machine_versionstring- When set and the Machine's version has changed, the update fails with 412 instead of overwriting.
fly_update_volumeChange a volume's snapshot settings.WriteUpdate Volume
Change a volume's snapshot settings. Returns the updated volume. Use fly_extend_volume to change its size.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
volume_idstringrequired- ID of the volume, for example vol_18g2nqv2opd1rk54. Use fly_list_volumes to find volume IDs.
auto_backup_enabledboolean- When true, take scheduled automatic snapshots.
snapshot_retentioninteger- Days to keep automatic snapshots.
fly_delete_appDelete a Fly app by name, which also removes its Machines and volumes.DestructiveDelete App
Delete a Fly app by name, which also removes its Machines and volumes. Returns no body; the API replies 202 Accepted and deletion continues in the background. This cannot be undone, so confirm the app name first.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
fly_delete_certificateRemove the certificate and hostname from a Fly app.DestructiveDelete Certificate
Remove the certificate and hostname from a Fly app. Returns no body; the API replies 204 No Content. Traffic for that hostname stops being served over TLS.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
hostnamestringrequired- Hostname the certificate covers, for example www.example.com.
fly_delete_machineDestroy a Machine in a Fly app.DestructiveDelete Machine
Destroy a Machine in a Fly app. Returns no body on success. This cannot be undone. A running Machine must be stopped first unless force is true. Use fly_stop_machine to keep it.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
forceboolean- When true, kill the Machine even if it is running.
fly_delete_machine_metadata_keyRemove one metadata key from a Machine.DestructiveDelete Machine Metadata Key
Remove one metadata key from a Machine. Returns no body; the API replies 204 No Content. Use fly_update_machine_metadata to remove several keys at once.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
keystringrequired- Metadata key to remove, for example role.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
fly_delete_secretRemove one secret from a Fly app.DestructiveDelete App Secret
Remove one secret from a Fly app. Returns the new secrets version. Running Machines keep the old value until their next update or restart.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
secret_namestringrequired- Name of the app secret, for example DATABASE_URL.
fly_delete_volumeDestroy a volume of a Fly app and its data.DestructiveDelete Volume
Destroy a volume of a Fly app and its data. Returns the deleted volume's details. This cannot be undone. The volume must be detached from any Machine. Use fly_create_volume_snapshot first to keep a copy.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
volume_idstringrequired- ID of the volume, for example vol_18g2nqv2opd1rk54. Use fly_list_volumes to find volume IDs.
fly_release_machine_leaseRelease a lease you hold on a Machine.DestructiveRelease Machine Lease
Release a lease you hold on a Machine. Returns no body on success. Needs the nonce returned by fly_create_machine_lease.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
machine_idstringrequired- ID of the Machine, for example 148ed599e12589. Use fly_list_machines to find Machine IDs.
noncestringrequired- The lease nonce returned when the lease was created.
fly_remove_ipRelease an IP address from a Fly app.DestructiveRemove IP Assignment
Release an IP address from a Fly app. Returns no body; the API replies 204 No Content. Use fly_list_ip_assignments to find the address. Releasing a dedicated address cannot be undone.
- Idempotent
Inputs
app_namestringrequired- Name of the Fly app, for example my-app. Use fly_list_apps to find app names.
ipstringrequired- The IP address to release, exactly as shown by fly_list_ip_assignments, for example 2a09:8280:1::1:2345.
No tools match.