# Codemagic Patch documentation > Self-hosted OTA updates for React Native: setup, SDK, cmpatch CLI, and operations. Codemagic Patch is self-hosted over-the-air (OTA) updates for React Native — server, `cmpatch` CLI, and `@codemagic/react-native-patch` SDK. **Where to start** - [Try Patch locally](https://patch.codemagic.io/docs/index.md) - [How it works](https://patch.codemagic.io/docs/introduction/how-it-works.md) - [Install for production](https://patch.codemagic.io/docs/install.md) - [Migrate from CodePush](https://patch.codemagic.io/docs/migration/migrating-from-codepush.md) - [Migrate from Expo Updates](https://patch.codemagic.io/docs/migration/migrating-from-expo-updates.md) - [CLI reference](https://patch.codemagic.io/docs/reference/cli-reference.md) - [SDK reference](https://patch.codemagic.io/docs/reference/sdk-reference.md) - [Debugging OTA issues](https://patch.codemagic.io/docs/troubleshooting.md) Sections below mirror the docs sidebar. **Optional** lists secondary pages (FAQ, troubleshooting)—skip when you need a shorter context. ## Overview - [Local quickstart](https://patch.codemagic.io/docs/index.md): Local Patch evaluation via cmpatch selfhost local-eval (or scripts/local-eval/up.sh from a clone), with optional cmpatch demo on a simulator or emulator, dashboard exploration, and integration with your own app. ## Introduction - [How it works](https://patch.codemagic.io/docs/introduction/how-it-works.md): Patch architecture — server, storage, SDK flow, manifest delivery, rollback. - [Core concepts](https://patch.codemagic.io/docs/introduction/core-concepts.md): OTA concepts — apps, deployments, binary version, payload vs native. - [Comparison](https://patch.codemagic.io/docs/introduction/comparison.md): Patch vs CodePush forks, Expo Updates, Hot Updater — hosting, licensing, trade-offs. - [Comparison](https://patch.codemagic.io/docs/introduction/comparison-capacitor.md): Patch vs Appflow Live Updates for Capacitor — self-host vs hosted, licensing. - [Pricing](https://patch.codemagic.io/docs/introduction/pricing.md): Patch pricing: free to 1M MAU, progressive commercial rates, Slack support, optional hosting, sales@codemagic.io. - [Support](https://patch.codemagic.io/docs/introduction/support.md): Chat on Discord or open a GitHub issue for Patch support. ## Setup - [Install](https://patch.codemagic.io/docs/install.md): Production install — cmpatch selfhost install, domains, TLS, OAuth sign-in, machine size, first admin. - [Cloudflare setup](https://patch.codemagic.io/docs/setup/cloudflare.md): Cloudflare CDN for Patch storage — prepare zone and token, install flags, DNS proxy, origin-header Cache Rule, verify purge. - [CloudFront setup](https://patch.codemagic.io/docs/setup/cloudfront.md): CloudFront CDN for Patch — separate bundled and external-storage setup, DNS cutover, origin protection, IAM, verification, and secret rotation. - [Infrastructure adapters](https://patch.codemagic.io/docs/setup/infrastructure.md): Storage and delivery adapters — S3, GCS, MinIO, base-url, Cloudflare, CloudFront. - [Ongoing maintenance](https://patch.codemagic.io/docs/setup/ongoing-maintenance.md): Self-host maintenance cadence: scheduled backups, cmpatch selfhost upgrade, health, disk, link to Operations reference. - [Native setup](https://patch.codemagic.io/docs/setup/native-setup.md): Create apps and deployments, then install the SDK with native config keys for bare RN or Expo. - [Native setup](https://patch.codemagic.io/docs/setup/native-setup-capacitor.md): Install @codemagic/capacitor-patch and cmpatch-capacitor, create one app per platform, set capacitor.config.ts, run cap sync. - [Checking for updates](https://patch.codemagic.io/docs/setup/checking-for-updates.md): Client update checks — Patch.wrap() / start(), sync(), readiness, foreground re-checks, progress, store fallback. - [Applying updates](https://patch.codemagic.io/docs/setup/applying-updates.md): Client apply timing — install modes, mandatoryInstallMode, per-deployment behavior, restart guards. - [Manual control (advanced)](https://patch.codemagic.io/docs/setup/manual-control.md): Low-level SDK — checkForUpdate, downloadUpdate, installUpdate, notifyAppReady. - [Publish your first release](https://patch.codemagic.io/docs/setup/first-release.md): First OTA publish — cmpatch init + release-react (React Native) or cmpatch-capacitor release create (Capacitor), verify server processing. ## Using Patch - [Web dashboard](https://patch.codemagic.io/docs/using-patch/dashboard.md): Web UI — releases, metrics, team IAM, bundle uploads, host status. - [Releasing updates](https://patch.codemagic.io/docs/using-patch/releasing-updates.md): Publish and manage OTA releases via CLI, dashboard, or CI pipelines. - [Fingerprinting](https://patch.codemagic.io/docs/using-patch/fingerprinting.md): Fingerprint mismatch blocking, first-write registry, disabled store-build seed, optional expansion. - [Binary version compatibility](https://patch.codemagic.io/docs/using-patch/binary-version-capacitor.md): Capacitor: no native fingerprint; --target-binary-version scopes each release; bump the native version on native changes; releases cannot be retargeted. - [Verify a test release](https://patch.codemagic.io/docs/using-patch/verify-test-release.md): Device OTA verification loop — native build, publish, confirm SDK pickup. - [Preparing for production](https://patch.codemagic.io/docs/using-patch/preparing-for-production.md): Pre-prod checklist — signing, sync config, Staging validation, rollout plan. - [Production control](https://patch.codemagic.io/docs/using-patch/production-control.md): Rollout %, mandatory flag, promote, rollback, disable releases. - [CI integration](https://patch.codemagic.io/docs/using-patch/ci-integration.md): Automate cmpatch release-react (React Native) or cmpatch-capacitor release create (Capacitor) in GitHub Actions, GitLab CI, Codemagic, other CI. - [Analytics and metrics](https://patch.codemagic.io/docs/using-patch/analytics.md): Release metrics — downloads, ready, applied, rollback; source maps for Datadog/Sentry vs Patch storage. - [Security and access](https://patch.codemagic.io/docs/using-patch/security.md): Auth — OAuth sign-in, API tokens, team roles, optional code signing. - [How delivery works](https://patch.codemagic.io/docs/using-patch/delivery.md): Manifest and artifact URL layout, storage paths, CDN delivery to SDK. ## Migration - [Migrating from CodePush](https://patch.codemagic.io/docs/migration/migrating-from-codepush.md): CodePush forks to Patch: SDK swap, deployment keys, server URL, CLI mapping. - [Migrating from Appflow](https://patch.codemagic.io/docs/migration/migrating-from-appflow.md): Appflow Live Updates to Patch: SDK swap, per-platform deployment keys, start(), cmpatch-capacitor CLI mapping. - [Migrating from Expo Updates](https://patch.codemagic.io/docs/migration/migrating-from-expo-updates.md): Expo Updates/EAS to Patch: local eval PoC on your app, then SDK swap and cutover. ## Reference - [SDK reference](https://patch.codemagic.io/docs/reference/sdk-reference.md): JS API: wrap (React Native) or start (Capacitor), sync, install modes, error codes. - [CLI command reference](https://patch.codemagic.io/docs/reference/cli-reference.md): cmpatch commands and flags (init, selfhost, demo, release-react, promote, rollback, doctor), plus cmpatch-capacitor for Capacitor apps. - [Configuration reference](https://patch.codemagic.io/docs/reference/configuration.md): Server env vars — DATABASE_URL, S3, OAuth, MODE, .env.selfhost fields. - [Operations](https://patch.codemagic.io/docs/reference/operations.md): Self-host day-2 ops — backup, restore, upgrade, smoke test, Compose. ## Optional - [Troubleshooting and debugging](https://patch.codemagic.io/docs/troubleshooting.md): Debug OTA failures — cmpatch doctor, logs, version mismatch, SDK, bundle errors. - [FAQs](https://patch.codemagic.io/docs/faq.md): FAQ — licensing, Expo, CodePush, self-host, what can ship OTA, where to debug. - [Release Notes](https://patch.codemagic.io/docs/releases/index.md): Patch release notes index: latest version per surface, upgrade order, compatibility requirements, and a dated list of releases linking to the per-surface notes. - [React Native SDK](https://patch.codemagic.io/docs/releases/react-native.md): React Native SDK (@codemagic/react-native-patch) release notes by version. - [CLI](https://patch.codemagic.io/docs/releases/cli.md): cmpatch CLI (@codemagic/patch-cli) release notes by version, for app developers and self-host operators. - [Capacitor SDK](https://patch.codemagic.io/docs/releases/capacitor-sdk.md): Capacitor SDK (@codemagic/capacitor-patch) release notes by version. - [CLI for Capacitor](https://patch.codemagic.io/docs/releases/capacitor-cli.md): cmpatch-capacitor CLI (@codemagic/capacitor-patch-cli) release notes by version. - [Server and dashboard](https://patch.codemagic.io/docs/releases/server.md): Patch server and dashboard release notes by version, including migrations and upgrade notes for self-host operators.