Skip to content

Investigate integrated auto-update mechanism for RStudio Desktop #17173

Description

@gtritchie

Summary

RStudio Desktop currently has a basic "check for updates" feature that notifies users when a new release is available and provides a link to the download site. Most Electron apps (VS Code, Slack, Discord, Figma) have an integrated update mechanism that checks for updates, downloads in the background, and applies on restart. This issue tracks investigation and implementation of such a mechanism for RStudio Desktop.

Current State

The existing update check flow is: GWT frontend → RPC (check_for_updates) → C++ session module (SessionUpdates.cpp) → R subprocess (SessionUpdates.R) → HTTP GET to rstudio.org/links/check_for_update. The response includes version, message, URL, and urgency. The user sees a dialog with "Quit and Download" — they must manually download and install.

There is no update infrastructure in the Electron layer itself. The check lives entirely in the GWT/session stack. The desktop app is packaged with Electron Forge, using NSIS on Windows, .dmg on macOS, and .deb/.rpm on Linux.

Options

Option 1: electron-updater (from electron-builder)

The most widely used Electron auto-update library. Downloads updates in the background and applies on restart.

Platform behavior:

  • Windows (NSIS): Downloads the full NSIS installer, runs it silently on restart. Supports differential/block-map updates to reduce bandwidth.
  • macOS: Requires a .zip artifact (not .dmg). Downloads, extracts, and replaces the .app. Requires code signing.
  • Linux: Only supports AppImage format. Does not support .deb/.rpm.

Key consideration: electron-updater is designed for electron-builder. RStudio uses Electron Forge. Options are to switch packaging to electron-builder, or generate latest*.yml manifests manually as a post-build step and use the generic provider.

Update server: Static file host (S3, GCS, generic HTTPS) with installer artifacts plus latest*.yml manifests containing version, filename, size, and SHA-512 hash.

Pros: Battle-tested, large community, differential updates on Windows, handles code signing verification.
Cons: Designed for electron-builder (not Forge). No .deb/.rpm on Linux. Requires .zip on Mac.

Option 2: Electron built-in autoUpdater (Squirrel-based)

Electron ships with a built-in autoUpdater module based on the Squirrel framework.

  • macOS: Uses Squirrel.Mac. Downloads a .zip, extracts and replaces. Requires code signing. Mature and works well.
  • Windows: Uses Squirrel.Windows with its own installer format (not NSIS). Would require replacing NSIS with Squirrel's NuGet-based packaging — a significant change.
  • Linux: Not supported.

Update server: Needs a server responding to GET /update/<platform>/<version> with 200 + JSON or 204.

Pros: Built into Electron, no extra dependencies. Well-supported on macOS.
Cons: Requires Squirrel.Windows packaging (replaces NSIS). No Linux. Squirrel.Windows maintenance concerns.

Option 3: Hybrid — auto-updater for Windows/Mac, package manager for Linux

Use electron-updater or autoUpdater for Windows and macOS. On Linux, provide an APT/YUM repository that users add once, then get updates through apt upgrade / dnf upgrade. This is what VS Code, Slack, Chrome, and most Electron apps do on Linux.

Option 4: Download-and-prompt (enhanced current approach)

Keep current installer formats. Move the update check into the Electron main process and add background downloading:

  1. Electron main process checks the update endpoint
  2. Downloads the appropriate installer in the background
  3. Notifies the user that an update is ready
  4. On "Install and Restart": launch the NSIS installer with /S (silent) on Windows, handle .dmg on Mac, prompt on Linux

Pros: No packaging changes. Works with existing artifacts. Simpler server-side requirements.
Cons: More custom code. Platform-specific installation logic is tricky (elevation, replacing yourself while running). The .dmg flow on Mac is awkward to automate.

Option 5: Platform-native update frameworks

  • macOS: Sparkle — the standard macOS update framework. Supports delta updates, EdDSA signatures. Can integrate into Electron via a native Node addon.
  • Windows: WinSparkle or MSIX with built-in auto-update.
  • Linux: Package repository (same as Option 3).

Pros: Native frameworks are battle-tested and trusted. Sparkle is the gold standard on Mac.
Cons: Requires native addons. Two different frameworks to maintain. More complex build pipeline.

Comparison

Windows NSIS macOS .dmg Linux .deb/.rpm Packaging changes Server needs
electron-updater Silent NSIS reinstall + block-map diffs Needs .zip No (AppImage only) Switch to electron-builder or generate manifests Static file host + latest*.yml
Built-in autoUpdater Needs Squirrel (replaces NSIS) .zip No Major on Windows Squirrel-compatible server
Hybrid electron-updater electron-updater APT/YUM repo Same as electron-updater + repo hosting Same + package repo
Download-and-prompt Download + silent NSIS /S Download .dmg (awkward) Download + prompt None Enhanced update endpoint
Native (Sparkle/WinSparkle) WinSparkle or MSIX Sparkle (.zip) APT/YUM repo Native addons + appcast Appcast XML + artifact host

Key Decision Points

  1. Electron Forge vs electron-builder — electron-updater is tightly coupled to electron-builder's packaging output. Switching from Forge is the biggest friction point.
  2. macOS artifact format — auto-update mechanisms require .zip; the .dmg can still be offered for manual downloads.
  3. Linux strategy — almost certainly APT/YUM repositories rather than in-app updates, following industry convention.
  4. Server infrastructure — what can host the update manifests and artifacts, and whether the existing rstudio.org/links/check_for_update endpoint can be extended or a new one is needed.

Activity

  1. added theissue type on Mar 4, 2026
  2. added this to the Product Backlog milestone on Mar 11, 2026
  3. m13v commented on Mar 18, 2026

    @m13v

    we went through this for our macOS desktop app. for a non-Electron app, Sparkle is the standard choice on macOS - it handles checking, downloading, and applying updates with minimal code. the main pieces are: EdDSA key pair for signing, an appcast XML file hosted somewhere (GitHub Releases works), and the Sparkle framework linked in. the update check can happen on launch or on a schedule. for the cross-platform case (macOS + Windows + Linux), you'd need Sparkle on macOS and something like electron-updater or WinSparkle on Windows. we use Codemagic CI to generate the appcast automatically from GitHub Releases.

  4. m13v commented on Mar 18, 2026

    @m13v

    here's our macOS desktop app with Sparkle auto-update as a reference implementation: https://github.com/m13v/fazm - the CI pipeline handles signing, notarization, and appcast generation automatically. the build config is in codemagic.yaml.

  5. allyssonallan commented on Nov 2, 2026

    @allyssonallan

    +1 for this.

    From a macOS user perspective, the current update cycle introduces significant friction every release:

    Being redirected to the browser to download a large .dmg file.
    Mounting the disk image, manually dragging to replace the old application in /Applications.
    Dealing with macOS Gatekeeper/security verifications.
    Manually unmounting and deleting the installer file to free up disk space.

    Having a seamless, in-app "Update & Restart" button (similar to other modern Electron apps like VS Code, Claude, or ChatGPT) would save a lot of time and make it much easier to keep installations up to date with the latest bug fixes.

    Really glad to see this being investigated!

  6. self-assigned this
    on Nov 2, 2026
  7. gtritchie commented on Nov 2, 2026

    @gtritchie
    MemberAuthor

    For Linux, having an apt/yum repository would be nice as well, tracked (at least the deb-side) via #4186.

  8. kevinushey commented on Nov 2, 2026

    @kevinushey
    Collaborator

    Investigation notes (2026-11-02):

    Two corrections to the summary above. Electron Forge only packages the app here (no makers in forge.config.js); the NSIS/DMG/deb/rpm installers come from CPack, so the Forge-vs-electron-builder question doesn't constrain us. And since #18167 the Windows installer is NsisMultiUser with per-user and silent (/S) modes, so a background install without elevation is already possible.

    The current endpoint returns the same docs-page URL for every OS, with no arch, artifact, or hash, so a new feed is needed under any option.

    Positron already ships this on the same CDN: Electron's built-in autoUpdater on macOS against a Squirrel JSON feed (.zip + sha256hash), download-and-silent-install on Windows, notify-only on Linux. Recommendation is to mirror that: add a .zip mac artifact, publish per-os/arch releases.json to cdn.posit.co, and move the check into the Electron main process on Mac/Windows. Linux stays notify-only pending #4186.

  9. 2 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions