Encrypting files before they leave your machine is a solved problem: an agent can wire a well-known library such as age to a storage bucket and a version index in a weekend, and the result keeps the provider blind to your names and contents. The weekend goes on trust, not code: recovering from a lost laptop, never losing the key, and sharing a file with someone who has no setup. A homemade vault has no independent audit, no phone app and no one to call, which is what Tresorit is selling to people who handle other people's files.
Before you buildTresorit Basic is free with 3 GB, and Cryptomator encrypts a folder inside any cloud storage you already have at no cost. If you only need a few documents locked, start with those.
Build me a personal encrypted file vault to replace Tresorit. Requirements:
- Python 3.12 with `uv`: one CLI `vault` (Typer) with the commands init, push, pull, ls, restore,
share and verify. Never write your own cryptography: files and the index are encrypted with
age through `pyrage`.
- `vault init` creates an age identity at ~/.config/vault/identity.age, itself locked with a
passphrase typed at the prompt, and prints the public recipient. Say clearly that losing the
identity means losing every file, and print how to keep an offline copy.
- Storage: an S3-compatible bucket through `boto3`, with endpoint, bucket and keys in .env. Each file
is split into 8 MiB chunks, each chunk is encrypted on its own and stored under a random 128-bit
name, so the bucket never sees a file name.
- Index: SQLite at ~/.local/share/vault/index.db (path, size, mtime, chunk list, version). After
every push, upload it encrypted as index.age so a new machine can run `vault pull --bootstrap`
with only the identity file and the .env keys.
- `vault push ~/Vault` uploads new and changed files and `vault pull` fetches what is missing. A
file changed on two machines keeps both ("name (conflict 2026-10-20 laptop).ext"). Deletions
are soft: nothing leaves the bucket for 30 days. Keep the last 10 versions and offer
`vault restore <path> --version N`.
- `vault share <path> --days 7` encrypts the file with a fresh random passphrase in age's passphrase
mode, uploads it under a random name and prints a presigned URL and the passphrase on separate
lines. Ship a static decrypt.html that uses `age-encryption` (typage) to decrypt in the browser
from a file the recipient picks, with no network calls.
- `vault verify` downloads 5 random chunks, decrypts them and checks their hashes. Tests with
`pytest`: a round trip, a flipped byte making decryption fail, rebuilding the index from
index.age on an empty machine, and version pruning.
- Single user. No accounts, no telemetry, local-first. Outbound calls: your bucket only.
- Out of scope: mobile apps, live sync, virtual drives, multi-person sharing, key exchange, audits.
- README: a threat model in plain words (the bucket owner sees object counts, sizes and timing, not
names or contents), how to back up the identity file, and a warning to keep Tresorit until a
restore on a clean machine has worked.Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own Tresorit.
Add a watcher to the encrypted vault in this folder. Requirements: - `vault watch ~/Vault` uses `watchfiles` to notice changes, waits until a file has been quiet for 5 seconds, then runs the same push logic as `vault push` for that file. - Ignore patterns from a .vaultignore file in gitignore syntax and skip temporary files such as *.tmp and ~$*. - Every 10 minutes run `vault pull` so changes from other machines arrive. - A launchd plist and a systemd user unit, and a log at ~/.local/state/vault/watch.log. - Update the README.
Add a restore drill to the encrypted vault in this folder. Requirements: - `vault drill` creates a temp folder, bootstraps an empty machine from the identity file and the .env keys, restores 20 random files and compares each one's SHA-256 with the index. - Print a pass or fail line per file and write the date of the last passing drill to ~/.local/state/vault/last-drill. - `vault ls --status` warns in red if the last passing drill is older than 90 days. - Never write into the real Vault folder. Update the README.
Extend the encrypted vault in this folder to support several age recipients. Requirements: - `vault recipient add <name> <age1...>` and `vault recipient rm <name>` keep a list in the encrypted index; new files are encrypted to every listed recipient. - Files already in the bucket are re-encrypted only when `vault rekey` is run, which prints how many chunks it will rewrite and asks for confirmation. - Removing a recipient does not revoke what they already downloaded: say so in the command output and in the README. - Tests for adding, removing and rekeying.
People pay Tresorit so they do not have to trust their own cryptography. The company says it cannot read your files and backs that with audits and certifications, and the apps cover sync, sharing and a lost laptop. For an accountant, a lawyer or a freelancer holding client files, an audited vendor is a better answer than a script someone wrote on a weekend.
Estimate · Backblaze B2 lists $6.95 per TB a month with the first 10 GB free: about $0.35 for 50 GB and $6.95 for 1 TB, with downloads free up to three times your stored data. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Basic | $0 | $0 | 3 GB of storage, 500 MB per file, no file versions, 1 day of activity history, up to 2 devices, 10 active shared links of up to 250 MB. |
| Personal Lite | $5.99 | $4.75 | 50 GB of encrypted storage, 2 GB per file, 5 versions, links up to 2 GB, sync on 2 devices, camera upload, restore deleted files, remote wipe, a Gmail and Outlook plugin for encrypted attachments. |
| Personal Essential | $13.99 | $11.99 | 1 TB, 10 GB per file, 10 versions, links up to 2 GB, sync on 10 devices, document scanning in the app. |
| Personal Pro | $33.99 | $27.49 | 4 TB, 10 GB per file, 25 versions, links up to 5 GB, sync on 10 devices, advanced link security, file requests, PDF annotation on iOS and detailed access logs. |
| Business plans | custom | — | Team storage, admin controls, branded data rooms and an eSign add-on, sold on separate business pages. |
The Basic plan is free: 3 GB of storage, 500 MB per file, two devices and 10 active shared links.
Kinda. The core is a weekend build with the prompt on this page, but real gaps remain: Published audits and certifications such as ISO 27001, which a homemade tool cannot have, Desktop and phone apps with sync, camera upload and document scanning.
About $5.99 a month on the Personal Lite plan, $71.88 a year (checked 2026-10-20).
Published audits and certifications such as ISO 27001, which a homemade tool cannot have; Desktop and phone apps with sync, camera upload and document scanning; Share links with expiry, password options, access logs and file requests built in; Restoring deleted files and wiping a lost device remotely, handled for you; Tresorit's Swiss ownership, data centres and a support team to call. If any of those matter to you, keep paying.
Yes: Cryptomator (open source), rclone (open source), Nextcloud (open source).