# How to Vibe Code Your Own Fly.io (and Stop Paying for It)

> Computers for agents and full-stack applications

- Site: https://fly.io
- Category: Cloud Computing & Infrastructure
- Platforms: Web app, CLI
- Verdict: **Don't bother** (12/100 vibecodeable)
- Estimated effort: Years of full-time systems engineering

## Verdict

Building a functional clone of Fly.io's global cloud platform is impossible for a solo developer because it requires owning bare-metal hardware and writing custom hypervisor orchestration layers.

Fly.io is a heavy systems-engineering product relying on bare-metal virtualization with Firecracker, custom Rust proxies, Elixir orchestrators, and global Anycast networks. While you can build a simple dashboard wrapper that talks to a single VPS via Docker API, that is merely a toy container manager, not Fly.io. Paying for the real platform is vastly more rational than attempting to replicate global infrastructure.

### What you can't replicate

- Global bare-metal data centers across 18+ regions
- Proprietary Firecracker micro-VM virtualization and sub-second cold starts
- Global Anycast low-latency edge routing and WireGuard private fabric

## What it does

A developer-focused public cloud platform that runs full-stack applications, micro-VMs, stateful databases, and hardware-isolated AI agent sandboxes globally across 18+ regions.

### Core features

- CLI tool (`flyctl`) for deployment and container management
- Micro-VM lifecycle management (Firecracker orchestration)
- Global edge routing and proxy layer
- Private networking via WireGuard mesh tunnels
- Persistent block storage volumes and snapshots
- Managed Postgres and LiteFS state replication
- Sprite sandbox isolation with automated checkpointing

## The business

### Pricing

- Pay-as-You-Go Infrastructure: Usage-based — Metered resource consumption for micro-VMs, volumes, and network traffic.
- Serious Support: $29/mo — Direct access to dedicated engineers.
- Compliance: $99/mo — Compliance-enabled infrastructure for regulated workloads.

### Funding

$100M+ raised.
- Seed
- Series A
- Growth rounds
Investors: Andreessen Horowitz (a16z), Initialized Capital

Founded 2017.
Team size: 30-50+.

## The hard parts

- Custom Linux kernel tuning and Firecracker micro-VM isolation on bare metal
- Global Anycast networking, low-latency edge routing, and distributed state
- Secure WireGuard tunnel mesh across multi-tenant production clusters
- Persistent block device checkpointing and fast VM state resumption

## How to vibe code Fly.io

### Prerequisites

- Node.js (free): Required to run the Next.js control plane dashboard UI subset.
- GitHub (free): Hosts the personal dashboard repository.

### Recommended AI tools

- Claude Code: Best-in-class agentic coding tool for scaffolding the web control plane and API proxy.

### Stack

- Frontend: Next.js
- Backend: Next.js API Routes
- Database: Turso
- Auth: better-auth
- Payments: Stripe
- Other: Dockerode (for local Docker daemon control subset)

### Hosting

- Vercel (Hosting the personal control plane web dashboard subset): $0/mo

### Build guide

1. **Scaffold Control Plane Dashboard** — Initialize a Next.js application with Tailwind CSS and set up a clean dark-mode UI mimicking the Fly.io developer dashboard.

```
Initialize a new Next.js project with Tailwind CSS, TypeScript, and Lucide React icons. Create a responsive dashboard layout with a dark theme inspired by Fly.io's developer console, featuring a sidebar navigation, resource usage meters, and an app list view.
```

2. **Database Schema and Authentication** — Configure Turso SQLite with Drizzle ORM and set up better-auth for personal user session management.

```
Configure Drizzle ORM with Turso SQLite to manage user organizations, applications, and deployed machine records. Integrate better-auth to handle email/password authentication and protect dashboard routes.
```

3. **Docker Management API Integration** — Implement backend routes using the Dockerode library to communicate with a local Docker daemon for container lifecycle testing.

```
Build Next.js API routes that utilize the Dockerode library to interact with a local Docker daemon. Implement endpoints to list running containers, inspect container resource utilization, and trigger start/stop actions representing 'Machines'.
```

4. **Application Deployment Simulation View** — Build an app creation wizard that simulates `fly.toml` configuration parsing and container build logs.

```
Create a multi-step form wizard in Next.js that allows users to define an app name, region, and Docker image. Simulate a deployment stream by outputting mock build and boot logs using Server-Sent Events (SSE) to a terminal-style component.
```

5. **Polish and Verification** — Add status indicators, region latency metrics mock cards, and refine error handling across all dashboard views.

```
Add polish to the dashboard with active status indicators, a mock global region latency map component, and robust error handling for API failures when communicating with the local container runtime.
```

### Cost vs paying

**Starting costs (one-time):**

- AI Coding Assistant (Claude Pro): $20
- Total: ~$20 one-time

**Ongoing costs (monthly):**

- Control plane hosting (Vercel): $0
- Total: ~$0/mo

- Paying for the SaaS instead: Usage-based (~$5-20/mo typical)
- Build time: 15-20 hours (Subset control panel only)
- AI tool credits: $20/mo (Claude Pro)
- Break-even: Never — real cloud infrastructure cannot be replicated solo

## Sources

- [Fly.io Homepage](https://fly.io)
- [Fly.io Pricing Page](https://fly.io/pricing)
- [Fly.io About Page](https://fly.io/about)
- [Fly.io Documentation](https://fly.io/docs)