Skip to content

Auto Update

This documentation will explain how to run your auto-update server.

Serve your bundle

Make sure your bundle is served over HTTPS, and the server has the right CORS headers to allow the app to download the update. e.g.

If you’re unfamiliar with serving a bundle, we recommend you try Capgo Cloud or see an example here:


Add an updateUrl to your capacitor.config.json.

"plugins": {
"CapacitorUpdater": {
"updateUrl": "",

Update API

The plugin will do a POST call to your API each time the app is open, with this body:

interface AppInfos {
"platform": "ios" | "android",
"device_id": "UUID_of_device_unique_by_install",
"custom_id": "your_custom_id_set_on_runtime",
"plugin_version": "PLUGIN_VERSION",
"version_name": "LAST_DOWNLOADER_VERSION" | "builtin"
"version_os": "VERSION_OF_SYSYEM_OS",
"is_emulator": boolean,
"is_prod": boolean,

The server API should respond, in JSON, to the capacitor-updater plugin. With this data if an update is necessary:

"version": "1.2.3",
"url": ""

In Auto-update mode the server should compare the versions and return the right one, if the URL key is present, the plugin starts the download process.

If you add “message” and “error” key, the version will not be set, and the message will be displayed in logs instead.

version key should be in semver format.

The zip should have index.html as a file at the root, or only one folder at the root with index.html inside.

You can use the command of the CLI to zip your bundle:

Create a bundle with your files to serve from your server
npx @capgo/cli bundle zip --path [/path/to/my/bundle]