Skip to main content

localsendd

License Python Protocol

[!NOTE] This is NOT a gui. it don't got buttons. If ya want to see it in action, check out israshell.
If you js wanna use localsend, get the official LocalSend app or some other tui.
This module aims for scripts, widgets, and whatever else program you'd wanna control localsend from

A LocalSend peer that runs in the background and talks JSON over a unix socket. One process holds the protocol state, and anything local just connects and asks for things instead of reimplementing multicast discovery and mTLS itself. Socket's 0600 btw, so that's the whole auth story - nothing to configure, nothing to leak.

Full v2.2: multicast discovery with http subnet scan fallback, mutual-TLS HTTPS mode, SHA-256 verification, PIN gating, sanitized file names so a peer can't write outside download_dir or clobber something that's already there.

Install

uv tool install localsendd

or pipx install localsendd

Needs Python 3.11+ and openssl on PATH for HTTPS mode.

Run

Add to your autostart / execute:

localsendd &

then from anywhere:

localsendctl devices --scan
localsendctl send ~/Pictures/brian.png --to "Gassy Mario" --wait
localsendctl watch

Something incoming shows up in localsendctl status; localsendctl accept takes it and localsendctl reject turns it down. Only one transfer moves at a time either direction though - start a second and you just get busy back, no queue.

Running it supervised

localsendd is a foreground process that logs to stdout, so whatever starts it just captures the log. Point your init system at localsendd and das it

Pass --no-log-time if your logger already stamps lines (svlogd, journald) or you'll get double timestamps.........

Configuration

defaults are optional, set them in $XDG_CONFIG_HOME/localsendd/config.toml:

alias = "workstation"
device_type = "desktop"      # mobile | desktop | web | headless | server
port = 53317
download_dir = "~/Downloads/LocalSend"
encryption = true            # HTTPS
pin = "1234"
unattended = false           # see "Headless behavior"

CLI flags win over everything, then LOCALSEND_ALIAS, LOCALSEND_PIN and LOCALSENDD_SOCKET, then this file. Use the file for pin if you can bc --pin is visible to every local user in ps. --config PATH points the daemon at a different file, and config.example.toml has every key with comments. alias, device_type, pin, encryption and visibility can be changed at runtime over the socket without a restart, the rest need one. Either way the file itself never hot reloads, and runtime changes aren't written back to it.

Disabling

set_discoverable false (or localsendctl visible off) keeps the daemon up and the port bound, but kills multicast announces, stops replying to other peers' announces, and 404s/403s /info, /register, prepare-upload, prepare-download, and download. Sending out still works.

Headless behavior

Accepting a transfer needs a human to click accept. With no control client attached, the daemon stays discoverable and answers /info, but declines incoming transfers immediately instead of parking the sender on a confirmation timeout nobody's there to answer. Sending out still works.

Setting unattended = true auto accepts into download_dir without confirmation. Now, anything on your network can send files to ya disk, so use a pin unless you enjoy surprises 👀.

Documentation

DOCS.md has the full control socket protocol reference, the complete configuration table, and a runnable Python client example.

Development

PYTHONPATH=src:tests python -m unittest discover -s tests -t tests

No dependencies beyond the standard library. Each test spins up a real daemon behind a real HTTP server on an ephemeral port, not mocks. Multicast and the subnet scan are stubbed out so none of it touches the actual network.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

localsendd-0.1.0.tar.gz (48.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

localsendd-0.1.0-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file localsendd-0.1.0.tar.gz.

File metadata

  • Download URL: localsendd-0.1.0.tar.gz
  • Upload date:
  • Size: 48.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for localsendd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 06687b0f8011b3434ecb423c125f0642327c880bf063ac9c0af537820ef24e84
MD5 4f9eead399c170f78f26d7b42cc03cc0
BLAKE2b-256 58f3ecfcaff863357a8d426c0494fbcf56eb820e70d58a2522e886a204f46beb

See more details on using hashes here.

Provenance

The following attestation bundles were made for localsendd-0.1.0.tar.gz:

Publisher: release.yml on hireri/localsendd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file localsendd-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: localsendd-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for localsendd-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bad4b474e67eb9a6b0b56ad4044df3309e6d0a2800d409f144c6fc39dc1d3407
MD5 49b839dcae8a9839d870cfb3716e2253
BLAKE2b-256 bfd86219ce5ff9253ec58366d5704a9220da7dcf0d3321aa0d09233955ca5ece

See more details on using hashes here.

Provenance

The following attestation bundles were made for localsendd-0.1.0-py3-none-any.whl:

Publisher: release.yml on hireri/localsendd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page