Preview: Deploying applications on Machines with flyctl

We recently released Fly Machines - an API for directly launching and interacting with VMs worldwide.

We’ve started porting our standard deployment platform to use Machines! This will eventually replace the current deployment system, leading to faster deployments and more granular control over what happens at deploy time.

After grabbing the latest flyctl, fly machine launch will get you started and generate a fresh fly.toml. Then you can use fly deploy as you would normally. The default deployment strategy will update machines one by one.

Deployment is now orchestrated directly from flyctl. This means interrupting a deployment will leave your app in a weird state. This may sounds unusual, but flyctl is the testing ground for work on machines. It means you can see exactly how things work, and help guide the developer experience as features are added.

Evenutally, we’ll want to add more robust orchestration tooling on top of flyctl, once the experience feels right.

Check these out useful commands for working with individual machines:

fly machine update (useful for changing the VM size)
fly machine clone (useful for scaling your app or adding to other regions)
fly machine run (launch a machine directly into an app with specific config)
fly machine status (use -d to see details about an individual machine’s config)
fly machine start/stop

Now, the caveats!

Machine apps support:

  • fly ssh
  • fly secrets
  • [services] in fly.toml
  • [build] in fly.toml
  • [env] in fly.toml

Machine apps do not yet support:

  • release commands
  • specifying volumes in fly.toml
  • metrics
  • statics
  • fly vm commands
  • fly scale commands
  • Tracking releases
  • Saving application config to the Fly backend
  • Health checks

You might wonder how you can scale your app without fly scale. For now, you can use fly machine clone to make copies of existing machines, and to launch them in other regions. Then fly deploy will pick those up.

In the short term we plan to work on:

  • fly scale vm support
  • release_command support
  • Running multiple processes in groups of VMs under one app, aka process groups
  • more deployment strategies (only immediate and rolling are supported now

We release this is a major departure from how things work today, and that it’s raw. But we wanted to get it out there.

The new platform is an opportunity to work with customers to build the best experience possible - not just copy what we already did in the previous platform version. We look forward to your feedback and suggestions!


Hello. I was trying machines today and I got stock how start a vanilla ubuntu machine

I tried

fly machines run --port 80:8080/tcp:http --port 443:8080/tcp:http:tls --region mad --size shared-cpu-1x ubuntu:20.04

since I was planning to run a web server there but status is always stopped.

if I run the same command but I use the nginx:latest image it starts and I can ssh into it.


The VM needs to run a command in order to stay running, so you’d need to use an existing web server, or make a Dockerfile based on Ubuntu that installs what you need and runs the web server.

That command could just be something like tail -f /dev/null if you just want a generic VM to play around on. But for production usage, you’d want your web server to be the running command for various reasons.

1 Like