Skip to main content

LANserve

PyPI version Python versions Downloads License

A lightweight local file server with a clean browser UI — browse, upload, and delete files over your WiFi network from any device.

No dependencies. No config. Just run it.


Install

pip install lanserve

Quick start

lanserve

That's it. Open the printed URL in any browser on your network:

 LANserve running!
   Local:   http://localhost:8080
   Network: http://192.168.x.x:8080
   Serving: /your/current/directory

On mobile, open the Network URL. On desktop, use either.


Features

  • Browse your file system from any device on the same network
  • Upload files via drag-and-drop or file picker, with a real-time progress bar
  • Delete files directly from the UI
  • Choose upload folder from a dropdown
  • File type icons and human-readable file sizes
  • Threaded — large uploads don't freeze browsing
  • Optional access code — lock uploads/deletes behind a shared code, browsing stays open
  • Zero external dependencies — Python 3.8+ standard library only

Usage

lanserve [options]

Options:
  --port PORT, -p PORT    Port to listen on        (default: 8080)
  --dir DIR,  -d DIR      Directory to serve        (default: current directory)
  --host HOST             Address to bind to        (default: 0.0.0.0)
  --code CODE, -c CODE    Access code for uploads/deletes (default: none, disabled)
  --version, -v           Show version and exit

Examples

# Serve a specific folder
lanserve --dir ~/Downloads

# Use a different port
lanserve --port 9000

# Serve Downloads on port 9000
lanserve --dir ~/Downloads --port 9000

# Require a code before anyone can upload or delete
lanserve --code mySecret123

Access codes

By default, anyone on the network can browse, upload, and delete — no login required.

If you want to lock down uploads and deletes while keeping browsing open, start LANserve with --code:

lanserve --code mySecret123
  • Browsing files still works for anyone on the network, no code needed.
  • The first upload or delete from a device will prompt for the code.
  • Once entered correctly, that device gets a signed, HttpOnly session cookie (valid for the rest of the session) so it won't be asked again.
  • The code and any active sessions reset every time you restart the server.

This isn't meant to be strong authentication for hostile networks — it's a lightweight gate against "oops, someone accidentally deleted my files" on a shared WiFi.


Run without installing

git clone https://github.com/Dev-syphax/lanserve.git
cd lanserve
python -m lanserve

Security

LANserve is designed for trusted local networks only (home, office LAN, dev WiFi).

  • Without --code, there is no authentication — anyone on the network can browse, upload, and delete files.
  • With --code, uploads and deletes require the code; browsing is still open to everyone.
  • DELETE requests are path-traversal protected — files outside the served directory cannot be deleted.
  • Do not expose this server to the public internet.

Requirements

  • Python 3.8 or newer
  • No dependencies (bundled with Python standard library)

Contributing

See CONTRIBUTING.md.


License

MIT

Metadata

Release files for lanserve 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lanserve 1.3.1
File Size Uploaded
lanserve-1.3.1.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lanserve 1.3.1
File Interpreter ABI Platform
lanserve-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 32.0 kB

Release files / lanserve-1.3.1.tar.gz

Download URL lanserve-1.3.1.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
171fb666456879c074d8b82bf029b43e7f475b20fb8b6122c967dfa3fea600a0
BLAKE2b-256 checksum
How to use checksums
c3c3d5131447489d8c77bb8a8b140c8b4230f8fee206bccf414e9c7f8dbeeceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / lanserve-1.3.1-py3-none-any.whl

Download URL lanserve-1.3.1-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
094dbbb2fc73a20ad4cdea5d1658d0917a11ad876de31faf65fecc5d527b5104
BLAKE2b-256 checksum
How to use checksums
ab8768add108edd258969d8c44d8a0fe0772b9820a22345f6d14c9ce10bf3388
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release 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