blog // · 1 min read

Serving app downloads and auto-updates from my own site

Why every camwooloo desktop app downloads and updates through camwooloo.com instead of GitHub, and how one small API keeps the newest release a single stable link.

My desktop apps, like Aurora PDF and Rustify, are built in Rust and released on GitHub. Until recently the download buttons pointed straight at GitHub release files. That works right up until you want to make a repository private, at which point every download link and every built-in updater breaks at once.

One stable link per app

Every project now has a download address on this site:

  • /projects/<app>/download/<file> serves the newest release file, or an older one with ?tag=.
  • /projects/<app>/latest.json is the update manifest an app checks on launch: the version, the file, its SHA-256 and the release notes.

Behind both is a small serverless function that asks GitHub for the newest release with a read-only token, then streams the file back. The visitor never sees GitHub, and the token never leaves the server, so the same links keep working whether a repository is public or private.

Updaters should never know where files live

The important part is the order of operations. An app has to ship an update that points at the site before its repository goes private, or older copies are left checking an address they can no longer reach. Aurora PDF 0.2.0 was the first app to ship a self-updater that reads latest.json from camwooloo.com, so its repository can now go private without stranding anyone.

When a release has its own Tauri latest.json, the site serves that file with its GitHub links rewritten to site links. Otherwise it builds one from the release itself, using GitHub's own checksum for each file.

What it buys

Each project page has a releases tab with the full history and the right file for your system picked out. The links are short enough to paste, they unfurl with a proper preview in Discord, and if I ever move off GitHub, only one function has to change.

More from the blog

  1. Cosmos Craft, seven million recipes and no server

    Cosmos Craft is a daily crafting game where you combine water, fire, wind and earth. Here is how it serves 7.1 million recipes as static files, with no API at all.

  2. Seventy design directions, one file each

    The camwooloo design gallery holds 60 home screens and 10 dashboards. Here are the rules behind it, from single-file pages with no images to a registry that keeps every design unique.

  3. Building Slot Club, a slot-car club that plays in the browser

    How Slot Club fits 135 model cars, fourteen circuits and a track builder into one browser tab, and why it moved into camwooloo.com.