Skip to content
Merlin1337Public

About

Self-hosted OTA updates for Expo, 100% on Cloudflare (Workers, D1, R2, Access). Standard expo-updates client, CLI, dashboard, MCP, preview links.

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

flare-ota: self-hosted OTA updates for Expo, on your own Cloudflare account

CI npm version MIT license expo-updates SDK 52+ Cloudflare Workers, D1, R2 MCP ready

Quick start · Expo integration · CI · MCP · Costs · Security


The flare-ota dashboard showing releases, rollouts and adoption per platform, with the CLI publishing a 25% rollout


Ship JavaScript fixes to your Expo app in minutes, without a store review, on infrastructure you own. flare-ota is a complete update server for the standard expo-updates client: no fork, no custom native SDK, no EAS Update. It runs as a single Cloudflare Worker on your account, where the free tier covers a small app and $5/month covers a large one.

Why flare-ota

Own the pipeline

Bundles, devices and keys stay in your Cloudflare account. Deploy with Cloudflare's cf CLI; no third-party service in the update path.

Release like a pro team

Progressive rollouts, pause, one-command rollback, promote staging → production, and signed preview links to test one release on one phone.

Secure by default

Signed manifests, scoped hashed tokens, a dashboard behind Cloudflare Access whose JWT the Worker verifies itself, an audit log, and WAF rules.

Features

Capability What you get
Expo Updates protocol v1 Works with expo-updates as shipped. Code signing required, fingerprint runtime versions.
Channels & branches Point production and staging at any branch; promote a tested release in one call.
Progressive rollouts Deterministic per-device buckets, rollouts only grow, pause stops new devices.
Rollback Back to the previous bundle, or to the JS embedded in the binary. Failed launches are never re-offered.
Preview links Signed, expiring, revocable QR code that pins one device to a release, outside the rollout.
Adoption metrics Served, running and failed per release and platform, against the eligible fleet.
CLI publish, rollout, pause, rollback, promote, preview, metrics, doctor, all with --json.
MCP server Remote (Streamable HTTP) and local (stdio). Agents see only the tools their token allows.
Edge-cached assets Content-addressed, verified by SHA-256 on upload, immutable cache, daily garbage collection.
Guided setup One rerunnable command: signing key, Access, D1, R2, deploy, first token, WAF, health check.

How it works

Architecture: apps, CLI, agents and your team reach one flare-ota Worker through the Cloudflare edge; the Worker stores releases and devices in D1 and bundles in R2

Quick start

You need a Cloudflare account with a domain on it, Node 24.22+ and pnpm.

1. Deploy the server (guided, rerunnable)

npx flare-ota setup    # one server per app: add --app <name> for a second one

It fetches the server source into ~/.flare-ota/server, installs it, logs you in to Cloudflare and runs the guided setup. Prefer a clone? pnpm install && pnpm server:setup --stage production in it does the same.

2. Connect your Expo app

npx expo install expo-updates && npm i flare-ota
cp ~/.flare-ota/flare-ota/certificate.pem certs/certificate.pem   # printed by setup
FLARE_OTA_URL=https://ota.example.com npx flare-ota init --channel production

Then build a release binary once: the update URL and certificate are native settings.

3. Ship

export FLARE_OTA_URL=https://ota.example.com FLARE_OTA_TOKEN=fota_…
npx flare-ota doctor                     # config, server, token, signature
npx flare-ota publish --branch production -m "Fix checkout" --rollout 10
npx flare-ota rollout <groupId> 100      # all devices
npx flare-ota rollback --branch production   # changed your mind

publish checks before it builds anything: app config, token scope, which channel serves the branch, and that the server's signing key matches the certificate in your app. Then it shows each step, uploads only what the server doesn't have, and ends with the reach, the dashboard link and what to run next.

flare-ota publish: checks, export, upload and a summary with the dashboard link and next commands

New release? npm i flare-ota@latest, then npx flare-ota upgrade redeploys your server to match, with no question asked. Full walkthrough in docs/quick-start.md.

Talk to it from your AI agent

claude mcp add --transport http flare-ota https://ota.example.com/mcp \
  --header "Authorization: Bearer $FLARE_OTA_TOKEN"

"How is today's release doing on Android?" · "Raise it to 50%." · "Roll production back."

Give the agent a read token to look around, admin to let it act. Every action lands in the audit log. See docs/mcp.md, or install the Claude skill so Claude can set flare-ota up for an app end to end.

flare-ota or EAS Update?

flare-ota EAS Update
Client standard expo-updates standard expo-updates
Runs on your Cloudflare account Expo's infrastructure
Bundles and device data your account Expo's servers
Pricing Cloudflare usage: free tier, then Workers Paid ($5/mo) Expo plans
Server code open source (MIT) hosted service

EAS Update is the zero-ops choice and integrates with EAS Build. flare-ota is for teams that want the update path in their own account, open code, and costs that track Cloudflare's.

Documentation

Guide Covers
Quick start Deploy the server, connect an app, publish, roll back
Expo app integration app.json, certificates, staging builds, preview links, gotchas
CI Publish from GitHub Actions; deploy the server with a scoped token
MCP Remote and local MCP, the tool list and scopes
Costs and limits Free tier vs Workers Paid, what each request costs
Security Threat model and protections
Example app Minimal Expo app to try publish → update → rollback → preview

Want to see the dashboard without deploying? pnpm --filter @flare-ota/server demo serves it on localhost:8799 with sample data.

Status

Beta. Validated end to end on an iOS release build (Expo SDK 58) against a real deployment: signed publish → update, rollback to the previous bundle, rollback to the embedded bundle, and a preview link pinning one device to a paused 1% canary. Not yet exercised on a device: Android and exitPreview(). Cloudflare's cf CLI and its cloudflare.config.ts format are in open beta.

Planned: delta patches (bsdiff), OAuth for the remote MCP server.

Credits

Built from the designs of focux/open-ota (Cloudflare-native protocol server) and dnlsilva/open-ota (MCP, preview links, metrics). A few functions are adapted from focux/open-ota under its MIT license; see NOTICE.md.

License

MIT

About

Self-hosted OTA updates for Expo, 100% on Cloudflare (Workers, D1, R2, Access). Standard expo-updates client, CLI, dashboard, MCP, preview links.

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages