A collection of random notes and gotcha’s I’ve found as I’ve been using Fly.io. For more info on my thoughts on Fly.io you can read A Year With Fly and Developer Delight

Flycast URLs should use internal binding not bind to local6pn

Private Networking

The service itself can bind to its own port by using fly-local-6pn:port

So in the case of honcho when tutor-gpt wants to hit the honcho api it will select http://honcho.flycast

CLI

The change the number of machines or temporarily bring down a service you can use the below command.

To bring down the service just make the number 0

fly scale count {num} -a {app name} -g {process group}

Machines vs Apps

As of the editing of this cheatsheet there is not full feature parity with the the fly apps platform and machines API. This became apparent to me when I was trying to set the restart policy of a machine. This is not possible from the fly.toml and instead I need to use the machines api to change the configuration of a specific machine.

I found this from this thread

Use this fly machine update to change created machines after launching an app.

Fly Machine Update Docs Fly Machine update Reference

To view the configuration of a specific machine run

fly machine status {id} -a {app-name} -d