Skip to main content
Overlayed provides two update systems: App updates (the Electron app) and Site updates (your frontend).

App Updates

The overlayed.updater module provides methods to check for updates, switch channels, and install updates.

Checking for Updates

Listening to Update Events

Installing Updates

After an update is downloaded, you can install it:
Alternatively, you can wait for the checkForUpdates promise to resolve:
quitAndInstall will throw an error if canUpdate() returns false. This happens when the user is currently in a game.

Private Channels

For private update channels, you must provide an access token fetcher:
The fetcher is only called when the update server says a check needs a token. When the user has no access to their private channel, authTokenInvalid fires once per channel and the check falls back to the default channel’s release, even when it’s older than the build they have (or fails, when the app doesn’t allow public releases), so there is no need to check again in the handler:
See Private Channels for full server implementation examples.

Switching Channels

To switch update channels (e.g., from stable to beta):

Rollbacks

The update server sends a player an older build than the one they have when the release they’re on can no longer be served to them: it was revoked or deleted, its rollout was lowered or rescheduled so the player is now outside it, or they lost access to its private channel. A rollback arrives through the same events as any other update (updateAvailable, then updateDownloaded) and installs with quitAndInstall. A tester moved off a draft release they had installed doesn’t get a rollback, so from 2.9.1 they keep the draft’s build until a newer release arrives.
  • From @overlayed/app 2.9.1, a regular checkForUpdates() installs an older build only when the server marks it as one of these rollbacks. Any other older build it’s offered is not installed, and updateNotAvailable fires instead.
  • switchChannel can always move to an older build, so switching to a channel whose newest build is older still works.
  • Earlier versions of @overlayed/app install whatever build the update check returns, older ones included.
See Changing a Rollout for the changes that roll players back, and update rules for pins and forced channels that move users to an older build.

Site Updates

The overlayed.updater.site module handles Site updates separately from App updates.

Automatic Updates (Default)

By default, Site updates are applied automatically. When you deploy a new Site version, users will receive it on the next call of BrowserWindow#loadURL.

Manual Updates

To control when Site updates are applied, enable manual updates:
Then listen for new versions and prompt users:

Application Info

The overlayed.application module provides information about the current release:
We recommend showing the channel and version in your UI to help users give better feedback and bug reports.

Update Events Reference