# Peer-to-peer file sharing, explained

> Peer-to-peer file sharing sends files straight from one device to another with no cloud upload. How it works, when to use it, and how to share files safely.

_Guide · Updated 2026-10-28 · By Rishi Shah · https://relay.rishishah.in/peer-to-peer-file-sharing_

**Peer-to-peer (P2P) file sharing means sending a file directly from your device to another device, without uploading it to a server first.** Instead of "upload to the cloud, share a link, the other person downloads", the file streams straight across the network from sender to receiver.

## How P2P file sharing works

1. **The two devices find each other.** A small coordination server (or your local network) tells each device how to reach the other. In Relay this is the room code, QR code or nearby-devices list.
2. **They open a direct connection.** Modern browsers use [WebRTC](/webrtc-file-transfer) for this. The connection is encrypted end to end.
3. **The file streams across.** Chunks travel straight to the receiver, who saves them as they arrive.

Because nothing is stored in between, there is no upload wait, no storage quota and no copy left on someone else's server. See [how P2P file transfer works](/how-p2p-file-transfer-works) for the technical details.

## P2P vs cloud sharing

| | Peer-to-peer (e.g. Relay) | Cloud (e.g. WeTransfer, Google Drive) |
|---|---|---|
| Where the file goes | Straight to the other device | Uploaded to a company's servers |
| Size limit | None set by the tool | Plan limits (WeTransfer free: 3 GB per 30 days) |
| Speed | Single trip; LAN speed on the same Wi-Fi | Upload, then download |
| Copy left behind | None | Stored until it expires or you delete it |
| Both people online? | Yes, at the same time | No |
| Account needed | No | Often |

**Use P2P** when you want privacy, large files or speed, and both people can be online together. **Use the cloud** when the recipient will download later, or you need a permanent link.

## Is P2P file sharing safe?

Modern browser-based P2P is safe when three things are true:

- **The connection is encrypted end to end.** WebRTC always encrypts with DTLS.
- **You can verify who is on the other end.** Relay shows a [safety number](/verify-safety-number) on both screens.
- **You stay in control of what arrives.** Relay asks you to approve each device and accept each file.

"P2P" also has an old reputation from public file-swapping networks like BitTorrent, where you download from strangers. Direct transfer between two people who know each other is a different thing entirely. More in [is P2P file sharing safe?](/is-p2p-file-sharing-safe)

## How to share a file peer-to-peer with Relay

1. Open [Relay](/) on both devices.
2. Press **Start sending** and share the code or QR (or tap the device under **Nearby**).
3. Approve the device, drop your files, and the receiver presses **Accept**.

It works in Chrome, Edge, Firefox and Safari on any operating system, including between iPhone and Android.

## FAQ

### What is the difference between P2P and cloud file sharing?
With P2P the file goes directly to the other device. With cloud sharing it is uploaded to a server and downloaded from there later, which leaves a copy on that server.

### Do I need to install software for P2P file sharing?
Not with Relay. It runs in the browser. Some P2P tools, like LocalSend, are installable apps.

### Is P2P file sharing legal?
Yes. Sending your own files directly to someone is legal. What matters, as with email or USB sticks, is whether you have the right to share the content.

### Can P2P file sharing work over the internet, not just Wi-Fi?
Yes. Relay connects devices anywhere in the world with a room code. On the same network it simply runs faster.
