Overview

Fly.io Machines offer a platform for deploying and orchestrating containerized applications as lightweight virtual machines across a global network. Unlike traditional serverless functions or managed container services that abstract away the underlying infrastructure, Fly.io Machines provide a lower-level primitive, giving developers direct control over VM instances and their lifecycle. This architecture is designed for applications requiring close proximity to users, such as those with real-time interactions, low-latency requirements, or geographically distributed data processing needs.

The platform is built around a CLI-centric developer experience, allowing engineers to define, deploy, and manage their applications using command-line tools. This approach supports a GitOps workflow, where infrastructure and application configurations are version-controlled. Fly.io Machines operate by taking Docker images and running them as isolated VMs, which can be configured with dedicated CPU, memory, and persistent storage. This enables the deployment of stateful services, databases, and long-running processes that might be challenging on ephemeral serverless platforms.

Target users include developers building full-stack applications, microservices, and APIs that benefit from global distribution. This includes applications with global user bases, IoT backends, and edge computing scenarios where processing data closer to the source reduces latency and bandwidth costs. For example, a global SaaS application might use Fly.io Machines to deploy its API servers in multiple regions, ensuring that user requests are routed to the closest available instance, thereby improving responsiveness. The platform's ability to run persistent volumes also makes it suitable for deploying databases like Postgres and Redis directly on the edge, complementing the compute layer with localized data storage Fly Postgres documentation.

The core proposition of Fly.io Machines centers on bridging the gap between traditional VM-based deployments and modern container orchestration, offering a balance of control and operational simplicity for globally distributed systems. It provides an alternative to more abstract services like AWS App Runner, which focuses on automated deployments, by offering more granular control over VM placement and resource allocation, making it suitable for specific performance and architectural requirements.

Key features

  • Global Distribution and Edge Deployment: Deploy applications across a network of edge locations worldwide to reduce latency for users.
  • Persistent Storage (Fly Volumes): Attach dedicated block storage to VMs, enabling the deployment of stateful applications and databases Fly Volumes documentation.
  • Low-Level VM Control: Fine-grained control over individual VM instances, including resource allocation (CPU, memory), networking, and lifecycle management.
  • Container-Native Workflow: Deploy standard Docker images without modification, leveraging existing containerization practices.
  • Private Networking: Establish secure, private networks between VMs across different regions, facilitating inter-service communication.
  • Integrated Load Balancing and Routing: Automatic routing of incoming requests to the closest healthy application instances.
  • Customizable Health Checks: Define application-specific health checks to ensure service availability and automate recovery.
  • Built-in Observability: Integration with logging and metrics tools for monitoring application performance and health.
  • CLI-Centric Management: A powerful command-line interface (CLI) for deploying, scaling, and managing all aspects of the application lifecycle.
  • SSH Access: Direct SSH access to running VMs for debugging and operational tasks Fly.io SSH documentation.

Pricing

Fly.io Machines operate on a pay-as-you-go model, with costs determined by VM size, active runtime, allocated memory, persistent storage, and data egress. A free tier is available for small-scale deployments.

Service Component Details Price (as of 2026-06-11)
Shared-CPU VM (256MB) Per millisecond running time $0.000000416 / ms
Shared-CPU VM (256MB) Per millisecond idle time $0.000010416 / ms
Dedicated-CPU VM (2GB) Per millisecond running time $0.000003472 / ms
Persistent Storage Per GB per month $0.15 / GB
Data Egress Per GB (after free tier) $0.02 / GB
Free Tier 3x shared-cpu-1x 256MB VMs, 3GB storage, 160GB egress per month $0.00

For detailed and up-to-date pricing information, refer to the official Fly.io pricing documentation.

Common integrations

Alternatives

  • Railway: A developer platform for deploying applications, databases, and services with a focus on simplicity and ease of use.
  • Render: An all-in-one cloud platform offering managed services for web apps, databases, and background jobs, emphasizing developer experience.
  • AWS App Runner: A fully managed service that provides a fast, simple, and cost-effective way to deploy containerized web applications and APIs.
  • DigitalOcean App Platform: A Platform-as-a-Service (PaaS) that enables developers to deploy code directly to production without managing infrastructure.
  • Vercel: A platform for frontend frameworks and static sites, with a focus on fast deployments and global edge network capabilities.

Getting started

To get started with Fly.io Machines, you typically begin by installing the Fly.io CLI, logging in, and then deploying a Dockerized application. The following example demonstrates deploying a simple Node.js application. First, ensure you have Node.js and Docker installed.

1. Create a `package.json` and `index.js` for a Node.js app:

// package.json
{
  "name": "fly-nodejs-app",
  "version": "1.0.0",
  "description": "A simple Node.js app for Fly.io",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {
    "express": "^4.18.2"
  }
}
// index.js
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;

app.get('/', (req, res) => {
  res.send('Hello from Fly.io Machines!');
});

app.listen(port, () => {
  console.log(`App listening at http://localhost:${port}`);
});

2. Create a `Dockerfile` to containerize the application:

# Dockerfile
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["npm", "start"]

3. Install the Fly.io CLI and log in:

curl -L https://fly.io/install.sh | sh
fly auth login

4. Initialize a new Fly.io app and deploy:

fly launch

The fly launch command will interactively guide you through creating a fly.toml configuration file, selecting a region, and deploying your application. It automatically detects the Dockerfile and builds the image. Once deployed, Fly.io will provide a URL to access your running application Fly.io Hands-on Start Guide.