Skip to content

Fly

An App is a globally unique namespace. A Machine is a Firecracker VM running a container. A Service is an Effect program running in a Fly Machine. A Sprite is an Effect program in an org-scoped sandbox that hibernates when idle.

Disks, managed data, secrets, IPs, and certificates are declared in the same TypeScript program.

Set up your org and API token, then start the tutorial.

  • Apps — the parent for every other resource except Sprites, Postgres, Redis, and Tigris. Alchemy generates a globally unique name unless you pass one. https://{appName}.fly.dev is the public URL.
  • Machines — a Firecracker VM running a container image. Use this when you already have an image (nginx:alpine, a registry tag). Region, guest size, proxy services, env, and mounts are all props.
  • Services — an Effect program running in a Machine. Alchemy bundles main, builds the image, and updates in place when the hash changes. Set count to scale.
  • Sprites — an Effect program in a Fly Sprite. Org-scoped, no parent App. Hibernates when idle. Alchemy writes the bundle onto the Sprite. No Docker image.
  • Regions — the datacenter a Machine, Volume, Postgres cluster, or Redis primary lives in. Default iad. Changing region replaces the resource.
  • Volumes — region-local block storage. Mount one into a Service with MountVolume({ path, sizeGb }), or pass mounts on a Machine. A Volume attaches to one Machine; count: N creates N disks, not one shared disk.
  • Postgres — billed Managed Postgres. Bind ConnectPostgres on a Service; pass the connection string to Drizzle or SQL. migrations is the same surface as Neon.
  • Redis — Upstash Redis. Bind ReadWriteRedis on a Service.
  • Tigris — S3-compatible object storage (Fly.Bucket). Bind PutObject / GetObject on a Service.
  • SecretsConfig.redacted in a Service for values from .env. Fly.Secret when Fly should own a value shared across Machines. KMS keys are SecretKey plus Encrypt / Decrypt / Sign / Verify.
  • IPs & certificates — shared or dedicated addresses (IpAssignment) so {app}.fly.dev answers over IPv4, plus ACME or uploaded TLS certificates for your own hostname.
You’re building Reach for
An HTTP API on Fly App + Service
A sandbox that can sleep Sprite
A raw container Machine with an image
A background worker Service with ServerHost.run
Persistent disk MountVolume or Machine mounts
Managed Postgres Postgres + ConnectPostgres
Upstash Redis Redis + ReadRedis / WriteRedis / ReadWriteRedis
Object storage Tigris + PutObject / GetObject
N replicas behind fly.dev Service count, or more Machine resources
Restore a disk VolumeSnapshot + mount snapshotId
Config / API tokens Config.redacted. Fly.Secret when Fly should own it
Sign / encrypt in-app SecretKey + Encrypt / Sign
{app}.fly.dev over IPv4 IpAssignment type: "shared_v4"
Your own domain Certificate (ACME)
  • Setup — create a Fly org, generate an API token, and connect alchemy.
  • Tutorial — from empty directory to an App running an HTTP Service with a mounted Volume and a secret.
  • Providers reference — generated API docs for every Fly resource Alchemy ships.