Ctrl Plane

Fly.io

Global edge deployment using Fly.io Machines.

The Fly.io provider deploys Ctrl Plane instances as Fly Machines, giving you global edge deployment with automatic placement close to users.

Status

Interface defined — the package structure exists at provider/fly and implements the provider.Provider interface. Full implementation is in progress.

Configuration

import "github.com/xraph/ctrlplane/provider/fly"

prov, err := fly.New(fly.Config{
    Token:  os.Getenv("FLY_API_TOKEN"),
    OrgSlug: "my-org",
    Region:  "iad",
})
FieldEnvDefaultDescription
TokenCP_FLY_TOKENFly.io API token
OrgSlugCP_FLY_ORGOrganization slug
RegionCP_FLY_REGIONPrimary region (e.g., iad, lhr, nrt)
AppPrefixCP_FLY_APP_PREFIXcpPrefix for Fly app names

Capabilities

CapabilitySupported
provisionYes
deployYes
scaleYes
logsYes
execVia SSH
custom_domainsYes
tlsYes (automatic)
rollingYes
blue_greenYes

Resource mapping

Ctrl Plane conceptFly.io resource
InstanceFly App + Machine
Environment variablesMachine env / Fly Secrets
PortsService ports in fly.toml
Resources (CPU/Memory)Machine guest config
Custom domainsFly certificate + CNAME
TLS certificatesAutomatic via Fly
Health checksMachine HTTP checks

How it works

  1. Provision creates a Fly App and an initial Machine in the configured region.
  2. Deploy updates the Machine image and restarts it. For blue-green, a new Machine is created before the old one is stopped.
  3. Scale adjusts the Machine guest configuration (CPU, memory) or adds machines in additional regions.
  4. Custom domains are added via the Fly certificates API with automatic TLS.
  5. Logs are streamed from the Fly Logs API.

When to use

  • Applications that need global edge distribution
  • Latency-sensitive workloads deployed close to end users
  • Projects that want automatic TLS and custom domain management
  • Rapid prototyping with simple deployment workflows

On this page