Storage
Understand browser storage limits and how to configure Cloudflare R2 for persistent cloud storage.
IndexedDB Storage Overview
- All documents and images are stored in browser IndexedDB — local-first, no login required
- Storage quota varies by browser and OS — typically 500 MB to 2 GB
- When usage exceeds 70% of quota, a yellow warning bar appears at the bottom of the sidebar with a quick "Export Backup" button
Short-term Mitigation
- Regularly click "Export" in the sidebar to download a ZIP backup, then delete archived old documents to free up space
- Prefer external image URLs over pasting images directly — Base64-encoded images can be large
- Use the "Archive" feature to move infrequently used documents out of the main list
Cloudflare R2 Setup Guide
R2 free tier: 10 GB storage/month + 10M Class-A operations + 100M Class-B operations — more than enough for individual writers.
1
Sign up for Cloudflare and create an R2 Bucket
- Visit cloudflare.com and register a free account
- Go to the left sidebar → R2 Object Storage → accept the terms (a payment method is required but you will not be charged within the free tier)
- Click "Create bucket" → enter a name (e.g. mark-build-assets) → choose the region closest to you → Create
https://cloudflare.com
2
Enable Public Access
- Go to Bucket → Settings → Public Access → enable "Allow Public Access"
- R2 assigns a pub-xxxx.r2.dev subdomain as the public URL — copy this address
- (Optional) Settings → Custom Domains → bind a custom domain, e.g. assets.yourdomain.com
https://pub-xxxx.r2.dev
3
Create an API Token
- Click your avatar in the top-right → My Profile → API Tokens → Create Token
- Choose "Create Custom Token", set permission: Account → R2 Storage → Edit
- Copy the token immediately after generation — it is only shown once
- Also note your Account ID — visible on the right side of the R2 overview page
4
Configure in the Editor
- Click the gear icon (⚙) on the right side of the editor top bar to open the Storage Settings panel
- Enter Bucket name, Account ID, API Token, and public URL, then click "Save"
- Once configured, pasting an image (Ctrl+V / Cmd+V) in the editor automatically uploads it to R2 and inserts the image link at the cursor
- Exported HTML files reference R2 public links — significantly smaller file size and faster loading
Security Notes
- Your API Token has R2 write access — never expose it or commit it to a code repository
- Create a dedicated token with minimal permissions for Mark.build (R2 Storage Edit only — no other permissions)
- Periodically check R2 usage in the Cloudflare dashboard to avoid unexpected overages