Skip to content

How to Self-Host React Native Over-the-Air Updates In 20 Min

Beto, September 8, 2026 · 9,076 views

This video shows how to self-host over-the-air (OTA) updates for React Native apps using Codemagic Patch. It covers deploying the update server on a cloud virtual machine, connecting a custom domain, and publishing JavaScript fixes. The video also explains the architecture behind Patch and how it differs from traditional OTA solutions.

If you want full control over your update infrastructure, reduce costs at scale, or prioritize privacy by owning your data, this guide is for you. It walks through setup, integration with your app, and how Patch ensures safe and efficient updates.

What's inside

  • Why self-host React Native OTA updates with Codemagic Patch
  • Patch architecture: static manifests and CDN benefits
  • How Patch bundles, fingerprints, and delivers updates
  • Setting up a virtual machine and firewall on DigitalOcean
  • Configuring DNS and GitHub OAuth for authentication
  • Installing and running Patch with the interactive CLI
  • Creating an app and deployment in the Patch dashboard
  • Integrating Patch SDK in a React Native app and releasing updates

Why self-host React Native OTA updates with Codemagic Patch

Self-hosting OTA updates sounds complicated but Patch simplifies it by packaging the dashboard, release processing, database, file storage, and secure access into a Docker setup. This lets you keep control of your data and update files while potentially saving money as your app scales.

The trade-off is that you own and maintain the service yourself. Patch is open source and maintained by Codemagic, so you get a reliable base with the option to customize or fork it. This approach is especially appealing if you send many updates monthly and want privacy and cost control.

Patch architecture: static manifests and CDN benefits

Traditional OTA servers respond to every update check by querying a database, which can become a bottleneck at scale. Patch uses a different approach: when you publish an update, it creates a small static manifest mapping releases to deployments and native app versions.

This manifest and update files are stored in object storage and served through a CDN. This means many devices can fetch the same cached manifest without hitting the server or database repeatedly. If the server goes down, updates still work because the CDN serves the files.

In the demo, files are served directly from the server, but in production you should place storage behind a CDN for scalability and reliability.

How Patch bundles, fingerprints, and delivers updates

When you publish a release with the Patch CLI, it bundles your JavaScript and computes a native fingerprint representing the native app version. This fingerprint prevents incompatible updates from breaking the app by ensuring the native layer matches.

The bundle and manifest are uploaded to object storage. On the client side, the Patch SDK fetches the manifest for its deployment and downloads either the full bundle or a smaller binary patch if available. After the first full bundle, subsequent updates can be sent as diffs, saving bandwidth.

The SDK also reports metrics like downloads, installs, and failures back to the server, visible in the dashboard.

Setting up a virtual machine and firewall on DigitalOcean

The video uses a DigitalOcean Droplet as the virtual machine to run Patch. Recommended specs are 4 GB RAM and 80 GB SSD on Ubuntu. After creating the Droplet, you copy its public IPv4 address.

Next, create a firewall to allow inbound SSH (default), HTTP (port 80), and HTTPS (port 443) traffic. This protects your server while enabling web access and secure connections for Patch.

Configuring DNS and GitHub OAuth for authentication

Using Cloudflare DNS, the video sets up two A records pointing subdomains (e.g., u.cwb.sh and storage.u.cwb.sh) to the Droplet IP. Proxying is disabled to allow direct access.

For authentication, GitHub OAuth is configured by creating a new OAuth application with the dashboard URL and callback path. The client ID and secret are then used during Patch setup. The dashboard access is invite-only, so only authorized users can log in.

Installing and running Patch with the interactive CLI

With SSH access to the Droplet, install the latest Codemagic Patch CLI locally. Run the interactive installer command, which connects to the server, installs Docker, and sets up Patch components including PostgreSQL, MinIO object storage, TLS certificates, and the dashboard.

You provide your domain names, admin email, and GitHub OAuth credentials during setup. The CLI automates the entire process, making it possible to have a working Patch server in minutes.

Creating an app and deployment in the Patch dashboard

After installation, access the dashboard via your domain and sign in with GitHub. Create a new application and deployments for each platform (iOS, Android). You can invite team members to access the dashboard.

Each deployment provides a unique deployment key used to configure your app. You can also enable code signing for extra security, which rejects unsigned updates.

Integrating Patch SDK in a React Native app and releasing updates

Install the Codemagic React Native Patch SDK and add the deployment keys to your app.json or app.config. Prebuild your project and add code to check for updates using the function from the SDK, specifying install modes like immediate or on next restart.

To release an update, use the CLI command with your server URL, app name, deployment, and release notes. The CLI bundles your JavaScript and uploads it to your server.

On the client, the update is downloaded and applied automatically. You can monitor update metrics and rollout status in the dashboard.

Patch also supports native fingerprinting to prevent incompatible updates. You can inspect fingerprints with and optionally bypass mismatches if you know the changes are safe.

Resources

CourseReact Native course

Premium resourcePro membership

Let's connect!

Had a win? Get featured on Code with Beto.Share your story