@tauri-apps/plugin-updater
In-app updates for Tauri applications: check the configured endpoints for a new release, download it and install it.
Functions
Section titled “Functions”check()
Section titled “check()”function check(options?: CheckOptions): Promise<Update | null>;Defined in: plugins/updater/guest-js/index.ts:288
Checks the configured endpoints for an available update.
Example
Section titled “Example”import { check } from '@tauri-apps/plugin-updater';
const update = await check();if (update) { console.log(`update ${update.version} is available`); await update.downloadAndInstall();}Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options? |
CheckOptions |
The headers, timeout, proxy and target to use for the update check request. |
Returns
Section titled “Returns”A promise resolving to the available Update, or null when no update is available.
2.0.0
Classes
Section titled “Classes”Update
Section titled “Update”Defined in: plugins/updater/guest-js/index.ts:77
An update announced by the update server, as returned by check.
It holds a resource on the Rust side, so call Update.close when you are done with it
without installing it.
2.0.0
Extends
Section titled “Extends”Resource
Indexable
Section titled “Indexable”[key: number]: () => Promise<void>Constructors
Section titled “Constructors”new Update()
Section titled “new Update()”new Update(metadata: UpdateMetadata): Update;Defined in: plugins/updater/guest-js/index.ts:121
Creates an update from the metadata returned by the backend.
You should not need to call this yourself, use check instead.
Example
Section titled “Example”import { check } from '@tauri-apps/plugin-updater';// the update instance is created for you by `check`const update = await check();Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
metadata |
UpdateMetadata |
The update information returned by the backend, including the resource identifier of the update. |
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Resource.constructorProperties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
available |
boolean |
Whether an update is available. Deprecated This is always true, check if the return value is null instead when using check |
plugins/updater/guest-js/index.ts:84 |
body? |
string |
The release notes of the update, when the server provided them. | plugins/updater/guest-js/index.ts:100 |
currentVersion |
string |
The version of the application that is currently running. | plugins/updater/guest-js/index.ts:88 |
date? |
string |
The publish date of the update as an RFC 3339 string, when the server provided one. | plugins/updater/guest-js/index.ts:96 |
rawJson |
Record<string, unknown> |
The raw update manifest returned by the server, useful when it contains additional fields that the updater itself does not handle. | plugins/updater/guest-js/index.ts:105 |
version |
string |
The version announced by the update server. | plugins/updater/guest-js/index.ts:92 |
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get rid(): number;Defined in: @tauri-apps/api/core.d.ts:412
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”Resource.ridMethods
Section titled “Methods”close()
Section titled “close()”close(): Promise<void>;Defined in: plugins/updater/guest-js/index.ts:262
Releases the update resource and the downloaded bytes held by the backend.
Example
Section titled “Example”import { check } from '@tauri-apps/plugin-updater';
const update = await check();if (update) { await update.close();}Returns
Section titled “Returns”Overrides
Section titled “Overrides”Resource.closedownload()
Section titled “download()”download(onEvent?: (progress: DownloadEvent) => void, options?: DownloadOptions): Promise<void>;Defined in: plugins/updater/guest-js/index.ts:154
Downloads the updater package. Call install later to install it.
Example
Section titled “Example”import { check } from '@tauri-apps/plugin-updater';
const update = await check();if (update) { let downloaded = 0; await update.download((event) => { if (event.event === 'Progress') { downloaded += event.data.chunkLength; console.log(`downloaded ${downloaded} bytes`); } }); await update.install();}Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
onEvent? |
(progress: DownloadEvent) => void |
Callback invoked with a Started event when the first chunk is received, a Progress event for every downloaded chunk and a Finished event when the download completes. |
options? |
DownloadOptions |
The headers and the timeout to use for the download request. |
Returns
Section titled “Returns”downloadAndInstall()
Section titled “downloadAndInstall()”downloadAndInstall(onEvent?: (progress: DownloadEvent) => void, options?: DownloadOptions & InstallOptions): Promise<void>;Defined in: plugins/updater/guest-js/index.ts:233
Downloads the updater package and installs it
Platform-specific
- Windows: This function exits the app after launching the updater installer successfully
- macOS / Linux: You need to relaunch the app to run the newly install version
Example
Section titled “Example”import { check } from '@tauri-apps/plugin-updater';
const update = await check();if (update) { await update.downloadAndInstall((event) => { console.log(event.event); });}Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
onEvent? |
(progress: DownloadEvent) => void |
Callback invoked with a Started event when the first chunk is received, a Progress event for every downloaded chunk and a Finished event when the download completes. |
options? |
DownloadOptions & InstallOptions |
The headers and the timeout to use for the download request, and the installation options. |
Returns
Section titled “Returns”install()
Section titled “install()”install(options?: InstallOptions): Promise<void>;Defined in: plugins/updater/guest-js/index.ts:195
Install downloaded updater package. Must be called after download.
Platform-specific
- Windows: This function exits the app after launching the updater installer successfully
- macOS / Linux: You need to relaunch the app to run the newly install version
Example
Section titled “Example”import { check } from '@tauri-apps/plugin-updater';
const update = await check();if (update) { await update.download(); await update.install();}Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options? |
InstallOptions |
Options for the installation, such as whether the Windows installer should restart the app afterwards. |
Returns
Section titled “Returns”Interfaces
Section titled “Interfaces”CheckOptions
Section titled “CheckOptions”Defined in: plugins/updater/guest-js/index.ts:15
Options used when checking for updates
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
headers? |
HeadersInit |
The headers to send along with the update check request. | plugins/updater/guest-js/index.ts:19 |
proxy? |
string |
A proxy url to be used when checking and downloading updates. | plugins/updater/guest-js/index.ts:27 |
target? |
string |
Target identifier for the running application. This is sent to the backend. | plugins/updater/guest-js/index.ts:31 |
timeout? |
number |
Timeout in milliseconds | plugins/updater/guest-js/index.ts:23 |
DownloadOptions
Section titled “DownloadOptions”Defined in: plugins/updater/guest-js/index.ts:35
Options used when downloading an update
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
headers? |
HeadersInit |
The headers to send along with the update download request. | plugins/updater/guest-js/index.ts:39 |
timeout? |
number |
Timeout in milliseconds | plugins/updater/guest-js/index.ts:43 |
Type Aliases
Section titled “Type Aliases”DownloadEvent
Section titled “DownloadEvent”type DownloadEvent = | { data: { contentLength?: number; }; event: "Started";} | { data: { chunkLength: number; }; event: "Progress";} | { event: "Finished";};Defined in: plugins/updater/guest-js/index.ts:64
Updater download event
© 2026 Tauri Contributors. CC-BY / MIT