Skip to content

About

Linux unofficial client for Proton Drive

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

Proton Drive Sync

Experimental, unofficial, and used at your own risk. Not affiliated with Proton. Built for my own personal use case; I am not responsible for any data loss. See Read this first.

A Linux desktop app that syncs a folder with Proton Drive.

Sign in screen

  • Your whole Drive appears in ~/ProtonDrive at ~0 bytes.
  • Files hydrate when opened.
  • A capped local cache keeps SSD usage near zero.
  • Prefer everything offline? A Settings toggle switches the same folder to full mirror mode.
Overview Settings
Activity Conflicts

Stack: MyGo-native Linux UI shell (mygo-shell/) · Go sync engine (engine-go/, binary pds-engine-go) · Node.js sidecar running the official Proton Drive SDK · SQLite state. (macOS and Windows were supported in an earlier iteration and have been dropped.)

Read this first (important)

  • Experimental. This project is a work in progress and is not ready for production or for data you cannot afford to lose. Expect bugs, sync edge cases, and breaking changes.
  • Not affiliated with Proton. This is an independent, third-party project. It is not endorsed by, supported by, or connected to Proton AG in any way, and it is not an official Proton product.
  • Personal project. I built this for my own personal use case. With Proton Drive now having an official SDK, I wanted to build a Linux desktop sync client on top of it for fun and for my own workflow. Your needs may differ.
  • Use at your own risk. I am not responsible for any data loss or corruption caused by using this software. Keep independent backups of anything important before pointing this at a folder.

If any of that is a dealbreaker, please use the official Proton Drive apps instead.

Features

On-demand placeholders by default

The sync root is a FUSE view of your Drive. Every file is visible at ~0 bytes, hydrating on open, with an LRU-capped local cache (default 10 GiB). Nothing downloads until you use it.

Switch to mirror mode at any time

Settings → Sync mode switches the same folder between On demand and Mirror everything. Switching moves existing content (no re-download) and never deletes from Drive.

Two-way sync with conservative deletes

  • Upload on new/changed files.
  • Local deletes are sent to the Proton Drive Trash, never permanently deleted.
  • A mass-deletion guard pauses sync when too many files are deleted at once.

Native desktop integration

  • Single MyGo-native main window with Overview, Activity, Conflicts, and Settings pages.
  • Optional start at login via the platform login-items / XDG autostart API.
  • Tray icon with status dot, pause/resume, open folder, preferences, and quit.
  • Closing the dashboard hides the app to the tray; sync keeps running.

Headless engine

The sync engine (pds-engine-go) is headless-only: it runs as a child process of the MyGo shell, which controls it over a Unix socket. (The old pds CLI was removed with the Rust workspace.)

Install

Nix (recommended on NixOS or Nix-enabled distros)

# Try without installing
nix run .#proton-drive-sync

# Install app + CLI + sidecar into a profile
nix profile install .#default

Or install straight from GitHub:

nix profile install github:Christopher2K/proton-drive-sync-linux

From source

# 1. Enter the pinned development environment
devenv shell

# 2. Build the Go sync engine
(cd engine-go && go build -o pds-engine-go ./cmd/pds-engine-go)

# 3. Build the MyGo UI shell (needs Go >= 1.27.3; in devenv this pulls the
#    1.27.3 toolchain via GOTOOLCHAIN on first run — see AGENT.md)
cd mygo-shell
go build -o proton-drive-sync .
cd ..

# 4. Install system-wide (or PREFIX=$HOME/.local for a user install)
sudo packaging/linux/install.sh

From a release tarball

Download proton-drive-sync-<version>-<arch>.tar.xz from GitHub Releases, then run:

tar -xJf proton-drive-sync-*.tar.xz
sudo proton-drive-sync-*/install.sh

.deb and .rpm packages are also published on releases (require nodejs >= 20 and npm at runtime).

First launch

  1. Open Proton Drive Sync from your application menu.
  2. Click Sign in with Proton. Your browser handles login; the app never sees your password.
  3. Choose your sync folder (default: ~/ProtonDrive).
  4. The app starts syncing in the background. Close the window to keep it in the tray.

Sign in screen

Development environment (devenv)

The Go toolchain (see the go version note in AGENT.md), Node.js, and every native library the MyGo shell/FUSE need are declared in devenv.nix and locked in devenv.lock, so local development and CI build against the same environment.

Install Nix and devenv once, then from the repository root:

devenv shell        # enter the environment
# or, with direnv installed: direnv allow

devenv test builds the environment and runs the full test suite (Go engine tests + sidecar typecheck/tests). FUSE tests additionally need the host's setuid fusermount3 (package fuse3), which Nix cannot provide.

Build (Linux)

# Go sync engine
(cd engine-go && go build -o pds-engine-go ./cmd/pds-engine-go)

# MyGo UI shell (needs Go >= 1.27.3 — see AGENT.md)
(cd mygo-shell && go build -o proton-drive-sync .)

The MyGo shell needs the Go toolchain (in devenv.nix) and GTK/WebKit libraries present on the host; it is otherwise self-contained.

Run from the repository root (dev mode — the engine and sidecar are found relative to the repo):

cd mygo-shell
./proton-drive-sync
# or start minimized to the tray
./proton-drive-sync --minimized

Environment knobs:

Var Meaning
PDS_SYNC_ROOT Sync folder (default: ~/ProtonDrive)
PDS_SYNC_MODE placeholders (on demand) or mirror (materialize everything); session-only override of the persisted Settings choice (never rewrites it)
PDS_CACHE_CAP Backing-cache cap: bytes with an optional K/M/G/T suffix (500M, 10G) or unlimited; session-only override of the persisted Settings choice (never rewrites it). pds mount --cache-cap <SIZE> overrides both for one invocation
PDS_SIDECAR_CMD Sidecar command override, e.g. node sidecar/dist/index.js
PDS_SIDECAR_DIR Sidecar directory override for auto-discovery

Background service and tray

The app is the sync service: the MyGo dashboard launches the Go engine (pds-engine-go) as a child process, and the tray outlives the window, so closing the dashboard never interrupts a transfer.

  • Start at login is on by default for installed builds (development builds stay opt-in). Settings → Startup toggles it. The MyGo runtime writes the standard XDG entry ~/.config/autostart/proton-drive-sync.desktop, launching proton-drive-sync --minimized a few seconds after you sign in to your desktop session. --minimized always wins: a login start never opens a window, even if the panel (and its tray host) has not come up yet. The dashboard opens only when you ask for it.
  • Tray icon (StatusNotifierItem): a coloured dot shows syncing, paused, delete-guard, signed-out, or stopped. The menu has Open Dashboard, Pause/Resume syncing, Open Sync Folder, Preferences…, and Quit; left-clicking the icon opens the dashboard. Closing the dashboard hides it (the window is unmapped, syncing continues), and Quit is the only way to stop the service.
  • No tray host? GNOME needs the AppIndicator extension, and some bare compositors (e.g. niri) need a panel such as waybar with a tray module. Without a StatusNotifierWatcher the app still starts at login and syncs windowless; start it again (application menu or proton-drive-sync) to open the dashboard, and closing the window then stops the service because there is no icon to bring it back.
  • One instance only: launching proton-drive-sync again does not start a second engine — MyGo's single-instance lock asks the running instance to show its dashboard and exits. This protects the SQLite state and the FUSE mount from two writers.

Releases

Releases are versioned as a single product (MAJOR.MINOR.PATCH, semver while pre-1.0: breaking changes bump the minor). One version is shared by the app, CLI, sidecar, and Nix packages — scripts/check-versions.sh enforces this in CI.

To cut a release (inside the devenv shell, so git-cliff and gh are available):

scripts/release.sh minor        # or: patch | major

The script bumps every version site, regenerates CHANGELOG.md from conventional commits, and opens a release/vX.Y.Z PR titled chore(release: vX.Y.Z) (review and squash-merge it like any other change — main is protected). Once the PR merges, the Tag Release workflow (.github/workflows/tag-release.yml) sees the new workspace version, tags vX.Y.Z, and dispatches the release workflow, which builds on Ubuntu 22.04 (binaries run on glibc ≥ 2.35) for amd64 and arm64 and publishes to GitHub Releases:

  • proton-drive-sync-<version>-<arch>.tar.xz — binaries + vendored sidecar + install.sh; untar and run sudo install.sh (or PREFIX=$HOME/.local …)
  • .deb / .rpm packages (require nodejs >= 20 and npm at runtime)
  • checksums.txt (sha256)

Testing

devenv test                     # Go engine tests + sidecar typecheck/tests
(cd engine-go && go vet ./... && go test ./... -short)   # Go engine only
(cd mygo-shell && go test ./...)                          # MyGo shell unit tests (needs Go >= 1.27.3)

Notes for VM development (OrbStack et al.): inotify over shared folders is unreliable — run the engine tests on VM-native disk. See AGENT.md for details.

License

MIT

About

Linux unofficial client for Proton Drive

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages