Docs: Migrate from Fly.io to Maritime | Maritime

Migrate from Fly.io to Maritime

Migrate agent-shaped workloads from Fly.io to Maritime, including scheduled Machines, fly.toml worker processes, and bots or automations running as ordinary Fly apps. This is the complete runbook, written to be followed by a coding agent or a human in a terminal.

Safety rules, non-negotiable

  1. Read-only Fly token only. Ask the user to mint a scoped read-only org token; that is all inventory needs:

    fly tokens create readonly -x 48h
    
  2. Credentials never travel through chat.

  3. Never modify or delete anything on Fly.

  4. Confirm before every paid action.

Prerequisites

Step 1: Inventory

All of these are read operations, safe under the readonly token:

# Every app in the organization
fly apps list

# Per app: overall state and the machines behind it
fly status -a <app>
fly machine list -a <app>

# Live app config as deployed
fly config show -a <app>

# Secret NAMES and digests only
fly secrets list -a <app>

Scheduled Machines are created with fly machine run <image> --schedule hourly|daily|weekly|monthly.

Step 2: Map

Fly concept Maritime concept
Fly app (container per Machine) Agent (bring-your-own code)
Scheduled Machine (--schedule) Agent + trigger (cron schedule)
fly.toml [processes] worker Its own agent, one per process
fly secrets Agent env vars, AES-encrypted at rest
fly logs Agent logs (maritime logs)

Step 3: Recreate on Maritime

Pick the target shape. Two honest cases:

   maritime templates --json
   maritime create <name> --template <id-from-that-list> --json
   maritime create <name> --repo https://github.com/<user>/<repo> --json

Before deploying, READ the Dockerfile.

Step 4: Verify before touching Fly

Do not proceed until the Maritime side has done the job at least once:

maritime status <agent> --json | jq -r '.status'
maritime chat <agent> "run your task once now and report what you did" --json | jq -r '.response'
maritime logs <agent> --level error --json

Step 5: Cutover and decommission (human runs every command here)

  1. Pause the old app: fly machine stop <machine-id> -a <app>.
  2. Watch Maritime for a few days: maritime logs <agent> --json.
  3. Only when satisfied, retire the app: fly apps destroy <app>.
  4. Revoke the migration token: fly tokens list --scope org

What stays on Fly

Official Fly.io documentation

Troubleshooting

Every fly command and flag in this skill was verified against the official Fly.io documentation.