Repository navigation
Description
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
.zipartifact (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:
- Electron main process checks the update endpoint
- Downloads the appropriate installer in the background
- Notifies the user that an update is ready
- On "Install and Restart": launch the NSIS installer with
/S(silent) on Windows, handle.dmgon 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
- Electron Forge vs electron-builder —
electron-updateris tightly coupled to electron-builder's packaging output. Switching from Forge is the biggest friction point. - macOS artifact format — auto-update mechanisms require
.zip; the.dmgcan still be offered for manual downloads. - Linux strategy — almost certainly APT/YUM repositories rather than in-app updates, following industry convention.
- Server infrastructure — what can host the update manifests and artifacts, and whether the existing
rstudio.org/links/check_for_updateendpoint can be extended or a new one is needed.
Activity
m13v commentedon Mar 18, 2026
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.
m13v commentedon Mar 18, 2026
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.
allyssonallan commentedon Nov 2, 2026
+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!
gtritchie commentedon Nov 2, 2026
For Linux, having an apt/yum repository would be nice as well, tracked (at least the deb-side) via #4186.
kevinushey commentedon Nov 2, 2026
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
autoUpdateron 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.zipmac artifact, publish per-os/archreleases.jsontocdn.posit.co, and move the check into the Electron main process on Mac/Windows. Linux stays notify-only pending #4186.read updates from the dailies json api instead of a custom feed
limit in-app updates to open-source desktop and add an admin switch
pass the authenticode check its file through the environment
2 remaining items
let only the latest quit attempt undo a quit, and none once one is ac…
hold a quit's undo while an older quit_session is unanswered
name each install request, so a late one cannot cancel a newer record
undo the desktop frame's pending quit only when a quit attempt armed it
keep a request's own cancel from failing a newer install still in its…
count a recorded update install as arming the quit it is for
add in-app updates for rstudio desktop on macos and windows (#19399)
show download progress for in-app updates (#19596)
fail an in-app update when the installer skipped a file
start the update installer without windowsHide
keep the update-ready message true on macos
show installer progress during in-app updates on windows (#19630)
link the tarball for an unpacked linux copy
keep the session's update message for the same release
localize the desktop's update announcement