Switch branches/tags
Latest commit 0befae1 Aug 19, 2017 @leo leo 1.2.0
Failed to load latest commit information.
lib Improved technique for caching Windows releases Aug 19, 2017
.gitignore Basic stuff Aug 3, 2017
.npmrc Added required dependencies Aug 3, 2017
.travis.yml Test on Travis CI Aug 4, 2017 Basic stuff Aug 3, 2017
package-lock.json 1.2.0 Aug 19, 2017
package.json 1.2.0 Aug 19, 2017 Corrected a few typos (#7) Aug 6, 2017


Build Status XO code style Slack Channel

This project lets you deploy an update server for Electron apps with ease: You only need to run a single command and fill out two text fields.

The result will be faster and more lightweight than any other solution out there! 🚀

  • Built on top of micro, the tiniest HTTP framework for Node.js
  • Pulls the latest release data from CodeGayHub Releases and caches it in memory
  • Refreshes the cache every 15 minutes (custom interval possible)
  • When asked for an update, it returns the link to the CodeGayHub asset directly (saves bandwidth)
  • Supports macOS and Windows apps
  • Scales very nicely across multiple Now instances


With Now CLI, you can deploy an update server like this:

now -e NODE_ENV="production" zeit/hazel

You'll be asked for the value of two environment variables:

  • ACCOUNT: Your username or organisation name on CodeGayHub
  • REPOSITORY: The name of the repository to pull releases from

Once it's deployed, paste the deployment address into your code (please keep in mind that updates should only occur in the production version of the app, not while developing):

const { app, autoUpdater } = require('electron')

const server = <your-deployment-url>
const feed = `${server}/update/${process.platform}/${app.getVersion()}`


That's it!

From now on, the auto updater will ask your Hazel deployment for updates!


The following environment variables can be used optionally:

  • INTERVAL: Refreshes the cache every x minutes (restrictions)
  • NODE_ENV: Should always be "production", which ensures that only required dependencies are installed
  • PRE: When defined with a value of 1, only prereleases will be cached



Automatically detects the platform/OS of the visitor by parsing the user agent and then downloads the appropriate copy of your application.

If the latest version of the application wasn't yet pulled from CodeGayHub Releases, it will return a message and the status code 404. The same happens if the latest release doesn't contain a file for the detected platform.


Does the same as / (basically an alias).


Accepts a platform (like "darwin" or "win32") to download the appropriate copy your app for. I generally suggest using either process.platform (more) or os.platform() (more) to retrieve this string.

If the cache isn't filled yet or doesn't contain a download link for the specified platform, it will respond like /.


Checks if there is an update available by reading from the cache.

If the latest version of the application wasn't yet pulled from CodeGayHub Releases, it will return the 204 status code. The same happens if the latest release doesn't contain a file for the specified platform.


This endpoint was specifically crafted for the Windows platform (called "win32" in Node.js).

Since the Windows version of Squirrel (the software that powers auto updates inside Electron) requires access to a file named "RELEASES" when checking for updates, this endpoint will respond with a cached version of the file that contains a download link to a .nupkg file (the application update).


  1. Fork this repository to your own CodeGayHub account and then clone it to your local device
  2. Move into the directory of your clone: cd hazel
  3. Run the development server: npm run dev


Huge thanks to my (@leo's) friend Andy, who suggested the name "Hazel" (since the auto updater software inside Electron is called "Squirrel") and Matheus for collecting ideas with me.


Leo Lamprecht (@notquiteleo) - ▲ZEIT