{
  "slug": "deploy-fly-live",
  "title": "Fly.io Live — instant content deploys",
  "description": "Volume-backed Fly.io deploys. First push creates the infrastructure; every edit after that syncs only changed files in ~200 ms–1 s.",
  "category": "deployment",
  "order": 3,
  "locale": "en",
  "translationGroup": "547a6341-484a-4698-95d6-a30e4a7d3d79",
  "helpCardId": null,
  "content": "## What it is\n\n**Fly.io Live** is a deploy provider that decouples infrastructure from content. The Docker image contains only a lightweight web server and a signed sync endpoint. Your site's files live on a persistent Fly Volume. Publishing a content change uploads only the changed files — not the whole image.\n\nResult: typical text edit is live in **200 ms–1 s**, vs. ~30–120 s for a full Docker rebuild.\n\n## When to use Fly.io Live\n\n- You want everything in Fly (EU data residency, same account as your other services)\n- Your site is static (build.ts outputs HTML/CSS/JS/images)\n- You want \"save in CMS → live\" feedback without waiting on Docker\n- You also run Fly apps for dynamic services (forms, auth, SSR pages) and want the static content there too\n\n## When NOT to use it\n\nIf your site is pure static with no Fly requirement, **[Cloudflare Pages](/docs/deploy-cloudflare-pages)** is faster (300+ PoPs) and free. Fly Live is single-region by default — use only if you have a Fly-specific reason.\n\nIf your site is a Next.js SSR app or a custom server, use the classic **Fly.io (rebuild)** provider — SSR apps can't be expressed as static files.\n\n## How it works\n\n### First deploy (infrastructure setup)\n\n1. CMS admin runs `flyctl apps create`, `flyctl volumes create`\n2. Generates an HMAC secret and stores it in Fly Secrets as `SYNC_SECRET`\n3. Builds and deploys the sync-endpoint Docker image (Caddy/Bun serving from the volume)\n4. Waits for `/_icd/health` to respond\n5. Does the first content sync\n\nThis takes about 30–60 seconds, one time.\n\n### Subsequent deploys (content sync, every save)\n\n1. CMS admin builds your site locally (`deploy/`)\n2. Fetches the remote file manifest: `GET /_icd/manifest` → `{ files: { path: sha256 } }`\n3. Diffs against local — computes `{ added, changed, removed, unchanged }`\n4. `POST /_icd/deploys` → begins a new staging deploy\n5. `PUT` each changed/added file, `DELETE` each removed file\n6. `POST /_icd/deploys/:id/commit` → atomic symlink swap on the server\n\nTransport is HMAC-SHA256 signed (same pattern as [Instant Content Deployment](/docs/instant-content-deployment)). All requests expire after 5 minutes.\n\n### Atomic deploys\n\nEach deploy lives in its own directory under `/srv/deploys/<id>/`. On commit, the server atomically swaps the `/srv/current` symlink to point at the new directory. Requests in flight never see a half-updated tree. The server keeps the last 5 deploys for rollback; older ones are pruned.\n\n## Setup\n\n### 1. Configure the provider\n\nSettings → Deploy → **Fly.io Live (instant sync)**. Provide:\n\n- **API token** — Fly personal access token ([get one](https://fly.io/dashboard/personal/tokens))\n- **App name** — auto-generated from your site name if left empty\n- **Region** — default `arn` (Stockholm); pick the closest Fly region to your users\n- **Volume name** — default `site_data`; you rarely need to change this\n\nThe organisation slug is auto-detected from your token.\n\n### 2. Click Deploy\n\nFirst click provisions the infrastructure and then does the first content sync. You'll see the live URL (`https://<app-name>.fly.dev`) when it completes.\n\n### 3. Subsequent saves\n\nOnce set up, every deploy is fast. Enable **Deploy on save** in the same panel if you want auto-publish on content changes.\n\n## Rebuilding infrastructure\n\nThe Docker image rarely needs rebuilding. When cms-admin ships a new version of the sync-endpoint server, the admin UI surfaces a \"Rebuild infrastructure\" prompt — click it to refresh the image. Volume data is preserved, so content survives rebuilds.\n\nTriggers that require an infra rebuild:\n\n- cms-admin update with a new sync-endpoint version\n- Custom server configuration (headers, redirects) — requires editing the image template\n- Fly machine resize (memory, CPU) — via `fly.toml`\n\n## Custom domain\n\nAdd your domain in Settings → Deploy → Custom domain. Fly Live automatically runs `flyctl certs add` on the next deploy. Configure the DNS records at your registrar per Fly's instructions.\n\n## Limitations\n\n- **Single-region**: Fly volumes are region-pinned. For global low latency, pair with a CDN in front, or use Cloudflare Pages instead.\n- **One writer**: The volume has one primary machine. Don't scale horizontally without understanding Fly volume semantics.\n- **1 GB volume default**: Fine for most sites (content is small). Resize via `flyctl volumes extend` if needed.\n\n## Troubleshooting\n\n**\"Sync endpoint did not come online\"** — first deploy timed out waiting for the container. Check Fly logs: `flyctl logs -a <app-name>`. Most common cause: the volume failed to mount.\n\n**\"Invalid signature\"** on sync requests — the `SYNC_SECRET` in Fly Secrets got out of sync with the CMS config. Re-run the deploy; the admin will regenerate and push a new secret.\n\n**\"Version mismatch, rebuilding infra\"** — expected when you upgrade cms-admin to a version with a newer sync-endpoint. Let it run; the rebuild takes ~60 s.\n\n## Comparison\n\n| | Fly.io Live | Fly.io (rebuild) | Cloudflare Pages | GitHub Pages |\n|---|---|---|---|---|\n| Time per content edit | ~200 ms–1 s | 30–120 s | 3–10 s | 15–30 s |\n| Global edge | No (1 region) | No | Yes (300+ PoPs) | Yes (CDN) |\n| SSR support | No (static only) | Yes | Workers only | No |\n| Monthly cost (small site) | ~$3–5 | ~$3–5 | $0 | $0 |\n| When to pick it | Fly ecosystem | Next.js / SSR apps | Pure static, global | Open-source projects |\n\n## Related\n\n- [Cloudflare Pages](/docs/deploy-cloudflare-pages) — alternative for pure static\n- [Instant Content Deployment (ICD)](/docs/instant-content-deployment) — the same HMAC pattern used for Next.js revalidation\n- [Deploy settings](/docs/settings-deploy) — full provider reference\n- [Fly.io (rebuild)](/docs/docker-deployment) — the Docker-rebuild-every-deploy path (SSR apps)\n",
  "excerpt": "What it is\n\nFly.io Live is a deploy provider that decouples infrastructure from content. The Docker image contains only a lightweight web server and a signed sync endpoint. Your site's files live on a persistent Fly Volume. Publishing a content change uploads only the changed files — not the whole i",
  "seo": {
    "metaTitle": "Fly.io Live — instant deploys on Fly — webhouse.app Docs",
    "metaDescription": "Volume-backed Fly.io deploys. First push creates the infrastructure; every edit after that syncs only changed files in under a second.",
    "keywords": [
      "webhouse",
      "cms",
      "fly.io",
      "deploy",
      "instant",
      "volume",
      "incremental",
      "hmac"
    ]
  },
  "createdAt": "2026-04-16T12:00:00.000Z",
  "updatedAt": "2026-04-16T12:00:00.000Z"
}