Codemagic Patch is a self-hosted over-the-air (OTA) update service for React Native and Capacitor apps. Ship JavaScript and web-asset changes straight to installed apps, with no app-store review for changes that live outside the native binary.
Run the whole service on your machine before you set up domains or OAuth. The local evaluation stack runs the real server, release worker, PostgreSQL, MinIO, and dashboard, with sign-in replaced by a one-click local login. It serves React Native and Capacitor apps alike.
You need Docker (with Compose v2), Node.js 20.19+ or 22.12+, git, and curl, on macOS, Linux, or WSL 2.
npm install -g @codemagic/patch-cli
cmpatch selfhost local-evalThe command keeps its own copy of this repository, checks Docker first (and offers to install or start it), brings the stack up, and points cmpatch at it. The first run builds images and can take a few minutes. When it finishes, you have:
| Service | Address |
|---|---|
| Dashboard | http://localhost:8080, with a prefilled one-click local login |
| API URL | http://localhost:3000 |
| Download base URL | http://localhost:9100/codemagic-patch |
cmpatch selfhost local-eval status prints the rest: the services, the MinIO console, the seeded API token, and a sample publish command.
Start the stack from a clone instead
git clone https://github.com/codemagic-ci-cd/codemagic-patch.git
cd codemagic-patch
./scripts/local-eval/up.shThe script needs Node.js 22.20+ and Yarn (via Corepack), and installs cmpatch globally itself. In the clone, run cmpatch demo from its root, and stop the stack with cmpatch selfhost local-eval down --checkout . (docker compose -f docker-compose.dev.yml down -v also stops it, but deletes the data).
Configure the SDK with the API URL and download base URL above. The iOS Simulator reaches localhost directly. For an Android emulator or a USB-connected device, forward both ports first with adb reverse tcp:3000 tcp:3000 and adb reverse tcp:9100 tcp:9100. Android also blocks plain HTTP by default, so for local evaluation the app needs android:usesCleartextTraffic="true" on its <application> element; remove it before a store build.
- React Native: run
cmpatch init --server-url http://localhost:3000from your project root. It creates one app per platform and wires the SDK into your app. OTA updates apply to release builds only, because debug builds load JavaScript from Metro. See Local quickstart › React Native. - Capacitor: install the SDK (
@codemagic/capacitor-patch) in your app and the CLI (@codemagic/capacitor-patch-cli) globally, sign in withcmpatch-capacitor login --server-url http://localhost:3000, and create one app per platform withcmpatch-capacitor app create. Then put the URLs and deployment keys incapacitor.config.tsand runnpx cap sync. See Local quickstart › Capacitor.
- React Native:
cmpatch demobuilds a ready-made storefront app, publishes a one-line fix after you confirm, and lets you watch the app install it over the air. It needs Node.js22.20+, Yarn (via Corepack), and either Xcode with an iOS Simulator or an Android SDK with a running emulator. See the on-device demo. - Capacitor: the Ionic example app runs the check, download, install, and rollback cycle against the local stack from a clone of this repository.
cmpatch selfhost local-eval down # keeps the data for the next start
cmpatch selfhost local-eval down --delete-data # removes the data too
⚠️ Evaluation only, not a deployment. Authentication is disabled and every port binds to localhost. To deploy on your own domains, see Going to production.
Install the server from your own machine. You need a host you can reach over SSH, two hostnames (one for the API and dashboard, one for artifact storage), and a GitHub, Bitbucket Cloud, or GitLab account for sign-in. The wizard asks for everything else, and offers to put Cloudflare or CloudFront in front of storage.
npm install -g @codemagic/patch-cli
cmpatch selfhost installThen connect your app and publish a release:
| React Native | Capacitor | |
|---|---|---|
| Connect the app | cmpatch init |
cmpatch-capacitor app create, then capacitor.config.ts |
| Publish a release | cmpatch release-react |
cmpatch-capacitor release create |
| Guides | Native setup · First release | Native setup · First release |
Start with the Install guide for the server. Backups, restores, and upgrades also run from your machine, with cmpatch selfhost backup, restore, and upgrade (see Operations).
The full documentation is at patch.codemagic.io/docs. Pages that differ between frameworks have a React Native / Capacitor switcher.
| Topic | Pages |
|---|---|
| Learn | How it works · Core concepts · How delivery works · How Patch compares: React Native / Capacitor |
| Run the server | Install · Cloudflare · CloudFront · Infrastructure · Ongoing maintenance |
| Integrate the SDK | Native setup: React Native / Capacitor · Checking for updates · Applying updates · Manual control |
| Ship releases | Dashboard · Releasing updates · Fingerprinting (React Native) · Binary versions (Capacitor) · Verify a test release · Preparing for production · Production control · Security and code signing · CI integration |
| Operate | Operations · Analytics · Troubleshooting · FAQ |
| Reference | SDK · cmpatch CLI · cmpatch-capacitor CLI · Configuration · Delivery protocol |
| Migrate | From CodePush · From Expo Updates · From Appflow Live Updates |
| Release notes | All components |
Your feedback helps us improve Codemagic Patch. Tell us what works well, what has been challenging, and what you would like to see next.
- 💬 Ask questions in the Codemagic Discord, where our developers help out and take feature requests.
- 🗣️ Start a discussion in GitHub Discussions.
- 📅 Book a feedback call, or email zach@codemagic.io.