LAN SHARE Download
Docs · Getting started

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.

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 fromThe lanshare command
macOS, DMG from lanshare.io/Applications/LAN Share.app/Contents/MacOS/lanshare-cli
Mac App StoreNo 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:

Terminal · macOS
$ 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.
ufw (Ubuntu's firewall, off by default)
$ sudo ufw allow 45821
firewalld
$ sudo firewall-cmd --permanent --add-port=45821/tcp --add-port=45821/udp
$ sudo firewall-cmd --reload

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#

  1. 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.
  2. 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.
  3. Send. Drop files or folders on the host, or right-click them in Finder or Files and choose LAN Share → Send to.
  4. 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:

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"
Output
→ Office iMac (192.168.1.24): waiting for approval…
✓ report.pdf → Office iMac: 2.4 MiB (1 file, 61.2 MiB/s)
Tip

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 --key only 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 --yes accepts 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:

Terminal
$ lanshare identity
Output
UOII-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 with require_encryption.

Where LAN Share keeps things#

WhatmacOSUbuntuWindows
Settings, hosts, groups~/Library/Application Support/lan-share/config.json~/.config/lan-share/config.json%APPDATA%\lan-share\config.json
Received itemsDownloads/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].