Why self-hosted sharing
Every "share" button you've ever clicked uploaded your document to someone else's server, under someone else's terms, with someone else's lifespan. note.md's share plugin deploys a small Worker to your Cloudflare account: your links, your data, your kill switch. The free tier (100k requests/day) is far more than a human sharing documents will ever use.
Deploy in ten minutes
cd worker
pnpm install
wrangler login
wrangler kv:namespace create SHARES # copy the id into wrangler.toml
openssl rand -hex 32 | wrangler secret put SHARE_API_KEY
wrangler deploy # prints your Worker URL
Paste the Worker URL and API key into note.md → Preferences → Share and save. Full details live in the repo's worker/README.md.
What you get
- One keystroke:
Cmd+Shift+Lpublishes the current file; the URL lands in your clipboard. Share again to update in place; unshare returns 410. - Faithful rendering: KaTeX math, Mermaid diagrams as SVG, syntax highlighting, light/dark via
prefers-color-scheme, mobile-optimized. - Images included: image-heavy documents spill to Cloudflare R2 (also free tier) automatically.
- Agent-ready: the Worker exposes an MCP endpoint, so your agents can publish on your behalf —
notemd share draft.mddoes it from any script.
FAQ
How much does this cost?
Nothing for personal use. Cloudflare's free tier includes 100,000 Worker requests per day and 10GB of R2 storage — orders of magnitude beyond a person sharing documents.
Can I take a shared page down?
Yes, instantly. File → Unshare (or notemd share --unshare) revokes the link; visitors get a 410. It's your Worker — you can also just delete it.