# Peer Share Share files between Obsidian vaults using WebRTC peer-to-peer connections, powered by [PairDrop](https://github.com/schlagmichdoch/pairdrop). ## Features - **P2P File Sharing**: Direct peer-to-peer file transfers using WebRTC - **PairDrop Compatible**: Works with PairDrop web and mobile browser apps - **Device Pairing**: Pair devices for cross-network file sharing - **Share Files & Folders**: Share individual files or entire folders between vaults - **Transfer History**: Track all sent and received files in a searchable sidebar view - **Cross-Platform**: Works on desktop (Windows, macOS, Linux) and mobile - **Auto-Discovery**: Automatically discover peers on the same network - **Progress Tracking**: Real-time transfer progress with detailed status - **Multilingual**: Available in 8 languages (English, Spanish, German, French, Russian, Japanese, Korean, Simplified Chinese) - **System Notifications**: Optional OS-level notifications for incoming transfers (desktop only) - **Configurable**: Custom signaling server, save location, and log levels ## Installation [Install from community.obsidian.md](https://community.obsidian.md/plugins/peer-share) From Obsidian's settings or preferences: 1. Community Plugins > Browse 2. Search for "Peer Share" Manually: 1. download the latest [release](https://github.com/gapmiss/peer-share/releases/latest) archive 2. uncompress the downloaded archive 3. move the `peer-share` folder to `/path/to/vault/.obsidian/plugins/` 4. Settings > Community plugins > reload **Installed plugins** 5. enable plugin or: 1. download `main.js`, `manifest.json` & `styles.css` from the latest [release](https://github.com/gapmiss/peer-share/releases/latest) 2. create a new folder `/path/to/vault/.obsidian/plugins/peer-share` 3. move all 3 files to `/path/to/vault/.obsidian/plugins/peer-share` 4. Settings > Community plugins > reload **Installed plugins** 5. enable plugin ## Usage ### Sharing Files 1. Click the Peer Share icon in the ribbon (left sidebar) 2. Select a peer from the list of discovered devices 3. Choose files or folders to share 4. Monitor transfer progress ### Alternative Methods - **Context Menu**: Right-click any file/folder and select "Share via Peer Share" - **Command Palette**: Use `Ctrl/Cmd + P` and search for "Peer Share" - `Show available peers` - Open peer selection - `Share current file` - Share the currently open file - `Share files...` - Open file picker - `Open share history` - View transfer history - `Reconnect to server` - Manually reconnect - `Pair with device` - Pair for cross-network sharing - `Toggle connection` - Connect or disconnect from server - **Status Bar**: Click the status bar item for quick access to connect/disconnect, show peers, pair, and view your display name ### Receiving Files When someone sends you files: 1. An incoming transfer dialog will appear 2. Review the files being sent 3. Click "Accept" to receive or "Decline" to reject 4. Files are saved to your configured save location (default: `Peer Share/`) ### Device Pairing Pair devices to share files across different networks: 1. Run command `Peer Share: Pair with device` 2. Choose "Show pairing code" on one device 3. Enter the 6-digit code on the other device 4. Devices are now paired and can discover each other from anywhere Manage paired devices in Settings > Peer Share > Paired Devices. ### Share History View all your sent and received file transfers in the Share History sidebar: 1. Open via command palette: "Peer Share: Open share history" 2. Or from Settings > Peer Share > Share History > "Open History" 3. Browse transfers grouped by time (Today, Yesterday, This Week, etc.) 4. Search by filename, peer name, OS, or browser 5. Filter by direction (sent/received) and status (completed/failed/cancelled) 6. Export/import history for backup 7. View statistics and reveal received files in vault ## Settings | Setting | Description | |---------|-------------| | **Signaling Server URL** | WebSocket URL for peer discovery (default: `wss://pairdrop.net`) | | **Save Location** | Folder where received files are saved (default: `Peer Share/`) | | **Discovery Mode** | `Auto-discover` (local network + paired devices) or `Paired devices only` | | **Log Level** | Console logging verbosity (Silent, Error, Warning, Info, Debug) | | **Auto-connect on startup** | Automatically connect to server when Obsidian loads (default: enabled) | | **System Notifications** | Show OS-level notifications for incoming transfers (desktop only, default: disabled) | | **Paired Devices** | View and manage paired devices (each can have auto-accept enabled) | | **Share History** | Configure history tracking, retention period, and privacy settings | ## Self-Hosted Server You can use your own PairDrop signaling server for privacy or reliability: 1. See **[DEPLOYMENT.md](DEPLOYMENT.md)** for detailed hosting options including: - Docker (recommended) - Fly.io, Railway, Render (free tiers) - VPS with Nginx reverse proxy 2. Update the "Signaling Server URL" in plugin settings to your server's WebSocket URL The signaling server only handles peer discovery - actual file data transfers directly between peers via WebRTC. ## How It Works 1. **Signaling**: Peers connect to a signaling server to discover each other 2. **WebRTC**: Once peers are found, a direct WebRTC connection is established 3. **Transfer**: Files are chunked into 64KB pieces and sent directly peer-to-peer 4. **Storage**: Received files are saved to your vault using Obsidian's API Data flows directly between peers - the signaling server only facilitates the initial connection and never sees your file contents. ## Security Peer Share uses **WebRTC's built-in encryption** (DTLS + SRTP) for secure peer-to-peer file transfers: - ✅ **All file data is encrypted** during transfer (same encryption as Zoom/Google Meet) - ✅ **Signaling uses WSS (WebSocket Secure)** - encrypted with TLS like HTTPS - ✅ **Server never sees your files** - only connection metadata for peer discovery - ✅ **No configuration needed** - encryption is automatic For detailed security information, see **[SECURITY.md](SECURITY.md)**. ## Compatibility - **Obsidian**: v1.0.0+ - **Platforms**: Desktop (Windows, macOS, Linux), Mobile (iOS, Android) - **Peers**: Works with other Obsidian vaults and PairDrop web/mobile browser apps ## Troubleshooting ### Can't see peers - Ensure both devices are connected to the same signaling server - Check if you're behind a restrictive firewall (may need TURN server) - Try the "Reconnect" button in settings ### Transfers failing - Large files may timeout on slow connections - Check your internet connection - Try sending fewer files at once ### Connection issues - WebRTC requires HTTPS for the signaling server - Some corporate networks block WebRTC - try a different network ## License MIT License - See [LICENSE](LICENSE) for details. ## Credits - [PairDrop](https://github.com/schlagmichdoch/pairdrop) - [Obsidian](https://obsidian.md/)