MCPSERV.CLUB
Pairdrop

Pairdrop

Self-Hosted

Peer‑to‑peer file sharing across any device

Stale(60)
9.0kstars
0views
Updated Feb 25, 2025

Overview

Discover what makes Pairdrop powerful

PairDrop is a self‑hosted, peer‑to‑peer file transfer service that emulates the simplicity of Apple’s AirDrop while providing full control over data locality and privacy. Built as a fork of Snapdrop, it adds persistent device pairing, temporary public rooms for Internet‑wide transfers, and a richer API surface for developers. The core idea is to expose a lightweight web application that can run on any modern browser, while the backend orchestrates discovery and NAT‑traversal via WebRTC.

Local & Internet Transfer

Persistent Pairing

Public Rooms

Multi‑Platform UI

Overview

PairDrop is a self‑hosted, peer‑to‑peer file transfer service that emulates the simplicity of Apple’s AirDrop while providing full control over data locality and privacy. Built as a fork of Snapdrop, it adds persistent device pairing, temporary public rooms for Internet‑wide transfers, and a richer API surface for developers. The core idea is to expose a lightweight web application that can run on any modern browser, while the backend orchestrates discovery and NAT‑traversal via WebRTC.

Key Features

  • Local & Internet Transfer – Files are sent directly over a WebRTC data channel when devices share the same LAN; otherwise, a TURN server bridges the connection so transfers work across NATs, VPNs or mobile hotspots.
  • Persistent Pairing – Devices can be paired with a 6‑digit code or QR, storing a shared secret in the browser’s local storage. Once paired, a device will automatically reconnect on subsequent visits.
  • Public Rooms – For ad‑hoc sharing, users can join a 5‑letter room code. All participants in the same room are visible to each other, and rooms are transient (cleared on exit).
  • Multi‑Platform UI – The front end is a single page app that runs on iOS, Android, Windows, macOS and Linux browsers. It also offers context‑menu integration on Ubuntu and Windows for sending files directly from the OS shell.
  • Batch & Text Transfer – Multiple files are zipped automatically; plain text can be shared via the web’s “Share” menu or a CLI wrapper.

Technical Stack

LayerTechnologyRationale
FrontendReact (or vanilla JS in Snapdrop core) + WebRTC APIsProvides a responsive UI and handles peer discovery.
BackendNode.js (Express) + Socket.IO for signallingMinimal server to exchange SDP offers/answers and ICE candidates.
TURN/STUNCoturn (open‑source TURN server)Enables NAT traversal; can be self‑hosted or use a public TURN service.
Data PersistenceBrowser localStorage / IndexedDBStores pairing secrets and room state client‑side; no server DB required.
DeploymentDocker (official image available)Containerized build simplifies CI/CD and cloud hosting.
OptionalDocker Compose / Kubernetes manifestsFor scaling the signalling or TURN servers in a cluster.

Core Capabilities & APIs

  • WebRTC Signalling – Exposes a Socket.IO endpoint that accepts offer, answer and ice-candidate messages. Developers can replace or extend this channel with a custom signaling server (e.g., using WebSockets, MQTT, or HTTP long‑polling).
  • REST Hooks – The server can be extended to publish events (device joined, file received) via webhooks or a message queue.
  • Plugin Hooks – PairDrop’s codebase contains onFileReceived and onDevicePaired hooks that can be overridden to implement custom storage back‑ends (e.g., S3, NAS) or trigger CI pipelines.
  • CLI Wrapper – A small Node script (pairdrop-cli) exposes the same functionality, allowing automated uploads from scripts or CI jobs.

Deployment & Infrastructure

  • Self‑Hosting – A single Docker container runs the signalling server; a second container can host Coturn. Both expose standard ports (e.g., 3000 for signalling, 3478/5349 for TURN).
  • Scalability – Since the signalling server is stateless, it can be replicated behind a load balancer. TURN servers are the main bottleneck for bandwidth; multiple instances can be sharded per region.
  • Security – All traffic is TLS‑encrypted. Pairing secrets are never transmitted to the server; they remain in the client’s storage, ensuring end‑to‑end confidentiality.
  • Resource Footprint – Minimal CPU/memory usage (≈50 MiB container). Ideal for Raspberry Pi, Docker‑enabled NAS or cloud VMs.

Integration & Extensibility

  • Custom Signalling – Swap Socket.IO with any WebSocket library; the protocol is simple JSON messages.
  • Webhooks – Add a /webhook endpoint to emit events to external services (Slack, PagerDuty).
  • Storage Back‑ends – Override the handleFile callback to pipe incoming streams directly to S3, MinIO or a local NAS folder.
  • UI Customization – The React components are modular; developers can fork the UI, add branding or integrate with their own authentication system.

Developer Experience

  • Documentation – The repo contains a concise README, API notes, and examples for context‑menu integration on Ubuntu/Windows. The docs/ folder includes step‑by‑step guides for CLI usage.
  • Community – The project is active on GitHub issues; contributors can propose new pairing mechanisms or TURN optimizations.
  • Licensing – MIT license allows unrestricted use in commercial or internal projects.

Use Cases

ScenarioWhy PairDrop?
Office LAN – Share files between laptops without a shared driveZero‑configuration, peer‑to‑peer transfer; no central server needed.
Remote Collaboration – Two developers on different networks need to exchange code snippetsPublic rooms and TURN enable quick, secure file transfer without VPN setup.
IoT Device Updates – Push firmware to embedded devices that only expose a browserUse the CLI wrapper or custom storage hook

Open SourceReady to get started?

Join the community and start self-hosting Pairdrop today

Weekly Views

Loading...
Support Us

Featured Project

$30/month

Get maximum visibility with featured placement and special badges

Repository Health

Loading health data...

Information

Category
other
License
GPL-3.0
Stars
9.0k
Technical Specs
Pricing
Open Source
Database
None
Docker
Dockerfile
Supported OS
LinuxDocker
Author
schlagmichdoch
schlagmichdoch
Last Updated
Feb 25, 2025