A drop-in module that adds autoUpdating capabilities to Electron apps
Powered by the free and open-source update.electronjs.org service.
Before using this module, make sure your Electron app meets these criteria:
- Your app runs on macOS or Windows
- Your app has a public GitHub repository
- Your builds are published to GitHub Releases
- Your builds are code signed
npm i update-electron-app
Drop this anywhere in your main process:
That's it! Here's what happens by default:
- Repository URL is found in your app's
- Your app will check for updates at startup, then every ten minutes. This interval is configurable.
- No need to wait for your app's
readyevent; the module figures that out.
- If an update is found, it will automatically be downloaded in the background.
- When an update is finished downloading, a dialog is displayed allowing the user to restart the app now or later.
You can also specify custom options:
repo: 'github-user/repo'updateInterval: '1 hour'logger:
repoString (optional) - A GitHub repository in the format
owner/repo. Defaults to your
hostString (optional) - Defaults to
updateIntervalString (optional) - How frequently to check for updates. Defaults to
10 minutes. Minimum allowed interval is
loggerObject (optional) - A custom logger object that defines a
logfunction. Defaults to
console. See electron-log, a module that aggregates logs from main and renderer processes into a single file.
notifyUserBoolean (optional) - Defaults to
true. When enabled the user will be prompted to apply the update immediately after download.
What kinds of assets do I need to build?
For Windows, you'll need to build a
.exe file and include it in your GitHub Release.
Why is my app launching multiple times?
Windows apps have an update process that requires multiple application restarts. You can use the electron-squirrel-startup module to improve this behavior.
Can I use this module by uploading my private app's builds to a public GitHub repository?
If your app is packaged with
electron-builder, you may not need this module.
Builder has its own built-in mechanism for updating apps. Find out more at