6.9 KiB
Obsidian Plugin
Real-time sync for Obsidian vaults.
Installation
From Obsidian Community Plugins
- Open Obsidian Settings
- Navigate to Community Plugins
- Click Browse and search for "VaultLink"
- Click Install
- Enable the plugin
Manual Installation
- Download the latest release from GitHub Releases
- Extract
main.js,manifest.json, andstyles.css - Copy to
.obsidian/plugins/vault-link/in your vault - Reload Obsidian
- Enable VaultLink in Community Plugins settings
Configuration
After installation, configure the plugin in Settings → VaultLink.
Required Settings
Server URL
The WebSocket URL of your sync server.
- Development/Local:
ws://localhost:3000 - Production (SSL):
wss://sync.example.com
::: tip
Use ws:// for unencrypted connections and wss:// for SSL connections (production).
:::
Authentication Token
Your authentication token from the server's config.yml.
Generate a secure token:
openssl rand -hex 32
Vault Name
The name of the vault on the server. Can be any string.
Multiple Obsidian vaults can sync to the same server vault name (for shared vaults), or use unique names for separate vaults.
Optional Settings
Sync Concurrency
Number of files to sync simultaneously.
- Default: 1
- Range: 1-10
- Higher values = faster initial sync, more resource usage
Max File Size
Maximum file size to sync (in MB).
- Default: 10
- Files larger than this are skipped
Ignore Patterns
Glob patterns for files to exclude from sync.
Examples:
*.tmp- Ignore temporary files.trash/**- Ignore trash folderprivate/**- Ignore private directory
WebSocket Retry Interval
Milliseconds between reconnection attempts when disconnected.
- Default: 3500ms
- Increase for flaky networks to avoid connection spam
Usage
Initial Sync
When first connecting:
- The plugin uploads all local files to the server
- Downloads any missing files from the server
- Resolves any conflicts using operational transformation
- Begins real-time synchronisation
Initial sync time depends on vault size and sync_concurrency setting.
Real-Time Sync
Once connected:
- File changes: Automatically synced when saved
- File creation: New files immediately uploaded
- File deletion: Deletions propagated to other clients
- File renames: Tracked and synchronised
The plugin watches your vault filesystem and syncs changes in real-time via WebSocket.
Status Indicators
The plugin provides visual feedback:
- Connected: Green status in settings
- Syncing: Progress indicator during uploads
- Disconnected: Red status, automatic reconnection attempts
- Error: Error message in settings and console
Check the Obsidian console (Ctrl+Shift+I / Cmd+Option+I) for detailed logs.
Features
Automatic Conflict Resolution
When multiple users edit the same file simultaneously, operational transformation merges changes automatically:
- All edits are preserved
- No manual conflict resolution required
- Changes appear in real-time as others type
Mobile Support
VaultLink works on Obsidian mobile (iOS and Android):
- Same configuration as desktop
- Real-time sync across all devices
- Handle network changes gracefully
::: warning Ensure your sync server is accessible from mobile networks (use WSS with a public domain or VPN). :::
Offline Support
The plugin handles offline scenarios:
- Continue working when disconnected
- Changes queue locally
- Automatic sync when connection restored
- Conflict resolution if others edited the same files
Collaboration Workflows
Personal Multi-Device Sync
Sync the same vault across devices:
- Configure each Obsidian instance with the same vault name
- Use the same authentication token
- All devices stay in sync automatically
Team Shared Vault
Multiple users collaborating:
- Each user has their own token (configured in server
config.yml) - All users connect to the same vault name
- Real-time collaborative editing with automatic conflict resolution
Selective Sharing
Share specific folders while keeping others private:
- Use different vault names for shared vs. private content
- Configure access control on the server per vault
- Use ignore patterns to exclude sensitive directories
Troubleshooting
Plugin won't connect
-
Verify server is running:
curl http://your-server:3000/vaults/test/pingShould return
pong -
Check URL format:
- Local:
ws://localhost:3000 - Remote (SSL):
wss://sync.example.com - Don't include
/vault/namein the URL
- Local:
-
Verify token:
- Must match server config exactly
- No extra spaces or quotes
- Check server logs for authentication errors
-
Check firewall:
- Ensure port is accessible from your network
- For mobile, server must be publicly accessible or use VPN
Files not syncing
- Check ignore patterns: File may match an exclusion pattern
- File size: Check if file exceeds
max_file_size_mb - Permissions: Ensure vault directory is readable/writable
- Console errors: Open dev tools (Ctrl+Shift+I) and check console
Slow initial sync
- Increase concurrency: Set
sync_concurrencyhigher (e.g., 5) - Network speed: Check internet connection
- Server resources: Ensure server isn't overloaded
- Large files: Consider increasing timeout settings
Conflicts not resolving
Operational transformation should handle conflicts automatically. If issues persist:
- Check console for sync errors
- Verify both clients are connected
- Check server logs for processing errors
- Ensure files are text-based (binary files may not merge well)
High CPU/Memory usage
- Reduce concurrency: Lower
sync_concurrency - Add ignore patterns: Exclude unnecessary files
- File watchers: Large vaults may trigger many filesystem events
- Check for sync loops: Ensure no circular dependencies
Advanced Configuration
Multiple Vaults
To sync multiple Obsidian vaults to different server vaults:
- Each Obsidian vault has its own VaultLink plugin configuration
- Use different vault names for each
- Can use the same or different tokens (depending on access control)
Custom Sync Patterns
Combine ignore patterns for fine-grained control:
# Ignore patterns
*.tmp
*.bak
.DS_Store
.trash/**
private/**
drafts/**/*.draft.md
Development/Testing
For plugin development:
- Clone the repository
cd frontend && npm installnpm run devto build in watch mode- Plugin rebuilds automatically on changes
- Reload Obsidian to test changes