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.
Compute
Section titled “Compute”- 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.devis 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. Setcountto 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. Changingregionreplaces the resource.
- Volumes — region-local block storage.
Mount one into a Service with
MountVolume({ path, sizeGb }), or passmountson a Machine. A Volume attaches to one Machine;count: Ncreates N disks, not one shared disk. - Postgres — billed Managed Postgres.
Bind
ConnectPostgreson a Service; pass the connection string to Drizzle or SQL.migrationsis the same surface as Neon. - Redis — Upstash Redis. Bind
ReadWriteRedison a Service. - Tigris — S3-compatible object storage
(
Fly.Bucket). BindPutObject/GetObjecton a Service.
Secrets
Section titled “Secrets”- Secrets —
Config.redactedin a Service for values from.env.Fly.Secretwhen Fly should own a value shared across Machines. KMS keys areSecretKeyplusEncrypt/Decrypt/Sign/Verify.
Networking
Section titled “Networking”- IPs & certificates — shared or dedicated
addresses (
IpAssignment) so{app}.fly.devanswers over IPv4, plus ACME or uploaded TLS certificates for your own hostname.
What are you building?
Section titled “What are you building?”| 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) |
Where next
Section titled “Where next”- 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.