HotupdaterHot Updater
Self Hosting (Managed)

Azure Provider

Deploy Hot Updater on Azure with Blob Storage, Azure Functions, and Cosmos DB, then connect your app.

Overview

Use this preset to provision an OTA server on Azure: bundles in Azure Blob Storage, metadata in Azure Cosmos DB for NoSQL, and the server in an Azure Functions app. For a new app, start with Choose infrastructure. Provision the provider resources here, then connect your app with the verified URL and key.

Prerequisites

You need the following resources and access. An AI agent can prepare missing resources through its available provider tools.

  • Node.js 22+: The Azure SDKs @hot-updater/azure uses require Node.js 22 or later, and the Function runs on Node.js 22. Agent setup uses a client-key helper that requires Node 22.18+ or Node 24+; prepare it before provisioning resources.
  • Azure subscription: Sign in with an account that can create resource groups, storage accounts, Cosmos DB accounts, and Function Apps in the subscription.
  • Azure CLI 2.60.0+ (terminal setup): Install az; Flex Consumption needs 2.60.0 or later. Init runs az login when the CLI is not signed in yet.

Step 1: Install required packages

Complete Install packages in the React Native project before running init or an agent scaffold. Install the CLI, React Native SDK, and the build adapter that matches your app, then install this provider:

npm install @hot-updater/azure --save-dev

An agent can perform these steps after inspecting the app's package manager and build configuration.

Step 2: Configure Azure

Choose how to set up Azure:

Install the Hot Updater skill, then ask your coding agent:

$hot-updater Set up infrastructure on Azure for this project.

The agent inspects your app, discovers existing configuration and resources, and asks only for missing choices or access. It uses hot-updater agent infra setup to generate the deployment templates, then applies and verifies them with the Azure CLI. If authentication is needed, sign in with az login or save credentials in a local ignored file; do not paste secrets into the conversation. See Agent Infrastructure for setup and resume.

After setup, review the local configuration. Interactive init writes the settings below to .env.hotupdater; an agent merges the needed settings into your project. The resource names are persisted for deterministic reruns, and init saves the two connection strings, which hot-updater.config.ts reads to reach the storage account and Cosmos DB, again on every run.

HOT_UPDATER_AZURE_SUBSCRIPTION_ID=your-subscription-id
HOT_UPDATER_AZURE_RESOURCE_GROUP=hot-updater
HOT_UPDATER_AZURE_LOCATION=eastus
HOT_UPDATER_AZURE_STORAGE_ACCOUNT=your-storage-account
HOT_UPDATER_AZURE_COSMOS_ACCOUNT=your-cosmos-account
HOT_UPDATER_AZURE_FUNCTION_APP=your-function-app
HOT_UPDATER_AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...
HOT_UPDATER_AZURE_COSMOS_CONNECTION_STRING=AccountEndpoint=https://...;AccountKey=...
HOT_UPDATER_API_KEY=your-api-key

Managed init reuses HOT_UPDATER_API_KEY when supplied or creates an API key, registers it in Cosmos DB, and persists the plaintext value locally. Send this API key in the app's x-api-key request header. To list, add, or revoke keys later, run hot-updater api-key from the app directory.

Provider credentials from .env.hotupdater are not included in your app bundle unless you explicitly configure that behavior. The API key is the exception: add HOT_UPDATER_API_KEY to your React Native build-time configuration as shown in Set up your app, but never add the Azure connection strings.

See Security.

Optional: Bundle signing

Managed Azure init does not create or enable a signing key. The built-in local config works without a signing adapter. Signing is independent of storage and database choice; embed the chosen public key in a native release before deploying signed bundles. Signing credentials belong in the deploy environment, never in the React Native app.

Step 3: Add HotUpdater to your project

After provisioning, record these outputs for Set up your app:

OutputValue
Client base URLhttps://<Function App default host name>
Client request headerx-api-key
Client API keyThe saved HOT_UPDATER_API_KEY in your ignored .env.hotupdater
Deploy configurationhot-updater.config.ts and the selected provider resources

Use the actual URL init prints. Configure the SDK and native bundle loader through Set up your app, using the selected build adapter and the same update strategy as hot-updater.config.ts. Only the client API key belongs in the mobile app's build-time configuration; provider credentials stay in the deploy environment.

The managed Azure runtime exposes /version publicly. OTA update checks, Insights ingestion, and Remote Config fetches require x-api-key: $HOT_UPDATER_API_KEY. Internally, the Function runs the insights(), apiKeys(), and remoteConfig() plugins and mounts only handlers.client. Admin routes, including Insights queries and Remote Config publishing, are not mounted on the public Function URL.

Generated configuration and operations

Init generates hot-updater.config.ts with your Azure storage and database, and plugins: the server plugins the managed Function runs, apiKeys(), insights(), and remoteConfig(), imported from hot-updater/plugins. The CLI and the Console reach Blob Storage and Cosmos DB through these settings and run the same plugins as the Function. The managed Function runs these official plugins only; to run other server plugins, use a custom server.

On a rerun, init updates storage, database, and plugins in the existing file and keeps your other settings, including a wrapped build such as withSentry(bare()). When it cannot edit hot-updater.config.ts, such as a config that a function returns, it leaves the file unchanged and prints the storage, database, and plugins lines to add.

hot-updater.config.ts
import { azureBlobStorage, cosmosDatabase } from "@hot-updater/azure";
import { bare } from "@hot-updater/bare";
import { apiKeys, insights, remoteConfig } from "hot-updater/plugins";
import { defineConfig } from "hot-updater";
import { existsSync } from "node:fs";

if (existsSync(".env.hotupdater")) {
  process.loadEnvFile(".env.hotupdater");
}

export default defineConfig({
  build: bare({ enableHermes: true }),
  storage: azureBlobStorage({
    connectionString: process.env.HOT_UPDATER_AZURE_STORAGE_CONNECTION_STRING!,
    containerName: "hot-updater",
  }),
  database: cosmosDatabase({
    connectionString: process.env.HOT_UPDATER_AZURE_COSMOS_CONNECTION_STRING!,
  }),
  plugins: [apiKeys(), insights(), remoteConfig()],
  updateStrategy: "appVersion", // or "fingerprint"
});

Resource names

Bundles live in the storage account's hot-updater container. Cosmos DB keeps every item in the hot_updater_v1 container of the hot-updater database. The Function App serves every route from its default host name: its host.json drops the /api route prefix. The Function reads its storage and Cosmos DB connection strings from the app settings HOT_UPDATER_AZURE_STORAGE_CONNECTION_STRING, HOT_UPDATER_AZURE_BLOB_CONTAINER, and HOT_UPDATER_AZURE_COSMOS_CONNECTION_STRING.

Release catalog cache

Azure uses the Function App URL in origin-only mode. Catalog checks use the precompiled Release Catalog and the runtime's short in-process cache, but every device request invokes the Function. Devices download bundles through read-only SAS URLs that expire after an hour.

Step 4: If you use Expo, add the config plugin

Follow the Expo path in Set up your app. It applies the config plugin and generates the native integration. For DOM components, continue with Expo DOM components.

Step 5: Add native code

For Bare or Rock, follow the Android and iOS instructions in Set up your app. Keep the integration appropriate to your React Native version and rebuild the native app after changing it.

Upgrade infrastructure

With the Hot Updater skill attached, ask your agent:

$hot-updater Upgrade this project's existing Azure server infrastructure.

The agent discovers the existing deployment, uses hot-updater agent infra upgrade, and reads the applicable version files before changing resources. It applies pending changes and verifies the server with doctor. Rerunning hot-updater init with the saved inputs also migrates the database and redeploys the Function. See Upgrade an existing server for the workflow or Doctor for terminal instructions.

For server templates to apply with your own deployment tooling, use hot-updater infra scaffold --provider azure. See Infrastructure Templates.

Verifying the setup

  1. Confirm the selected Azure resources and the deployed client base URL.

  2. From the React Native project, check the server and native integration:

    npx hot-updater doctor --server-base-url <client-base-url> --json

    Doctor checks the public /version endpoint. It does not prove an authenticated update download or application.

  3. Complete Test an OTA update on a release build. Verify that the app downloads and runs the changed code, then survives a restart.

An agent should report the selected resources, verified URL, configuration file paths and verification result. Report a missing access, quota or native-build prerequisite explicitly instead of marking an untested installation complete.

Host the Console

Host the console on Vercel, Netlify, or Docker/Node with the same two connection strings. Azure App Service or Azure Container Apps are other options when you want to keep the Console in the same subscription. See the console hosting matrix.

On this page