Quick Start
Get Secure-Smart-Sync running in under 10 minutes. You'll need an Obsidian vault and a Cloudflare account.
Step 1 — Create a Cloudflare R2 bucket
- Log in to dash.cloudflare.com.
- Go to R2 Object Storage and create a new bucket. Name it anything (e.g.
my-obsidian-vault). - Under R2 → Manage R2 API Tokens, create a token with Object Read & Write permission scoped to your bucket.
- Copy the Access Key ID, Secret Access Key, and your Account ID.
Step 2 — Install the plugin
- In Obsidian, open Settings → Community Plugins → Browse.
- Search for Secure Smart Sync and install it.
- Enable the plugin after installation.
main.js, manifest.json, and styles.css in your vault's .obsidian/plugins/secure-smart-sync/ folder.Step 3 — Configure credentials
- Open Settings → Secure Smart Sync.
- Enter your Account ID, Bucket Name, Access Key ID, and Secret Access Key.
- Set an encryption password. This is used to encrypt all files before upload — keep it safe.
- Click Test Connection to verify everything is working.
Step 4 — First sync
Click the sync icon in the ribbon or run Secure Smart Sync: Manual Sync from the command palette. Your vault will be encrypted and uploaded to R2.
Beginner's Guide
A complete walkthrough — from installing the plugin to your first sync and beyond. No prior experience with cloud storage needed.
1. Installation
- Go to the Releases page on GitHub and download the latest
main.js,manifest.json, andstyles.css. - Open your vault's hidden config folder —
.obsidianat the root of your vault. - Navigate to
.obsidian/plugins/. Create this folder if it doesn't exist. - Create a new folder inside
plugins/named exactlySecure-Smart-Sync. - Move the three downloaded files into that folder.
- In Obsidian: Settings → Community Plugins, refresh the list, and toggle Secure-Smart-Sync on.
2. Cloudflare R2 Setup
SSS uses Cloudflare R2 as its storage backend. You own and control the bucket — no third party has access to your files.
- Log in to dash.cloudflare.com. Navigate to R2 Object Storage in the sidebar.
- If prompted, add a payment method to activate R2.
- Click Create bucket. Choose a name such as
my-obsidian-vault-sync. Leave location as Automatic. Click Create bucket.
3. Generating API Credentials
- On the R2 Overview page, click Manage R2 API Tokens (top-right).
- Click Create API Token. Give it a recognisable name (e.g. "Obsidian Sync Key").
- Set Permissions to Object Read & Write.
- Under Specify bucket(s), select Apply to specific buckets only and choose your bucket.
- Click Create API Token.
4. Entering Credentials in Obsidian
Open Settings → Secure-Smart-Sync and fill in:
| Field | Where to find it |
|---|---|
| Endpoint | https://<your-account-id>.r2.cloudflarestorage.com — shown on the token page |
| Bucket Name | The exact name you chose when creating the bucket |
| Access Key ID | Copied from the Cloudflare API token page |
| Secret Access Key | Copied from the Cloudflare API token page (shown once only) |
Optional: Set a Remote Prefix if you want your vault stored in a subfolder within the bucket. Toggle Sync .obsidian Config Directory to also sync themes, snippets, and plugin settings.
Click Test Connection at the bottom of the section to verify the plugin can reach your bucket.
5. Encryption (Strongly Recommended)
Without a password your files are uploaded in plaintext. To maintain true zero-knowledge privacy, set an encryption password before your first sync.
- Enter a strong Password in the Encryption section.
- Choose an Encryption Method:
openssl-base64encrypts file content only;rclone-base64encrypts content and file names.
6. The First Sync
Do not hit the ribbon sync button for your very first run. Use the Command Palette instead:
- Open the Command Palette (Ctrl/Cmd + P) and run Secure-Smart-Sync: Dry run (show what would change). This scans without moving files. Check the Developer Console (Ctrl/Cmd + Shift + I) to verify the plan looks correct — it should list all your local files as "to push".
- Once satisfied, run Secure-Smart-Sync: Sync now from the Command Palette.
- After the primary device finishes, trigger Sync now on each secondary device to pull the encrypted files down.
7. Device Pairing (Mobile / Other Devices)
Avoid manually re-entering long API keys on mobile. Use the built-in encrypted pairing relay instead.
| On your primary device (desktop) | On the new device |
|---|---|
| Go to Settings → SSS → Pair Devices and click Generate Code. | Install SSS manually (see Step 1). Open SSS settings, go to Pair Devices, enter the code, click Import Code. |
8. Sync Settings
| Setting | Options | Notes |
|---|---|---|
| Sync Direction | Bidirectional (default) | Keep as Bidirectional for multi-device setups. |
| Conflict Resolution | Keep newer · Keep larger · Always keep local · Always keep remote | Keep newer recommended. |
| Delete Behaviour | System trash · Obsidian trash · Delete permanently | System trash recommended — files go to your OS Recycle Bin. |
| Skip Files Larger Than | 0 = no limit, or set MB | Prevents large video/PDF files from clogging sync. |
| Ignore Paths | One glob pattern per line | Exclude local-only folders or file types from sync. |
9. Automation — Smart Sync vs Manual
Smart Sync timing controls:
| Control | Default | Effect |
|---|---|---|
| Idle time before sync | 4 s | How long to wait after you stop typing before syncing. |
| Active poll interval | 2 000 ms | How often to check for remote changes while actively editing. |
| Idle poll interval | 30 000 ms | How often to check when you haven't typed for 2+ minutes. |
| Post-sync re-poll delay | 500 ms | Wait after a sync before checking state again. |
If you turn Smart Sync Off, manual triggers are available: Sync on App Open, Auto-Sync Interval, Sync on Save Debounce, and Sync on Idle. Note that manual mode does not include real-time cross-device awareness.
10. Status Indicators
Auto-syncs run silently — no pop-up toasts unless you trigger manually. Color cues communicate state instead:
| Color | State | Mobile tap action |
|---|---|---|
| Gray | Idle | Triggers a manual sync |
| Purple | Sync in progress | Shows file count and progress |
| Green | Sync completed | Shows success summary |
| Red | Error | Shows error details |
On mobile, a small custom icon sits next to the sidebar toggle on the main dashboard. On desktop, the ribbon icon and the bottom-right status bar both reflect live sync state.
11. Advanced & Danger Zone
| Setting | Purpose |
|---|---|
| Log Level | Set to Debug when troubleshooting a sync issue. |
| Use custom pairing relay | Only if you self-host your own sss-relay instance. |
| Show Status Bar | Toggle the live text updates in Obsidian's bottom-right bar. |
| Reset Sync History | Clears the plugin's internal state database, forcing a full comparison on the next sync. Does not delete any files. |
Core Philosophy
Secure Smart Sync was not built around feature accumulation. Three foundational principles guide every decision.
1. Privacy First
Personal notes are deeply private. They may contain journals, research, unfinished writing, or information users never intend to share. Secure Smart Sync treats privacy as non-negotiable. Files are encrypted before leaving your device. No third-party server can inspect your notes. Convenience should never come at the cost of privacy.
2. User Experience Matters
A technically functional product is not automatically a usable product. Significant development time has gone into small UX decisions that collectively make the plugin significantly easier to use — the mobile sync indicator, the encrypted relay for device pairing, and this documentation site all exist because friction reduction matters.
3. Long-Term Reliability
The definition of "done" is not whether a feature technically works once. It is whether the system remains reliable across messy real-world Obsidian workflows over long periods. Users go offline. They create conflicts. They reopen devices after long inactivity. The plugin is built with these scenarios in mind — conflict handling, duplicate protection, deletion safeguards, and sync state awareness are all part of the foundation, not afterthoughts.
Architecture
Secure Smart Sync is a layered system. Each layer exists to solve a specific problem in secure, long-term, cross-device synchronization.
1. Virtual File System Layer
The plugin operates on Obsidian's VFS abstraction. The sync engine only interacts with abstract providers — a Local Provider (reads/writes vault files) and a Remote Provider (interacts with R2 via a custom AWS S3 SDK implementation with a FetchHttpHandler wrapping Obsidian's requestUrl(), bypassing CORS limitations).
2. Three-Way Sync Engine
Every sync decision compares three states: local, remote, and previous sync. ETags and metadata provide additional validation to prevent accidental overwrites, missed changes, deletion mistakes, and conflict-related data loss.
3. Cryptographic Pipeline
Encryption is handled through a dedicated pipeline. Heavy cryptographic operations are offloaded to Web Workers so Obsidian doesn't freeze on large files.
| What | Algorithm |
|---|---|
| File contents | AES-256-CBC |
| File names | Rclone's Salsa20 + Poly1305 |
4. Device Coordination Layer (Smart Sync)
R2 is intentionally treated as dumb object storage. A lightweight sentinel file stored on R2 allows devices to detect when another device has performed meaningful sync activity. The plugin uses a dynamic polling mechanism — active, idle, standby, and post-sync intervals — most of which are exposed to users for fine-grained control.
5. Encrypted Relay System
Credential onboarding across devices is handled by an encrypted relay using Cloudflare Workers KV. Credentials are transmitted encrypted, stored temporarily, and self-destruct after approximately 10 minutes. The relay source code is publicly available at Secure-Smart-Sync-relay.
Why Cloudflare R2?
The choice of storage backend was critical. Here is why R2 provides the right conditions for a zero-knowledge Obsidian sync engine.
Zero Egress Fees
Traditional object storage (AWS S3, Google Cloud Storage) charges for downloading data — and in a multi-device sync workflow, every upload by one device must be downloaded by all others. Cloudflare R2 charges $0 for data egress. Users only pay for storage and operations, making costs entirely predictable.
Generous Free Tier
For the vast majority of personal Obsidian users, Secure Smart Sync is completely free to operate:
- 10 GB free object storage per month
- 1 million Class A (write/list) operations per month
- 10 million Class B (read) operations per month
- Unlimited free egress bandwidth
S3 API Compatibility
R2 implements the widely adopted S3 API, allowing use of the official @aws-sdk/client-s3 library — battle-tested SDKs with reliable multipart uploads, streaming, and error handling — rather than writing custom API wrappers.
Simplified Setup
Creating a bucket and generating a scoped API token on Cloudflare's dashboard takes under 60 seconds. AWS IAM, in comparison, requires navigating users, policies, and roles — a significant barrier for non-technical users.
Technical Trade-offs
forcePathStyle: true in the S3 client configuration. R2 is also a flat key-value store with no native folder objects — SSS synthesises folder structures in-memory from object key prefixes during walk().
Mobile Status Indicator
Obsidian on mobile lacks a status bar and ribbon. This section explains how Secure Smart Sync keeps sync visible without interrupting your writing flow.
The Problem with Toasts
Early versions relied on popup toast notifications. These were intrusive and disrupted the writing experience. Disabling them on desktop was fine because the status bar provided visibility — but on mobile, removing toasts left users completely blind to background sync activity.
The Solution
A small sync status indicator is placed directly on the mobile dashboard, positioned next to the sidebar icon. It is intentionally minimal so it feels native to Obsidian rather than like an external UI element. It only appears on the main dashboard and disappears in settings or when the sidebar is open.
Indicator States
| Color | State | Tap action |
|---|---|---|
| Gray | Idle — no active sync | Triggers a manual sync with toast confirmation |
| Purple | Sync in progress | Shows progress bar, status, and file count |
| Green | Sync completed successfully | Shows file count and success confirmation |
| Red | Error — sync failed | Shows detailed error information |
On desktop, the same color cues are applied to the ribbon icon. Desktop users also benefit from the persistent status bar for sync visibility.
Troubleshooting
Common issues and their solutions. For an exhaustive reference, visit the GitHub Wiki.
Verify your Account ID, Bucket Name, Access Key ID, and Secret Access Key are correct. Ensure the R2 API token has Object Read & Write permission scoped to the correct bucket. Check your Cloudflare dashboard to confirm the bucket exists.
Ensure all devices use the same encryption password and the same bucket. If sentinel polling is disabled or set to a very long interval, changes may take longer to detect. Try triggering a Manual Sync on the receiving device.
Tap or click the red icon for detailed error information. Common causes: network disconnection, expired API token, or bucket permissions revoked. Re-run the connection test in plugin settings after resolving the issue.
Pairing codes automatically self-destruct after approximately 10 minutes. Generate a new code on the source device and enter it on the target device promptly. Ensure both devices have an active internet connection during the pairing process.
Conflicts occur when the same file is edited on two devices before either syncs. The three-way sync engine detects this and creates a conflict copy rather than silently overwriting. Review both versions and keep the one you want, then delete the conflict copy.
Token Usage
Understanding Cloudflare R2 API operation consumption. For most users, staying within the free tier is straightforward.
Operation Types
| Class | Operations | Free Tier |
|---|---|---|
| Class A | PUT, DELETE, LIST (write-heavy) | 1 million / month |
| Class B | GET, HEAD (read-heavy) | 10 million / month |
Per Sync Cycle (one file, two devices)
| Action | Class A | Class B |
|---|---|---|
| Device A push | 3 | 2 |
| Device B pull | 1 | 4 |
| Device B push | 3 | 2 |
| Device A pull | 1 | 4 |
| Total | 8 | 12 |
Typical Monthly Estimates
| Profile | Devices | Class A / month | Class B / month |
|---|---|---|---|
| Casual (student) | 2, <1K files, 1–3 hrs/day | 15K–40K (1.5–4%) | 300K–900K (3–9%) |
| Writer / Researcher | 2–3, 2K–5K files, 3–6 hrs/day | 50K–180K (5–18%) | 1M–3M (10–30%) |
| Power User | 4–5, 5K+ files, 6–8 hrs/day | 250K–600K (25–60%) | 3M–6M (30–60%) |
| Extreme Edge Case | 5+, 10K+ files, 8+ hrs/day | 700K–1M+ (70–100%+) | 6M–10M+ (60–100%+) |
About
Secure Smart Sync (SSS) is an open-source project created by an independent solo developer, Sen, as a free and privacy-focused alternative to Obsidian Sync.
The plugin was built to give users full ownership over their notes by allowing them to sync their Obsidian vaults through their own Cloudflare R2 storage while keeping files encrypted locally before upload. The public release of SSS v1.0.0 was reached after 26 major iterations of the codebase.
All branding assets — including the project name, logos, icons, and visual identity — were created by Sen and remain exclusive to this project. While the source code is licensed under the MIT License, the branding assets are not covered under that license.