Beta
Names and options here can still change. See What Beta means.
Signing keys and rotation
Releases are signed with ECDSA P-256. The private key stays with you (on your machine or in CI secrets); Notti and the app only ever see public keys.
npx notti ota keys generate --out notti-live-updates.private.pemThen do both:
- Register the public key on the App: dashboard, Live updates > Signing keys > Add key (or
POST /v1/apps/{app_id}/ota/keys). The server refuses releases signed with a key it does not know. An App holds up to 5 keys. - Embed the public key in the binary:
publicKeysin the Expo plugin, orNottiOTAPublicKeysin a bare app. The device trusts only the keys in its own binary.
The key_id is the first 8 bytes of the SHA-256 of the 65-byte uncompressed public point, in lowercase hex.
Rotating keys
Because a binary trusts only the keys embedded in it, rotate in this order:
- Generate the new key and register it on the App.
- Ship a binary that embeds both the old and the new public keys.
- When most users run that binary, sign new releases with the new key.
- Remove the old key from the next binary and from the App.
Devices on a binary without the new key report verification_failed with reason unknown_key for releases signed with it, and keep running what they have. Removing a key from the App does not affect releases it already signed; it only stops new releases.
If a private key leaks, treat it as compromised: register a new key, ship a binary that trusts it and no longer trusts the old one, and remove the old key from the App.
Runtime version
The runtime version says which binaries a release can run on. Change it whenever native code changes: a new native module, an SDK upgrade, a React Native upgrade. The server only offers a release to devices with the same runtime version, and the device also checks the Hermes bytecode version.
- Expo:
runtimeVersionin the plugin options. - Bare:
NottiOTARuntimeVersion. - CLI:
--runtime-version, which must match the binaries you target.
A runtime version is a string of 1 to 64 characters. Pick a scheme and keep to it, for example the app's native version (1.4.0) bumped on every native change. If you publish a release for a runtime version no binary has, no device receives it. If you ship a binary with new native code and keep the old runtime version, devices on it can receive a JavaScript bundle that expects native code they do not have.
Channels
A channel is a name a release is published to and a binary is pinned to. Each binary reads one channel (production by default) from its configuration, and the device cannot change it at runtime. Use channels to separate audiences, for example staging for internal builds and production for the store build.
- A channel is
[a-z0-9-], 1 to 32 characters. - A release is published to one channel (
--channel). - Promoting a release between channels from the CLI is not available yet. Publish the release again to the other channel.
Rollout
--rollout 10 (or the dashboard) offers the release to about 10% of devices.
- Each device has a stable bucket from 0 to 99 for each release, derived from its installation and the release. The release is offered when the bucket is below the rollout percentage.
- Raising the rollout therefore only adds devices; the ones already included stay included.
- Lowering the rollout stops offering it to devices that have not got it. A device that already runs the release is never pulled off it: only releases newer than the current one are considered when a device checks.
- Rollout is 1 to 100. To stop a release entirely, disable it.
Mandatory updates
A release can be marked mandatory (--mandatory, or the dashboard). The SDK reports mandatory: true in addUpdateReadyListener when the update it just downloaded is mandatory, or when a mandatory release sits between the device's current release and the one it downloads (a device that skipped it). The SDK never restarts the app: your app decides how to ask the user (a restart prompt, for example).
Disabling a release
Disabling stops offering a release. A device that runs it gets the newest enabled release of its channel, platform and runtime version on its next check, or goes back to the embedded bundle when none is left. It never needs the plan to be active.