v0.1.1

Share files over your local network.

No cloud. No accounts. One command, a QR code, and any device with a browser can download.

npm install -g @esmeraldoinciso/local-share

Quick start

  1. Share a folder.
    local-share ./photos
  2. Scan the QR with your phone camera — or open the printed URL. Both devices need the same Wi-Fi.
  3. Hit Download all in the browser. Single files get a Save button; folders download as ZIP.

Sharing one file works the same: local-share photo.jpg

Options

FlagWhat it does
--port <n>Listen port (default 8787; auto-bumps unless explicit)
--password [value]Lock the share; prompts hidden when no value is given
--expires <10m|1h|…>Auto-shutdown lifetime (default 30m)
--no-qrHide the QR code
--no-browserDon't auto-open the browser on the host
--verboseRequest and server logging (never passwords)

Canonical reference: README on npm · local-share --help

Password & expiry

local-share ./photos --password
local-share ./photos --expires 1h

Locked shares show a password form; file endpoints return 401 without a session. Sessions live in memory only and die when the server stops — manually or at expiry.

Security

  • Transfers stay on your LAN — files are never uploaded anywhere.
  • Path traversal and symlink escapes are blocked and tested.
  • Passwords are scrypt hashes; sessions are random 256-bit IDs over HttpOnly cookies.
  • No telemetry, no accounts, no database.

FAQ

Phone can't connect?

Same Wi-Fi? Server still running? Correct LAN IP (not 127.0.0.1)? PC firewall allowing Node.js? Router guest isolation off?

QR won't scan?

Type the printed URL manually.

Port busy?

Pick another with --port 8790, or omit --port to auto-increment.

Password in a script?

Pass --password <value> — no terminal needed.

Path has spaces, or I want several folders?

Quote it: local-share "C:\My Photos\2024". One path per command — to share several folders at once, share their parent folder, or run local-share once per folder (each picks its own port).