feat(saves): connect a cloud account for save sync (bundled rclone, no Deck setup) #277

Open
opened 2026-11-25 06:25:41 +00:00 by dukenheimer · 1 comment

#275 syncs saves through a folder both devices reach. On Windows that is easy: OneDrive is built in, and Dropbox, Google Drive and Nextcloud have desktop apps. On a Steam Deck none of them has a SteamOS client, so the player has to set up an rclone mount or Syncthing by hand in Desktop Mode's Konsole (#275's guide, Setting up a cloud folder in docs/saves.md). That is the step most players won't get through, and a mount that isn't running leaves an empty local folder where the sync folder should be.

Proposal

Connect a cloud account on the Saves tab, beside Sync saves through a folder:

  • rclone, fetched like the builder tools are: a pinned version, downloaded on first use, SHA-256-checked against the pin, and kept in the launcher's home. Windows and Linux both, so the PC can use it too (or keep its desktop app and folder).
  • Sign-in:
    • OneDrive, Google Drive, Dropbox: OAuth in the browser (rclone authorize), the result stored by the launcher.
    • Nextcloud and other WebDAV servers: the server URL and an app password.
  • No mount, no service: before and after Play the launcher talks to the remote directly. It reads the manifest with rclone cat, and fetches and sends the zip and manifest with rclone copyto, into a folder of its own (LongshotSync/ by default). #275's manifest, content compare, history and conflict handling stay as they are; only how the files are read and written changes (a second "place" beside the local folder in Core/SaveSync.cs).
  • Status: the Saves tab shows the account ("OneDrive: brett.d85") with Disconnect. It keeps the "Last synced … with STEAMDECK's save" line and the warning when only this device has synced there.

Open questions

  • Signing in from Game Mode: there is no browser beside the launcher there. Options:
    • a device code shown on screen, signed in on a phone or PC (OneDrive and Google support device-code flows, Dropbox doesn't);
    • signing in once on the PC and moving the token over (a QR code or the sync folder itself);
    • asking for Desktop Mode once.
  • Token storage and security: where the refresh token lives.
    • Candidates: Windows DPAPI on the PC; libsecret/KWallet on the Deck when available, else a file readable only by the user.
    • What Disconnect and Remove everything delete.
    • Which OAuth client ID to use: rclone's shared one, or the team's own, which needs registering with each provider.
  • Download size: rclone is about 25 MB zipped per platform. Should it only be fetched once a player connects an account?
  • Offline and slow networks: time limits for the calls before Play, so Play never waits long on an unreachable cloud (#275 already plays on when the folder can't be reached).
  • Privacy: the save goes to the player's own account only. CONTRIBUTING's "no saves leave the PC" is about the team and the repo, but the privacy page should say what the launcher sends where once it talks to a cloud directly.
  • #275: the sync through a folder this builds on.
  • #258: a backup or sync tool tripping over how the save folder is linked on Windows. The built-in sync would make a third-party tool on the save folder unnecessary for most players.
#275 syncs saves through a folder both devices reach. On Windows that is easy: OneDrive is built in, and Dropbox, Google Drive and Nextcloud have desktop apps. On a Steam Deck none of them has a SteamOS client, so the player has to set up an rclone mount or Syncthing by hand in Desktop Mode's Konsole (#275's guide, *Setting up a cloud folder* in docs/saves.md). That is the step most players won't get through, and a mount that isn't running leaves an empty local folder where the sync folder should be. ## Proposal **Connect a cloud account** on the Saves tab, beside *Sync saves through a folder*: - **rclone, fetched like the builder tools are:** a pinned version, downloaded on first use, SHA-256-checked against the pin, and kept in the launcher's home. Windows and Linux both, so the PC can use it too (or keep its desktop app and folder). - **Sign-in:** - **OneDrive, Google Drive, Dropbox:** OAuth in the browser (`rclone authorize`), the result stored by the launcher. - **Nextcloud and other WebDAV servers:** the server URL and an app password. - **No mount, no service:** before and after Play the launcher talks to the remote directly. It reads the manifest with `rclone cat`, and fetches and sends the zip and manifest with `rclone copyto`, into a folder of its own (`LongshotSync/` by default). #275's manifest, content compare, history and conflict handling stay as they are; only how the files are read and written changes (a second "place" beside the local folder in `Core/SaveSync.cs`). - **Status:** the Saves tab shows the account ("OneDrive: brett.d85") with *Disconnect*. It keeps the "Last synced … with STEAMDECK's save" line and the warning when only this device has synced there. ## Open questions - **Signing in from Game Mode:** there is no browser beside the launcher there. Options: - a device code shown on screen, signed in on a phone or PC (OneDrive and Google support device-code flows, Dropbox doesn't); - signing in once on the PC and moving the token over (a QR code or the sync folder itself); - asking for Desktop Mode once. - **Token storage and security:** where the refresh token lives. - Candidates: Windows DPAPI on the PC; libsecret/KWallet on the Deck when available, else a file readable only by the user. - What *Disconnect* and *Remove everything* delete. - Which OAuth client ID to use: rclone's shared one, or the team's own, which needs registering with each provider. - **Download size:** rclone is about 25 MB zipped per platform. Should it only be fetched once a player connects an account? - **Offline and slow networks:** time limits for the calls before Play, so Play never waits long on an unreachable cloud (#275 already plays on when the folder can't be reached). - **Privacy:** the save goes to the player's own account only. CONTRIBUTING's "no saves leave the PC" is about the team and the repo, but the privacy page should say what the launcher sends where once it talks to a cloud directly. ## Related - #275: the sync through a folder this builds on. - #258: a backup or sync tool tripping over how the save folder is linked on Windows. The built-in sync would make a third-party tool on the save folder unnecessary for most players.
Member

Possibly related, for context:

  • PR #275 feat(saves): sync saves between devices through a folder the player picks — Underlying folder-based sync; this proposes direct cloud access instead
  • issue #258 Unable to Backup/Sync Save Directory — Related save sync/backup context; GoodSync issue is distinct
Possibly related, for context: - PR #275 feat(saves): sync saves between devices through a folder the player picks — Underlying folder-based sync; this proposes direct cloud access instead - issue #258 Unable to Backup/Sync Save Directory — Related save sync/backup context; GoodSync issue is distinct
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher#277
No description provided.