Skip to content

Personal Storage: A Google Drive Replacement the Server Cannot Read

My storage app is my replacement for Google Drive. Files, their names and the folder tree are sealed on my devices, and the server stores ciphertext and wrapped keys it cannot open.

I built it to take back my freedom, privacy and security. I don't trust big tech with my files.

It has four clients: a web app, a Tauri desktop app for Windows and Linux, one SwiftUI app for Mac, iPhone and iPad, and an Android app in Kotlin and Compose. All of them run one Rust crypto core, compiled to WebAssembly for the browser and bound to Swift and Kotlin through UniFFI. Behind them is one Rust server. The repo has 214 commits, from May to September 2026.

What it does

  • Folders, resumable uploads of any size in 4 MiB parts, versions, trash and previews.
  • Sharing a file or a whole folder with another account, to read or to edit.
  • Public links to a file or a folder, with an optional password, expiry and download limit. The key rides after the #, which browsers never send.
  • File requests: a link through which anyone can drop files into one of my folders, sealed to my key on their device.
  • Photo backup on iPhone and Android, the Files app and Finder on Apple devices, and folder sync on the desktop.

What the server can and cannot read

The spec states the rule once: the server never holds a key that opens a file, a name or a folder's name. It stores:

  • Ciphertext. ChaCha20-Poly1305 with random nonces. A large file is sealed chunks, each bound to its index, plus a sealed manifest.
  • Sealed names for files, paths and folders.
  • Wrapped keys: the vault key under the password, a recovery phrase and each passkey.
  • An Argon2id hash of a login key. Never the password.

It still sees the account's email, sizes, timestamps, which object sits in which folder, and who shares with whom. Search runs on the device; across devices, the server matches HMAC tokens over trigrams of each name without learning the name.

This was not always true. Until 13 September 2026 the vault key was the password's own stretch, and the password went to the server at every sign-in. A hostile server could have kept it and read every file. The next day's commit closed the same kind of flaw in sharing: a share's wrap key came from public keys the server stores, so the server could open every share.

The key hierarchy

password
  -> Argon2id, per-account salt, 64 MiB, 3 passes
       = the stretch: never leaves the device
       -> HKDF "auth" = login key: sent, stored as an Argon2id hash
       -> HKDF "kek"  = key-encryption key: never sent
            -> unwraps the vault key (32 random bytes)
                 -> HKDF(file id) = file key: content and chunks
                 -> metadata key: names, paths, folder names
                 -> seals the X25519 private key for sharing

HKDF is one-way, so a server that logs every login key still cannot derive the key-encryption key. Because the vault key is random and wrapped, a password change re-wraps one small blob and touches no file.

The login key is a fixed value, so a sign-in captured over broken TLS could be replayed. A server switch replaces it with an augmented PAKE: the server never sees the password or a value derived from it alone, and a captured sign-in is useless to replay. Clients remember the strongest scheme an account has used and refuse a server that asks for less.

Each account has a random X25519 key pair, and a share wraps the file key with a fresh ephemeral key and the sender's static key. The first key seen for a person is pinned and shown as a fingerprint, and a changed key must be accepted by name.

Where it runs

It runs on a single-node k3s cluster:

  • the API: Rust with Axum and Tokio, SQLite, and blobs on the data volume or in an S3-compatible bucket. An upload is renamed into place only when it is whole.
  • nginx, serving the web app under a Content-Security-Policy that allows script only from the site itself
  • a nightly backup that checks the database before copying it, and a monthly drill that restores it and checks every blob it names

A Cloudflare Tunnel publishes it. Cloudflare is a third party that could rewrite pages on the way, so every deploy checks that each file served matches the build's hashes.

A push to main deploys through a Forgejo Actions runner on the node. It builds the images, stops the server, snapshots the database and rolls out. If the new server never comes up, the old image and the snapshot go back by themselves.

How it is tested

  • About 230 Rust tests. The core opens every seal it makes. The server tests drive each route through the real router: sign-in, refresh-token reuse, sharing, links, file requests, and passkeys with a software authenticator.
  • 75 Playwright tests against a release build of the server: sign-up to recovery, the PAKE with no login key on the wire, passkeys on a virtual authenticator, links and shared edits. One reads the share wrap the server stored and checks it is the X25519 kind.
  • Apple: XCTest for the File Provider and the backup format, and an iPhone UI test that backs up the simulator's photos to a live server. Android has no automated tests; a device checklist covers it by hand.

The checks used to run on the node before each deploy. On 27 September 2026 they ran its 8 GB out of memory and took the service down for 18 minutes. Now the node only deploys, and one script runs the lints, the Rust tests, the web build checks and the browser suite before every push.

Limits I would rather state plainly

  • The web app is code the server hands out. Whoever controls the server could serve a page that leaks keys. The build is reproducible and publishes a SHA-256 for every file, so anyone can rebuild and compare, but that cannot rule out different code for different people. The native apps carry their own code.
  • Metadata is visible. Sizes, times, the folder structure and who shares with whom.
  • One node, one writer. SQLite takes one writer, so there is one server pod, and a deploy stops it while the new one starts.