Quickstart
Install, stand up the Console, wire up the host app, then ship one mini-app release — end to end.
Four steps, in order: install the module, stand up the Console (Worker + D1 + R2), wire the host app to it, then build and ship one mini-app release. Each step only needs what came before it — nothing else.
1. Install
Section titled “1. Install”-
Add the module and CLI to the Expo host app:
Terminal window pnpm add expo-lynx-viewpnpm add -D expo-lynx-bundle-cli -
Add the Expo config plugin. Leave
deliveryEndpointsas a placeholder for now — it gets its real value in step 3:app.json {"expo": {"plugins": [["expo-lynx-view", {"embeddedBundlesPath": "./generated/expo-lynx/embedded","publicKeyPath": "./keys/lynx/updates.public.pem","deliveryEndpoints": {"delivery": "https://placeholder.workers.dev/v1/default/delivery"}}]]}}
2. Set up the Console
Section titled “2. Set up the Console”One Worker, one D1 database, one R2 bucket — created once, shared by every mini-app your team ships.
-
Create the signing key pair (public half goes to the app, private half goes to the Worker):
Terminal window pnpm lynx keys generate -
Decide how release uploads reach R2 — setup asks interactively, so this is optional prep, not a blocker:
- Wrangler CLI (recommended, preselected): in the Cloudflare dashboard, under My Profile → API Tokens, create a token with Workers R2 Storage: Edit permission. This is the same mechanism hot-updater uses —
lynx releaseshells out to the bundled Wrangler CLI with this token, so no R2 S3 key pair is needed. - Direct to R2: in the Cloudflare dashboard, under R2 → Manage R2 API Tokens, create an Object Read & Write token scoped to one bucket. Keep the access-key ID and secret — setup asks for them if you pick this mode.
- Wrangler CLI (recommended, preselected): in the Cloudflare dashboard, under My Profile → API Tokens, create a token with Workers R2 Storage: Edit permission. This is the same mechanism hot-updater uses —
-
Run setup — it creates an ignored
.env.lynxon first run, then walks you through everything else with interactive prompts (Worker/D1/bucket names, the upload mode from above, a matching credential, and a Console username/password):Terminal window pnpm lynx console setupSetup deploys the Worker, creates D1/R2, applies migrations, and writes the deployed Worker URL, database ID, and CLI API key back into
.env.lynx.
3. Set up the host app
Section titled “3. Set up the host app”-
Replace the placeholder URL from step 1 with the real Worker URL from
.env.lynx:app.json {"deliveryEndpoints": {"delivery": "https://your-worker.workers.dev/v1/default/delivery"}} -
host prepare --registerauthenticates to the Worker, so set these two variables first (in.env.lynxnext to the host app’spackage.json, or in CI):Variable Needed for LYNX_DELIVERY_SERVERThe Worker URL to register against LYNX_DELIVERY_API_KEYAuthenticates the registration call That’s the full list — the host app never needs R2 credentials or the Worker’s signing private key.
Embed the mini-app once, then prepare and register the native compatibility record for both platforms:
Terminal window pnpm lynx host embed ../deliverypnpm lynx host prepare --register -
Render the managed feature:
<ExpoLynxView source={{ kind: 'managed', feature: 'delivery' }} style={{ flex: 1 }} /> -
Build the native app as usual. Don’t change native dependencies or the plugin config between
host prepareand this build — it invalidates the registration from step 2.
4. Mini app
Section titled “4. Mini app”In the mini-app’s own repository (no Expo checkout, no signing key):
-
Declare its identity — the Console operator must already have registered this exact
appId/featurepair:lynx-miniapp.config.ts import { defineMiniApp } from 'expo-lynx-bundle-cli';export default defineMiniApp({appId: 'default',feature: 'delivery',}); -
lynx releaseneeds more than the host app — it uploads the archive too, not just an API call. Set these (again in.env.lynx, or CI secrets):Variable Needed for LYNX_DELIVERY_SERVERThe Worker URL to upload to LYNX_DELIVERY_API_KEYAuthenticates the upload CLOUDFLARE_ACCOUNT_IDCloudflare account (both upload modes) LYNX_DELIVERY_R2_BUCKETTarget R2 bucket (both upload modes) CLOUDFLARE_API_TOKENWrangler-CLI upload (the default) R2_ACCESS_KEY_IDDirect-to-R2 upload only R2_SECRET_ACCESS_KEYDirect-to-R2 upload only Which pair you need (
CLOUDFLARE_API_TOKENor the twoR2_*variables) depends on the upload mode the Console operator chose during setup (LYNX_DELIVERY_UPLOAD_MODEin their.env.lynx). Testing locally againstpnpm lynx console, neither pair is needed — the local Worker offers its own upload URL.Build and upload a release:
Terminal window pnpm lynx release -
Open the Console, select the verified release, and enable it. Uploading never enables a bundle by itself — that’s a deliberate, separate step.
That’s the whole loop: a device with the host app installed now fetches, verifies, and renders that release the next time it checks in.
Next: Lifecycle for how embedded vs. remote selection actually works, Local development to test all of this on your Mac before touching Cloudflare, or Troubleshooting if a step above didn’t behave as described.
