filipesilva120 downloadsReal-time, end-to-end encrypted, peer-to-peer, collaborative editing across vaults for files and folders.
Real-time, end-to-end encrypted, peer-to-peer, collaborative editing across Obsidian vaults for files and folders.
Built on open protocols. Servers only help peers find each other and never see your files.
Help keep Obsidian Collab running by self-hosting a community signalling server for free!

Collab: Share file on the file you want to shareCollab: Open URL prompts Obsidian to create the shared fileCollab: Disconnect fileCollab: Connect fileCollab: Stop sharing fileUse folder instead of file commands if you need to work with multiple files.
Use the File Recovery core plugin to save past versions of files and revert to them if you need to.
Signalling, STUN and TURN servers see your IP address. Signalling servers also see a hashed room id and encrypted connection offers. When a direct connection isn't possible, a TURN server relays your traffic, which stays encrypted. Collab has no telemetry.
Run Collab: Check network to see if you should be able to connect right now.
Then Collab: Diagnostics and copy paste the result into a new issue so I can try to help.
This means that other peers can't directly connect to your device and need to relay connections through a public server. TURN is meant to solve that problem. The easiest way to get a TURN server is https://www.expressturn.com. Make a new account there, put those credentials in the Collab settings, and click the test button to check it works. Only peers that get this notification need to do this. You can self-host one too if you want.
Use Collab: Regenerate file URL, then give that link to your peers.
It will have a new secret and a new set of servers, and when opened update the existing shared file.
So Obsidian links work correctly for everyone.
There's no real way to cover all the text syncing cases, but this should be rare.
You'll need to fix it manually.
The File Recovery core plugin helps here by showing you past versions.
See the self-hosting section. You can host everything yourself, and replace all the defaults in the settings.
Collab only syncs markdown files right now.
Collab uses the WebRTC protocols to connect peer-to-peer. These protocols are usually used for video conferencing in Zoom/Google Meet/Discord, but they can also transmit arbitrary data.
Collab uses Yjs to sync text over the WebRTC protocols. It syncs using a CRDT, which means it works a bit like Google Docs and is smart about handling changes from multiple peers.
There's 3 types of servers involved in these protocols that you can configure in the plugin settings:
Cloudflare and Google have public STUN servers so we use those directly. They are cheap to run so we're not really worried about them going down.
Signalling servers are usually custom for each app, but Trystero lets us use public Nostr servers for signalling. I also run a community one on the Cloudflare Workers free plan, and hope more people do too. Collab uses community ones before trying public ones so we don't put too much load on the public ones.
TURN servers are not as easy as the others because they serve as relay and so all the (encrypted) data for that peer goes through them. But only peers that can't connect directly need them, which should be rare. ExpressTURN and others offer a free tier if you need it.
This repository has a Trystero-compatible minimal Nostr relay you can host on Cloudflare Workers for free, as long as you make an account:
git clone https://github.com/filipesilva/obsidian-collabcd obsidian-collabcd workernpm installnpx wrangler login to make an account and loginnpm run deployfilipesilva for minewss://obsidian-collab.<subdomain you picked>.workers.devIt works pretty well because signalling uses little traffic and is easy to do with Cloudflare Workers.
If like using Collab I encourage you to make a community one too and add it via a PR to COMMUNITY_RELAYS in src/network.ts so we have more of our own.
If you replace Community Collab relays with just your server, and remove all the Public Nostr relays, then files you share will only use your server for signalling.
Hosting STUN and TURN servers is a bit harder but you can do it with coturn. If you don't need TURN I think it's fine to use the public STUN servers even if you're very privacy conscious.
npm install
npm run test-deps # downloads chromium for the tests
npm run dev # esbuild watch
npm run build # typecheck and bundle main.js
npm test # fast tests in headless Chromium, no servers
npm run test-network # network tests: local relay and TURN, plus public relays
npm run lint
npm run e2e # end to end in test-vaults/one, two and three; needs Obsidian running and npm run build
To publish a new version:
npm test, npm run test-network, npm run lint and npm run e2eminAppVersion in manifest.json firstnpm version patch (or minor, major) updates manifest.json and versions.json, commits, and tags without a v prefixgit push && git push --tagsmain.js, manifest.json and styles.css