HotupdaterHot Updater
Self Hosting (Managed)

Infrastructure Templates

Extract versioned server deployment templates for your own provider tooling.

Extract server templates

hot-updater infra scaffold extracts the server deployment files shipped with the CLI. Use it directly in your terminal or scripts, then fill and deploy the files with your provider tools.

In a server-only directory, install hot-updater before running these commands. For app onboarding, follow the complete package installation first.

npx hot-updater infra scaffold --provider cloudflare
npx hot-updater infra scaffold --provider supabase
npx hot-updater infra scaffold --provider aws
npx hot-updater infra scaffold --provider firebase

Only --provider is required. No React Native app, build adapter, credentials, provider package installation or AI agent is needed to extract the files. The command does not authenticate, create resources or deploy.

Output

The default output is hot-updater-infra/<provider>/scaffold-<cli-version>. Choose a custom directory or get paths as JSON:

npx hot-updater infra scaffold --provider cloudflare --output ./server --json
ProviderServer files
CloudflareBundled Worker, Wrangler configuration and D1 migrations
SupabaseEdge Function, complete Deno imports/vendor files, SQL migrations and project configuration
AWSLambda bundle and pinned dependencies, CloudFront specifications, DynamoDB/IAM JSON inputs and SSM reference source
FirebaseBuilt Functions project, pinned dependencies, Firebase configuration and Firestore indexes

manifest.json records the provider, target CLI/provider/server versions, infrastructure generation, resource inputs and original file hashes. upgrades/<version>.md records each required infrastructure release, and upgrades/README.md lists the files in the order also used by doctor. Runtime dependency manifests live in each deployment project. JSON output also includes doctor.command and doctor.args for verifying the selected scaffold after configuring its resource inputs.

Repeating the command preserves compatible output, including manual edits. An incompatible or incomplete directory produces an error without replacing files. Use a fresh output directory to compare a newer template with an existing deployment.

Apply the files

  1. Select or create provider resources using your own tools and record their actual identifiers. Follow the linked provider guide for account and service prerequisites.
  2. Read upgrades/README.md and all relevant version files before changing an existing deployment. Include the installed generation's baseline for context and each subsequent requirement through the target; do not skip intermediate releases. Replace all __HOT_UPDATER_*__ and %%BUCKET_NAME%% placeholders with verified values, preserving string/SQL escaping. Inspect and apply pending schema/index changes.
  3. Run the scaffold check after configuring resource inputs and repair any failures. Fresh templates contain unresolved placeholders and are not expected to pass yet.
  4. Install the supplied deployment project's dependencies where applicable and deploy with your provider tooling. AWS reference/ files document the current infrastructure specifications; they are not standalone executable scripts. For AWS, dynamodb/*.json are full CLI requests (--cli-input-json), while iam/*.json are policy documents (--policy-document or --assume-role-policy-document). cloudfront/distribution.json is a DistributionConfig (--distribution-config); the cache/origin-policy JSON files are full requests. The IAM SSM path placeholder excludes the leading slash; the Lambda SSM name includes it. Preserve resource identities, secrets, custom settings and migration history.
  5. Run the infrastructure check against the real endpoint with a registered client key. Verify provider state and stored artifact access separately. App configuration and client-key provisioning remain separate work; extraction alone does not configure a mobile app.

Verify the scaffold

Use the same CLI version that extracted the files. These scopes work in a server-only directory without a React Native app or Hot Updater app config:

npx hot-updater doctor --scope scaffold --infra-dir ./server --json

Doctor checks the manifest, required files, unresolved placeholders, syntax and provider settings. Intended customizations are allowed; changing the manifest's file list cannot hide a missing required file.

After deployment and client-key registration, verify the live server too:

npx hot-updater doctor --scope infrastructure --infra-dir ./server --json \
  --server-base-url https://updates.example.com \
  --platform ios --channel production --app-version 1.0.0

Replace the example directory, URL, platform, channel and compatibility target with your actual values. Use --fingerprint <fingerprint> instead of --app-version for fingerprint updates. Provide the client credential that the manifest's clientAuth names privately, through its variable (HOT_UPDATER_API_KEY for the managed servers' apiKeys()) or .env.hotupdater in the command's working directory; never put it in command arguments.

Require exit code 0 and success: true for the requested details.verification.scope. Read checks for failures and notChecked for what remains: remote resource bindings/migrations, local storage access, artifact downloads and app/native OTA verification. See Doctor for the full contract. Passing these scopes does not certify a native OTA update.

Agent setup and upgrades

hot-updater agent infra setup and upgrade reuse this extractor. They add provider instructions, app config templates for the selected build adapter, client-key and server verification helpers, and a deployment record for resuming work. The server deployment files are shared across all three commands.

On this page