Story 9 · LocalSend
The Pendrive That Never Came Back
“The fastest way to send a file to the person beside you should not go through a server in another country.”
12 min read · by Syed Jafer K
1. One Video, Four Wrong Ways
Karthik was in the final year of a government engineering college in Coimbatore. His team had one night left before the state hackathon demo, and the demo was a screen recording. It ran for six minutes and the file was 1.2 GB.
Ilakkiya, his teammate, was sitting two benches away with the laptop that would be plugged into the projector. Karthik had to get the file to her.
He tried four things in an hour.
WhatsApp took the file and shrank it until the code on the screen looked like soup. The email service said the limit was 25 MB. The pendrive went round the lab and came back with a warning from the antivirus, and nobody could say who had touched it last. The cloud drive began to upload, showed "3 hours remaining" because the lab Wi-Fi was shared by two hundred students, and he cancelled it.
The file was sitting on his laptop. Ilakkiya's laptop was one metre away. Both were on the same Wi-Fi.
"It is funny," Ilakkiya said. "The data has to go to a server in another country and come back, just to cross a bench."
Then she opened an app she had been using for months and said one word. LocalSend.
2. What LocalSend Is
LocalSend is a free and open source app for sending files and messages to devices near you. It does not use the internet. It does not ask you to sign in. It has no accounts and no cloud in the middle.
It helps to be exact about what that means.
| Question | Answer |
|---|---|
| Who makes it | An open source project on GitHub, under the Apache 2.0 licence |
| What it is written in | Flutter and Dart for the app, with some Rust |
| Where it runs | Windows, macOS, Linux, Android, iOS and Fire OS |
| Does it need internet | No, only a shared local network |
| Does it need an account | No |
| Who sees my files | Only the two devices involved |
| How much does it cost | Nothing |
Because it is one codebase for every platform, the same app talks to itself across systems. A Windows laptop can send to an Android phone, a Mac can send to a Linux desktop, and an iPhone can send to anything.
A word on the name. "Local" is the important part. LocalSend moves data across the network you are already on. If two devices cannot see each other on that network, it cannot help them. It is not a replacement for a cloud drive. It is a replacement for the pendrive.
3. Installing It
Ilakkiya told him to install it from a package manager or a store, and not from a random download link. The project says the same, because the app does not update itself. Getting it from a store means updates arrive with everything else.
# Windows
winget install LocalSend.LocalSend
# macOS
brew install --cask localsend
# Linux with Flatpak
flatpak install flathub org.localsend.localsend_app
The other routes are just as plain.
| Platform | Where to get it |
|---|---|
| Windows | winget, Scoop, Chocolatey, or the installer and portable ZIP from the releases page |
| macOS | Mac App Store, Homebrew, or the DMG |
| Linux | Flathub, Snap, Nixpkgs, the AUR (localsend-bin), or a DEB, TAR or AppImage |
| Android | Google Play or F-Droid |
| iOS | App Store |
| Fire OS | Amazon Appstore |
On Linux the app needs a desktop portal so it can open file pickers. On GNOME that means xdg-desktop-portal and xdg-desktop-portal-gtk, and on KDE it means xdg-desktop-portal-kde. Most desktops already have them.
Karthik's lab machine ran Ubuntu and Ilakkiya's laptop ran Windows. He took the Flatpak. It took less than a minute.
4. The First Transfer
The window had two parts that mattered. One showed his device with a funny random name, something like Brave Mango. The other showed nearby devices.
Ilakkiya's laptop was already there, under her own random name.
"You can rename yours in the settings," she said. "Do that if you send to people you do not know well. Otherwise the whole room sees Brave Mango."
Karthik did these three things.
- He clicked File and chose the video.
- He clicked her laptop in the list of nearby devices.
- He waited.
On her screen a prompt appeared with his name, the file name and the size. She pressed Accept.
The progress bar moved faster than he expected. The whole file crossed the bench in under a minute.
"That is the speed of your Wi-Fi router, not the speed of your internet," Ilakkiya said. "The data never leaves the room."
She showed him the settings that make this smoother.
- Quick Save accepts files from known devices without a prompt. It is useful for your own phone and laptop. It is a bad idea in a public place.
- Destination folder decides where received files land. She had set hers to a folder called
Received, so nothing was lost in Downloads. - PIN asks the sender to type a code before anything is accepted, which is handy when the room is full of strangers.
She said these names might differ a little from version to version, so it is worth a minute to look through the settings once.
5. Sending Text, Folders and Clipboard
The next surprise was that LocalSend sends more than files.
- Text. Karthik had a long error log on his phone and wanted it on his laptop. He chose Text, pasted it, and sent it. No messaging app, no screenshot.
- Clipboard. One tap sends whatever he had copied.
- Folders. He picked the whole project folder. It arrived with its structure intact.
- Many files. He chose forty photos from the college fest and they arrived together.
That evening he did something he had never done before. He sent a link from his laptop to his phone, in two taps, without opening any chat window and without his own name appearing next to it in anyone's history.
6. How It Works Underneath
Karthik is the kind of person who cannot leave a thing alone until he knows how it works. Ilakkiya enjoyed that, because the answer is short and tidy, and the protocol is written down in the open.
Finding each other
When LocalSend starts it shouts a short hello. This is a UDP multicast to the address 224.0.0.167 on port 53317. Every LocalSend device on the same network is listening there, so each one learns the others' names without any server telling them.
That hello says who the device is.
{
"alias": "Brave Mango",
"version": "2.0",
"deviceModel": "Linux",
"deviceType": "desktop",
"fingerprint": "<hash of its certificate>",
"port": 53317,
"protocol": "https",
"announce": true
}
The listener answers by calling the sender's register endpoint, so both sides end up knowing each other.
If multicast is blocked on a network, there is a fallback. The device simply tries to register with every address on the local subnet, one by one, on port 53317. It is slower but it works.
Sending the file
A transfer is an ordinary conversation between two small web servers. Every LocalSend app is both a client and a server on port 53317.
sender POST /api/localsend/v2/prepare-upload only file names and sizes
receiver (the person taps Accept) replies with a session id and a token per file
sender POST /api/localsend/v2/upload the actual bytes, one or many in parallel
The sender can cancel at any point. The receiver can accept some files and reject others. If the sender provided a SHA-256 hash for a file, the receiver checks it and refuses a damaged copy.
Why it is safe on a shared network
Each device makes its own TLS certificate when it first runs, and the transfer happens over HTTPS. The fingerprint in the hello above is the SHA-256 of that certificate. It is how the apps recognise a device they have seen before, and how a device avoids discovering itself.
This is a self-signed certificate. That means no company vouches for it, which is why the human step matters. You see a name on the screen and you press Accept. Nothing arrives unless you agree.
What this does not protect you from. A person on the same network who knows your alias can send you a file request. They cannot force it onto your disk, but a rude or confusing name can fool a tired person. Keep Quick Save off in public places and read the prompt before you accept.
7. When Nothing Shows Up
On the second evening Ilakkiya's phone could not see Karthik's laptop at all. This is the single most common problem, and the fixes are almost always the same few things.
| Symptom | Likely cause | What to do |
|---|---|---|
| No devices appear | The router has client isolation (AP isolation), common on guest Wi-Fi and college networks | Switch to another network, or turn on a phone hotspot (see below) |
| Windows laptop is invisible | Windows treats the network as public and blocks incoming traffic | Set the network profile to Private |
| Linux laptop is invisible | The firewall blocks the port | Open port 53317 for TCP and UDP |
| Mac or iPhone sees nothing | The Local Network permission is off | Switch it on for LocalSend in system settings |
| Everything is on but still hidden | A VPN is running | Allow local traffic in the VPN, or pause it for a moment |
| Transfers crawl | Slow 2.4 GHz Wi-Fi | Move both devices to 5 GHz |
The firewall commands are short.
# Ubuntu with ufw
sudo ufw allow 53317
# Fedora with firewalld
sudo firewall-cmd --add-port=53317/tcp --add-port=53317/udp --permanent
sudo firewall-cmd --reload
Incoming traffic needs port 53317 on both TCP and UDP. Outgoing traffic can use any port.
On the college network the cause was AP isolation. The network was set up so that students' devices could not talk to each other at all, which is a sensible choice for two hundred strangers, and which also stops LocalSend. No setting in the app can get around it.
8. No Wi-Fi at All? Make Your Own
Ilakkiya's trick for exactly this case needed nothing but a phone.
- Turn on the mobile hotspot on any phone. Mobile data does not need to be on.
- Connect both laptops to that hotspot.
- Open LocalSend on both.
A hotspot is a tiny private network with no isolation, so the devices see each other at once. Karthik did this on a bus to the hackathon, sharing slides with a teammate in the next seat, with no signal on the road at all.
If a device still does not appear, LocalSend lets you type the other device's IP address by hand.
# on Linux, to find your address
ip -4 addr show | grep inet
You can also mark a device as a favourite. LocalSend then checks for it directly, which helps on networks where multicast is unreliable.
9. The Command Line and Headless Machines
Karthik liked things he could script. The project ships a command line tool for macOS and Linux.
brew install localsend-cli
It can send a file or a whole directory, keeping the folder paths, to a device by name or by address, and it can send a short message too.
localsend send --to "Cute Apple" report.pdf
localsend send --to 192.168.1.42 --text "build finished"
A text message longer than 64 KB is sent as a .txt file instead. The exact flags can change between versions, so check the tool's own help before you rely on them in a script.
Two small options made it feel at home on a desktop.
- A portable mode keeps settings in a
settings.jsonfile next to the program, so the whole thing can live on a drive or in a project folder. - A hidden start flag opens the app in the system tray, so it can run quietly from login and be ready when a friend arrives.
10. Because the Protocol Is Open
Everything above is possible because the LocalSend protocol is published as a plain document in its own repository. It is a handful of HTTP calls. Anyone can read it and write a client.
That has a practical meaning. Karthik is not locked into one program. If the official app disappeared tomorrow, any other app that follows the document could still talk to his devices. A friend of his is writing a tiny receiver for a Raspberry Pi in the college lab, a headless box that does nothing but accept files into a shared folder.
There is also a mode for people who have no LocalSend at all. The sender can offer a download link that works over a local web address, and the other person opens it in a browser. This runs over plain HTTP because browsers refuse self-signed certificates, so use it only on a network you trust.
11. Small Habits That Keep It Safe
- Install from a store or package manager. The app does not update itself, so this is also how security fixes reach you.
- Rename your device if you carry it into rooms full of strangers.
- Leave Quick Save off in public. Turn it on only for your own devices at home.
- Use a PIN when you receive files in a crowd.
- Read the prompt. The file name and the sender are right there.
- Keep the receive folder separate. Open files from it with the same care as any other download.
- Do not forward ports on your router. LocalSend is built for the local network. There is no reason to expose it to the internet.
12. Epilogue: The Demo
At the hackathon the projector laptop was Ilakkiya's. The video was already on it. Nothing was uploaded and nothing had been compressed. The six minutes ran clean, every line of code sharp on the big screen.
Their team did not win. The judges gave first prize to a team with a drone. But a faculty member walked over afterwards and asked, "How did you move that big file so fast? I saw nobody plug in anything."
Karthik showed her. Two taps, one Accept, a moving bar.
"No account?" she asked.
"No account. No cloud. It is open source, so anyone can read how it works."
She installed it on her laptop right there, beside the stage, and sent him a photo of the whole team. It arrived before she put her phone down.
Quick Reference Cheat-Sheet
| I want to… | Do this |
|---|---|
| Send a file to a nearby device | Open LocalSend, pick the file, tap the device |
| Send text or the clipboard | Use the Text or Clipboard option |
| Send a folder | Choose the folder, structure is kept |
| Stop strangers sending to me | Keep Quick Save off, set a PIN |
| Find why a device is missing | Check AP isolation, network profile, firewall, VPN |
| Open the firewall on Linux | Allow 53317 on TCP and UDP |
| Work with no Wi-Fi | Turn on a phone hotspot and join it from both devices |
| Reach a hidden device | Type its IP address, or mark it as a favourite |
| Script a send | localsend send --to <name or ip> <file> |
Key takeaways
- LocalSend moves files across the network you are already on. There is no account, no cloud and no internet needed.
- Devices find each other by a UDP multicast hello on
224.0.0.167, port53317, and talk over HTTPS with certificates they make themselves. - A transfer needs a human Accept. Nothing lands without it, so read the prompt.
- Most failures are network rules, such as AP isolation, a public network profile, a firewall or a VPN, and not bugs in the app.
- A phone hotspot is a private network that works when nothing else does.
- The protocol is open, so you can read it, trust it and build on it.
Self-hosting is not always about servers. Sometimes it is two laptops on one bench, finally talking to each other directly.