LAN Share docs
Everything beyond the buttons: how transfers work, how to let an AI assistant send files for you, every command and flag, and how organisations automate and audit LAN Share.
lanshare command and flag, JSON output and exit codes for scripts.
03Automation and local APIHot folders, a command on arrival and an HTTP API on 127.0.0.1, with curl examples.
04For organisationspolicy.json field by field, audit log, syslog, signed webhooks and the self-hosted Hub.
05Updates and editionsDirect downloads and store versions, how update checks work and what they send.
?SupportCommon problems, firewall ports, licence keys and how to reach us.
Install#
LAN Share runs on macOS 15 or later; Ubuntu 22.04+ and Debian 12+ (GNOME, KDE and others; X11 and Wayland); and Windows 10 and 11 (64-bit). Phones and tablets need no app: they use a page in the browser. Installers, checksums and step-by-step guides are on the download page.
Every version from lanshare.io comes with the lanshare command: the same program the apps use underneath, for the terminal, scripts and the MCP server. Where it is:
| Installed from | The lanshare command |
|---|---|
| macOS, DMG from lanshare.io | /Applications/LAN Share.app/Contents/MacOS/lanshare-cli |
| Mac App Store | No terminal command (the App Store sandbox). The app has a built-in MCP server instead, see MCP modes and editions. |
| Ubuntu / Debian, .deb | /usr/bin/lanshare (already on your PATH) |
| Windows, zip (no installer yet) | lanshare.exe in the folder you unpacked, for example %LOCALAPPDATA%\Programs\LAN Share\lanshare.exe; add that folder to your PATH to type just lanshare |
On a Mac, put the command on your PATH once, so lanshare works in any terminal:
$ mkdir -p ~/.local/bin $ ln -sf "/Applications/LAN Share.app/Contents/MacOS/lanshare-cli" ~/.local/bin/lanshare $ lanshare --version
If ~/.local/bin is not on your PATH yet, add export PATH="$HOME/.local/bin:$PATH" to ~/.zshrc.
Network and ports#
Both computers must be on the same network (or reach each other over a VPN). LAN Share uses one port, 45821:
- TCP 45821 carries the transfers.
- UDP 45821 is for finding other computers (a broadcast on each network). Without it you can still add a computer by its address.
$ sudo ufw allow 45821$ sudo firewall-cmd --permanent --add-port=45821/tcp --add-port=45821/udp $ sudo firewall-cmd --reload
When macOS asks whether LAN Share may accept incoming connections, choose Allow. If you clicked Deny: System Settings → Network → Firewall → Options, set LAN Share to Allow incoming connections.
When Windows Defender Firewall asks the first time, allow LAN Share on Private networks. Missed it? Add the rules in PowerShell as administrator (the commands are in the Windows install guide). On a network marked Public, Windows blocks them: mark your home or office network as Private.
You can change the port (Settings, or lanshare config port 46000, then restart LAN Share). Use the same port on every computer, or add the other computer as address:port.
Your first transfer#
- Start LAN Share on both computers. It lives in the menu bar (macOS) or the tray / top bar (Windows, Ubuntu) and receives in the background.
- Find the other computer. Open Hosts: computers running LAN Share on the network show up there; save the one you want. Or add it by IP address with + Host.
- Send. Drop files or folders on the host, or right-click them in Finder or Files and choose LAN Share → Send to.
- The other side accepts. The receiver sees who is sending, what and how big, plus your note, and clicks Accept or Decline (also right in the notification). No answer within about 3 minutes counts as declined.
Received items go to Downloads/LAN Share unless you choose another folder; nothing is overwritten (a name clash gives report (1).pdf). The same from a terminal:
$ lanshare discover --add # find computers on the network and save them $ lanshare hosts list # saved hosts, and which are online $ lanshare send "Office iMac" ~/Desktop/report.pdf -m "Final version"
→ Office iMac (192.168.1.24): waiting for approval… ✓ report.pdf → Office iMac: 2.4 MiB (1 file, 61.2 MiB/s)
A transfer that was cut off continues where it stopped when you send the same items again. Every file is checked with SHA-256 on arrival; a file that fails the check is not kept.
Accepting transfers#
By default every transfer is asked about. Three ways to change that, from the most to the least careful:
- Pairing.
lanshare pair <host>(or Pair in the host panel) shows a 6-digit PIN on both screens; when the other person confirms the same PIN, both computers trust each other by key and transfers between them are accepted without asking. - Trusted senders. Always accept in the question, or
lanshare trust add <host>, accepts transfers from one computer without asking. With--keyonly that exact key is trusted; without it, the saved host's key (or the first encrypted one) is remembered. - Accept everything (servers only).
lanshare receive --yesaccepts every offer on that terminal. Use it only on a network you trust: anyone on it can then write files to that folder.
Text (a link, a snippet, up to 1 MiB) arrives the same way and is shown in LAN Share instead of being saved as a file.
Encryption and fingerprints#
Connections between computers are encrypted with the Noise protocol (X25519 key exchange, ChaCha20-Poly1305). Each computer has its own key, made on the first start. Its fingerprint is a short form of that key, such as XYHX-HOSQ-JBXO-QLAF:
$ lanshare identityUOII-B7MX-GCIA-2VZ4 192.168.1.31 en0 studio-mac.local
- The first encrypted contact remembers the other computer's key with its saved host. Compare fingerprints once (read them out, or look at both screens) if you want to be sure who you are talking to.
- If the key changes later, sending to it is refused and the app warns you. That is expected after LAN Share was reinstalled there. Once you have checked it is the same computer:
lanshare hosts forget-key <host>(or Forget key in the host panel), and the next contact remembers the new key. - Trust is tied to keys, not IP addresses: a different machine that takes over an address does not inherit the trust.
- Encryption can be turned off only for compatibility with very old versions (
lanshare config encryption off); organisations can forbid that withrequire_encryption.
Where LAN Share keeps things#
| What | macOS | Ubuntu | Windows |
|---|---|---|---|
| Settings, hosts, groups | ~/Library/Application Support/lan-share/config.json | ~/.config/lan-share/config.json | %APPDATA%\lan-share\config.json |
| Received items | Downloads/LAN Share in your home folder, unless you choose another (lanshare config receive-dir), also per sender (lanshare config receive-dir-for) | ||
The app, the tray icon, the file-manager menus and the lanshare command all read the same settings file, so a host saved in one place shows up everywhere. lanshare status prints where the file is on your computer. The Mac App Store version keeps its own settings inside its container (editions).
Something missing or wrong? Write to [email protected].