chauduyphanvu41 downloadsSync your vault between devices, end-to-end encrypted, through storage you control: any S3-compatible bucket or a WebDAV server.
Sync your Obsidian vault between your devices through storage you own: an S3-compatible bucket (Cloudflare R2, Backblaze B2, Amazon S3, MinIO, Wasabi and others) or a WebDAV server (Nextcloud, a NAS). Everything that syncs is encrypted on your device before it leaves, so the storage provider only ever holds data it cannot read.
Coffer runs on desktop and mobile, keeps a version history of every file, merges edits made on two devices, and can bring back deleted files or a whole folder as it was at an earlier time.
Coffer is young (0.6). It is covered by 821 tests and has been run on macOS and iOS, but keep a backup of a vault you care about while you try it.
requestUrl.publish: true are uploaded as readable web pages to the location you choose, and anyone with its address can read them. Nothing is published until you run the command and confirm. See Publishing a website.publish: true, or publish the whole vault, and Coffer turns them into web pages, with the pictures they show, at a bucket or WebDAV folder of its own. These pages are not encrypted. See Publishing a website.Coffer needs Obsidian 1.13.1 or later (an older Obsidian gets Coffer 0.1.0).
From Obsidian: Settings → Community plugins → Browse, search for Coffer, install and enable it.
By hand: download main.js, manifest.json and styles.css from the latest release into <vault>/.obsidian/plugins/coffer/, then enable Coffer under Settings → Community plugins. (The settings folder may have another name if you changed it in Obsidian.)
The setup link carries the storage address and keys, encrypted with your passphrase. Treat it like a password. You can copy it again later under Settings → Coffer → Add another device. A link takes a moment to prepare, because it is sealed as strongly as the vault key (see How it works). A link made by this version does not open in Coffer 0.2 or earlier, including the 0.1.0 that an Obsidian older than 1.13.1 gets; on such a device, join or update by choosing This is my first device, entering the storage details by hand and then the passphrase. Links made by those versions still open here.
Keep a vault in one sync tool only: don't put a Coffer vault inside iCloud Drive, Dropbox or OneDrive, or run Obsidian Sync on it at the same time.
Use a key that can reach only the bucket you sync to. A device that only receives changes (see What syncs) can use a key that may only read.
| Provider | What Coffer asks for |
|---|---|
| Cloudflare R2 | Account ID, bucket, and an R2 API token with object read and write on that bucket |
| Backblaze B2 | The bucket's endpoint (like s3.us-west-004.backblazeb2.com), bucket, and an application key limited to it |
| Amazon S3 | The bucket's region, bucket, and an access key |
| Other S3-compatible | Endpoint, region if the provider has one, bucket, keys, and whether it needs path-style addresses (MinIO and most self-hosted servers do) |
| WebDAV | Folder address, user name and password (for Nextcloud, an app password). The folder is created if missing |
Folder in bucket lets one bucket hold several vaults; it is filled in from the vault's name.
No CORS configuration is needed. For Amazon S3, this IAM policy is enough (replace my-notes):
{
"Version": "2012-10-17",
"Statement": [
{ "Effect": "Allow", "Action": ["s3:ListBucket"], "Resource": "arn:aws:s3:::my-notes" },
{ "Effect": "Allow", "Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"], "Resource": "arn:aws:s3:::my-notes/*" }
]
}
Turning on versioning for the bucket, with a rule that deletes old versions after a month, adds a second safety net.
"readOnly": true under sync, and then refuses clean, repair, restore, restore-at and change-passphrase.Coffer syncs when Obsidian starts, a few seconds after an edit, every few minutes, and sooner when it notices another device has synced. All of these can be changed in settings.
Everything shared is encrypted like the vault, in storage you choose, and separate from the vault's own: people you share with hold no key to the rest of your notes. Add one under Settings → Coffer → Shared folders.
Family, and every note whose properties say share: Family is shared, with the attachments it shows, at its place in the vault. This is one way: members read, or read and suggest, and nothing they do changes your vault unless you take a suggestion in. A note that stops saying share: Family stays shared until you remove it, under What's shared. One device sends these notes, and a vault has one such share.What members cannot be stopped from doing: anyone whose storage key can write can delete objects or add garbage that holds a shared folder up until the owner removes it. They cannot get a change accepted.
Sharing sends notes, encrypted, to people who hold a key. Publishing is different: it turns notes into web pages that anyone with their address can read in a browser, with no key and no sign-in. The pages are not encrypted, and they go to a location of their own, not to the storage your vault syncs to. Sync and sharing stay encrypted and are not touched by it. Nothing is published until you ask.
There are two ways to choose what is published. Note by note: a note is on the website when its properties say publish: true (in Obsidian, a checkbox property named publish). Or the whole vault: turn on Publish the whole vault in the website's settings, and every note is a page, new ones included, except those whose properties say publish: false. Either way, Keep off the website in the same settings lists folders and files that are never published, such as Private/ or Templates/.
With the whole vault published, everything you write becomes public at the next publish unless you keep it off, so set the folders to keep off first and read the preview before you confirm.
The commands Put the current note on the website and Take the current note off the website change the property for you. Notes that Obsidian Publish publishes carry the same property, so they are picked up too.
Those notes become pages, and the pictures, sound, video and PDF files they show or link to go up with them. Nothing else goes up.
title, which is the page's title.%%comments%% and HTML comments are removed.Under Settings → Coffer → Website, choose an S3-compatible bucket or a WebDAV folder, with keys of its own. It must not be the bucket or folder your vault or a shared folder syncs to, nor a folder inside it or one that holds it: Coffer refuses those. Use a key that can reach only that location.
Coffer uploads the files; making them readable to the public is up to you, with your provider's own setting for it (public access to the bucket, or a domain connected to it). The site's entry page is index.html.
Run Publish notes to the website…. Coffer builds the site and compares it with what is at the location, then shows what would change: new, changed and removed pages and files, and what was left out. It uploads only after you confirm, and only the files that changed; pages you took off are deleted from the location. Nothing is published automatically, so a note you mark does not go up until you run the command.
One page per note, at its place in the vault (Folder/Note.html), and an index.html front page: a note you choose with a list of the other pages under it, or the list alone. When you choose none, a published note named index.md at the top of the vault is the front page. Each page ends with a list of the published pages that link to it. Every page uses one stylesheet, light or dark as the reader's device is set. There are no scripts, and Coffer adds no trackers.
coffer-site.json at the location, and only ever deletes files on that list. Files you put there yourself are left alone.| Command | What it does |
|---|---|
| Sync now | Syncs right away |
| Show sync status and problems | Opens the problems screen |
| Set up sync | Connects this vault to storage, or joins with a setup link |
| Sync now, allowing large deletions in the vault | Goes ahead with a sync the safety check stopped |
| Check storage connection | Tests that the storage supports everything Coffer needs |
| Show version history of the current file | Lists stored versions, with a diff, and restores one |
| Download a file left in storage | Lists the files kept in storage by the size setting, and downloads the one you choose |
| Show recent changes | Lists who changed what in the vault or a shared folder: each change by the device that made it, or in a shared folder with members by the member |
| Add the current note to the notes shared by property | Marks the note to be shared at the next sync |
| Remove the current note from the notes shared by property… | Deletes the note for the people it is shared with, and keeps yours |
| Publish notes to the website… | Shows what would change on the website, and uploads it once you confirm |
| Put the current note on the website | Marks the note so the next publish includes it: publish: true, or with the whole vault published, removes publish: false |
| Take the current note off the website | Marks the note so the next publish deletes its page: removes publish: true, or with the whole vault published, sets publish: false |
| Restore deleted files | Lists deleted files that can still be brought back |
| Restore the vault or a folder to an earlier time | Previews and applies a point-in-time restore |
| Resolve a file changed on two devices | Walks through a conflict copy line by line |
| Check synced data for damage | Verifies the stored data end to end |
| Repair synced data from this device's files | Stores again what the check found missing or damaged, from the files on this device |
| Delete expired versions from storage | Runs the cleanup now (it also runs weekly, and after a day when storage has filled up with many small objects) |
vault.json holds the vault key, wrapped with a key derived from your passphrase (PBKDF2-SHA-256, 600,000 iterations for a new vault; setup links and invites are sealed at that cost too, or the vault's own if it is higher). It is the only object stored unencrypted, and it reveals nothing but the salt and iteration count. Changes are stored as numbered commits (log/), with periodic snapshots of the whole file table (snap/), and file contents live in encrypted packs (pack/).The same engine runs from Node.js 22.18 or later, for an always-on computer that keeps a copy in sync. Download coffer.js from the release and run it; it is one file with nothing to install. If Node stops with Cannot use import statement outside a module, a nearby package.json says "type": "commonjs": rename the file to coffer.mjs, which Node always reads as a module.
node coffer.js watch --config=coffer.json
To check that the file was built by this repository's release workflow, run gh attestation verify coffer.js --repo chauduyphanvu/obsidian-coffer. From a clone, npm ci and then npm run cli -- watch --config=coffer.json run the same code.
coffer.json:
{
"vault": "/path/to/vault",
"remote": { "type": "s3", "endpoint": "https://s3.us-east-1.amazonaws.com", "region": "us-east-1", "bucket": "my-notes", "prefix": "Notes", "pathStyle": false },
"sync": { "deviceName": "nas" }
}
Secrets come from the environment: COFFER_PASSPHRASE (at least 8 characters to make a new vault, and the same for COFFER_NEW_PASSPHRASE), and COFFER_ACCESS_KEY with COFFER_SECRET_KEY for S3, or COFFER_WEBDAV_PASSWORD for WebDAV. Other commands: join, sync, fetch, check, status, history, restore, deleted, log, activity, restore-at, export, verify, repair, clean, change-passphrase, accept-storage and publish. Run node coffer.js --help (from a clone, npm run cli) for details, and --version for the version.
export <dir> writes a plain copy of every file, decrypted, into a new or empty folder outside the vault, each with the time it was last changed, including the files deferAboveMB leaves in storage. Add a folder of the vault to copy only that folder, and --at= with a time or a number from log, as restore-at takes, to copy the files as they were then. It writes nothing to storage or the vault, so it also works on a device that only receives; run from cron into a dated folder, it keeps plain backups that need nothing from Coffer to read. If some files cannot be read, it names them, writes the rest, and exits 1.
status says, without syncing or writing anything to storage, whether storage can be reached, its newest change, how each device keeps up, the files left in storage and the conflict copies among the files it syncs (not those in .trash). It exits 0 when all is well, and 1 when storage cannot be reached or read (it says why: a wrong passphrase, a history this device did not see, no vault in it), a device disagrees about the sync history, or conflict copies are waiting; a device that is behind or has not been seen for days is listed but does not fail it, as a phone that is switched off is normal. --json prints the same as one JSON object, with ok true or false and, when storage cannot be read, storage.problem (unreachable, passphrase, history, empty, gone, or unreadable for anything else it answered with), for a monitoring script.
To publish a website (see Publishing a website), add a site to coffer.json: where it goes, as a remote of type s3, webdav or folder with the same fields as the vault's remote, and optionally a title, a home (the note that is the front page), "whole": true to publish every note except those that say publish: false, and an exclude list of folders and files to keep off the website.
"site": {
"remote": { "type": "s3", "endpoint": "https://s3.us-east-1.amazonaws.com", "region": "us-east-1", "bucket": "my-site", "prefix": "", "pathStyle": false },
"title": "My notes",
"home": "Home.md"
}
node coffer.js publish --config=coffer.json uploads the website and prints what changed. Unlike the command in Obsidian it does not ask first, so run it with --dry-run to see what it would do: that prints the same and writes nothing. The website's keys are separate from the vault's: COFFER_SITE_ACCESS_KEY and COFFER_SITE_SECRET_KEY for S3, or COFFER_SITE_WEBDAV_PASSWORD for WebDAV. publish reads only the vault folder, so it needs no passphrase and no sync keys, works on a device that only receives, and leaves the sync state alone. A folder site writes plain files you can host anywhere; the folder must be outside the vault, neither inside it nor holding it.
watch --publish keeps the website current: it publishes after its first sync and after each sync that sends or receives something, and prints what changed on the website. There is no preview to confirm, so a note goes public as soon as it syncs, and with "whole": true that is every new note that does not say publish: false. A publish that fails is printed and tried again after the next sync; syncing carries on either way.
To keep large files off this machine, set deferAboveMB under sync to a size in MB: files above it stay in storage, sync lists them as not downloaded, and fetch <path>... downloads the ones you name, after which they sync like any other file.
To join a shared folder with members, or follow one, pass its link on standard input so it stays out of shell history: pbpaste | node coffer.js join - --config=family.json --vault=Family. The keys are kept in <folder>/.coffer/keys.json, readable by you alone, and the other commands then work on that config. The command line cannot own a shared folder, send suggestions, or send notes shared by a property.
In a shared folder with members, a device that joins with an invite made before someone was removed can be shown storage put back to before the removal, until the folder is given new keys.
If objects are deleted from storage by something other than Coffer, the weekly cleanup names the files affected on the problems screen, as Check synced data for damage does at any time, and Repair synced data stores them again from a device that still has those files. What no device has any more cannot be recovered, and neither can an earlier version that no current file shares data with.
If storage is put back to an older copy, a device notices when it next sends a change, and at once takes back the one change it sent, or within an hour if it has nothing to send, as a device that only receives never does.
In the device list, another device's "changes behind" count can be a few minutes old, and the list says how old.
npm ci
npm run build # dist/main.js, dist/manifest.json, dist/styles.css, dist/coffer.js
npm test