Fly
A Service is an Effect program running in Fly Machines inside its own
App, with its own {name}.fly.dev hostname. An App is a globally
unique namespace. A Machine is a Firecracker VM running a container.
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 namespace for Machines,
Secrets, IPs, and certificates. Services create their own; declare
one for Machines, App-level Secrets, custom domains, or to group
Services.
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 Machines in its own App. Public by default at
api.url, or private withpublic: false. Alchemy bundlesmain, builds the image, and updates in place when the hash changes. Setcountto scale. - Connect Services — Services
calling each other’s methods with
Fly.bindServiceon a stack-scoped private network (Fly.stackNetwork), behind one public gateway. - 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.
Frontend
Section titled “Frontend”- Websites — Vite, Astro, Next.js,
Nuxt, React Router, SolidStart, SvelteKit, TanStack Start, Waku,
Octane, Foldkit, Vocs, and StaticSite. Each builds your app and
deploys a Node Service on a Fly App
(
https://{app}.fly.dev). Vite,Astro,Next.js,Nuxt,React Router,SolidStart,SvelteKit,TanStack Start,Waku,Octane,Foldkit,Vocs,StaticSite.
- 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 — public and private
Services, addresses (
IpAssignment) for Apps you declare, 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 | Service |
| An internal API | Service with public: false |
| Several Services talking privately | Connect Services: Fly.bindService + Fly.stackNetwork |
| A Vite SPA | Website.Vite |
| An SSR site (Astro, Next, Nuxt, …) | Website |
| 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 |
| Addresses on your own App | 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 a public HTTP Service with a mounted Volume and a secret.
- Websites — Vite, Astro, Next.js, and other framework sites as a Node Service.
- Providers reference — generated API docs for every Fly resource Alchemy ships.