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
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 48hCredentials never travel through chat.
Never modify or delete anything on Fly.
Confirm before every paid action.
Prerequisites
flyCLI (flyctl), authenticated with the read-only token above viaFLY_API_TOKEN.maritimeCLI:npm i -g maritime-cli, thenexport MARITIME_TOKEN=mk_...jq.
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:
- The workload is an LLM-driven bot or assistant.
maritime templates --json
maritime create <name> --template <id-from-that-list> --json
- The workload is the app's own containerized code.
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)
- Pause the old app:
fly machine stop <machine-id> -a <app>. - Watch Maritime for a few days:
maritime logs <agent> --json. - Only when satisfied, retire the app:
fly apps destroy <app>. - Revoke the migration token:
fly tokens list --scope org
What stays on Fly
- Fly Postgres and anything else on the private network.
- Volumes and LiteFS.
- Anycast IPs, certificates, custom domains.
Official Fly.io documentation
Troubleshooting
maritime createexits with HTTP 402agent_unavailableon chat.- A secret nobody can find the value for: the secrets API never returns values.
Every fly command and flag in this skill was verified against the official Fly.io documentation.