Overview
Sync Folds stores fold states in.obsidian/plugins/sync-folds/data.json, which means any file sync solution that syncs your vault will automatically sync your fold states. No additional configuration is required beyond ensuring the plugin is installed on all devices.
The
data.json file is stored in your vault’s plugin directory, so it’s treated like any other vault file by sync solutions.File Location
Fold states are persisted to:Sync Solutions
- Obsidian Sync
- iCloud
- Dropbox
- Git
- Syncthing
- Self-Hosted
Obsidian Sync
Status: ✅ Fully compatibleObsidian Sync automatically syncs all plugin data files, includingdata.json.Setup Steps
Install the plugin on all devices
Install and enable Sync Folds from Settings → Community plugins on each device where you use Obsidian.
Verify sync settings
Open Settings → Sync → Vault configuration sync and ensure “Plugins” is enabled. This is usually enabled by default.
Wait for initial sync
After enabling the plugin on multiple devices, Obsidian Sync will propagate the
data.json file. This typically takes a few seconds to minutes depending on sync frequency.Troubleshooting
Fold states not syncing
Fold states not syncing
- Check that “Plugins” is enabled in Sync settings
- Verify the plugin is enabled on both devices
- Check sync status in the bottom-right corner
- Try running Export folds from local storage to force a write
Sync conflicts
Sync conflicts
If you see sync conflicts for
data.json, choose the version from the device with the most complete fold states, or manually merge using the export/import commands.Enable/Disable Sync
Sync Folds includes anenableSync setting that controls whether the plugin actively syncs fold states.
Settings Interface
enableSync is true. When false:
- localStorage interception is disabled
- Fold changes are not written to
data.json - External change detection is not active
- Manual commands still work (export/import)
When to Disable Sync
Testing or debugging
Testing or debugging
Disable sync to prevent the plugin from modifying
data.json while you’re testing or debugging other parts of your vault setup.Temporary performance issues
Temporary performance issues
If you’re experiencing performance issues and suspect the plugin, temporarily disable sync to see if it improves performance.
Using only on one device
Using only on one device
If you only use Obsidian on one device, you may not need sync. However, keeping it enabled is harmless and provides a backup of fold states.
Sync Performance Tips
Use Local Networks
For peer-to-peer solutions like Syncthing, keep devices on the same WiFi network for fastest sync speeds.
Check Sync Intervals
Some sync solutions have configurable intervals. Set them to sync frequently (every 1-5 minutes) for near-real-time fold state updates.
Monitor File Size
data.json typically stays small (a few KB), but if you have thousands of files with fold states, it can grow. Most sync solutions handle small files very efficiently.Close Obsidian Before Switching
For non-real-time sync (like rsync or periodic iCloud), close Obsidian on one device before opening on another to ensure changes are synced.
Troubleshooting Common Sync Issues
Fold states not syncing between devices
Fold states not syncing between devices
Checklist:
- Verify the plugin is installed and enabled on both devices
- Check that
enableSyncistruein settings - Ensure
.obsidian/plugins/sync-folds/is not excluded by your sync solution - Verify
data.jsonexists:.obsidian/plugins/sync-folds/data.json - Check sync solution status (cloud icon, web UI, etc.)
- Try manually running Export folds from local storage on one device and Import folds into local storage on the other
Sync conflicts
Sync conflicts
If your sync solution creates conflicted copies of
data.json:- Open both versions in a text editor
- Compare the
foldsJSON string to see which has more complete data - Choose one version or manually merge the fold objects
- Replace
data.jsonwith the resolved version - Delete the conflicted copy
- Run Import folds into local storage on all devices
Fold states revert after syncing
Fold states revert after syncing
This can happen if:
- Two devices both export at the same time, and the wrong one wins
- Your sync solution’s conflict resolution chose the older version
- The plugin wasn’t running when the file synced, so localStorage wasn’t updated
data.json is empty or corrupted
data.json is empty or corrupted
If
data.json contains {"enableSync":true,"folds":"{}"} but you have fold states:- The plugin may have reset on load because the file was empty
- Run Export folds from local storage to rebuild from localStorage
- If localStorage is also empty, fold states were lost and cannot be recovered