Demo video: Watch on YouTube
A fast, private file-sharing server that runs on your local network. No internet, no cloud, no accounts. Upload, download, and share files between any devices on the same Wi-Fi in seconds.
- Fast LAN transfer — direct device-to-device, no internet needed
- Folder upload — upload entire folder trees, subdirectories preserved
- Mobile friendly — works in any browser on phones, tablets, and PCs
- Clipboard sync — share copied text between devices in real time
- QR codes — scan to connect instantly on mobile
- mDNS discovery — access via
http://lanvan.localon supported devices - Cross-platform — Windows, Linux, macOS, Android (Termux)
- No size limits — only limited by your storage space
| Requirement | Minimum | Recommended |
|---|---|---|
| Python | 3.9 | 3.11+ |
| Free disk space | 50 MB | 1 GB+ |
| Network | Local Wi-Fi or LAN | Wi-Fi 5 / Ethernet |
1. Clone the repository
git clone https://github.com/P7XCKD/lanvan.git
cd lanvan2. Create a virtual environment (strongly recommended)
python -m venv .venv3. Activate the virtual environment
# Windows (PowerShell)
.\.venv\Scripts\Activate.ps1
# Windows (Command Prompt)
.\.venv\Scripts\activate.bat
# macOS / Linux
source .venv/bin/activate4. Install dependencies
pip install -r requirements.txt5. Run the server
python run.pyOn Windows you can also use
py run.py— the launcher will auto-activate the venv if it exists.
The terminal will display the server address and a QR code:
[OK] Server running at:
Local: http://127.0.0.1
LAN: http://192.168.1.x
[INFO] Type 'close' | quit | shut | stop to stop. Or press Ctrl+C.
Open the LAN address in any browser on the same network to start transferring files.
1. Install Termux from F-Droid (recommended) or Google Play.
2. Open Termux and run the setup script
pkg update -y && pkg install -y git python
git clone https://github.com/P7XCKD/lanvan.git ~/lanvan
cd ~/lanvan/docs/termux && bash setup-android.sh3. Start the server
cd ~/lanvan
python run.pyTip: Run
termux-wake-lockbefore starting to prevent Android from killing the server.
On Android, use the direct IP address (http://192.168.x.x) — mDNS .local domains usually do not work on Android.
| Method | Action |
|---|---|
| Keyboard shortcut | Press Ctrl+C in the terminal |
| Console command | Type close, quit, shut, stop, or exit and press Enter |
- Make sure all devices are on the same Wi-Fi network.
- Open a browser on the other device and go to:
http://Lanvan.local(Windows/macOS/iOS — via mDNS)http://192.168.x.x(direct IP, works everywhere)- Scan the QR code shown in the terminal
- Start uploading or downloading files.
If other devices cannot connect (Windows host)
Run the included connectivity fixer as Administrator:
fix_guest_connectivity.bat# Start with HTTPS
python run.py https
# iOS compatibility mode (HTTP, optimised for Safari)
python run.py iosCertificates are auto-generated on first HTTPS run and stored in certs/.
iOS Safari requires either HTTP mode or a trusted certificate. Use
python run.py iosfor the best iOS experience.
To achieve the absolute maximum file transfer rates over your local network:
- Use HTTP Mode (Default): Run the server without
https(python run.py). This avoids cryptographic CPU overhead on older/low-power devices, boosting speeds by 20% to 50%. - Install
uvloop(Linux, macOS, and Termux):This replaces Python's default event loop with a C-based loop built for speed, accelerating FastAPI throughput by 2-4x.pip install uvloop
- Use a Wired Host Connection: Connect the host machine via Ethernet instead of Wi-Fi. This eliminates wireless packet collisions and frees up bandwidth for receiving clients.
- Use 5 GHz Wi-Fi: Ensure client devices are connected to the 5 GHz Wi-Fi band of your router rather than 2.4 GHz.
lanvan/
├── app/ # Main FastAPI Application Core
│ ├── core/ # Cryptography, validation, streaming merge, and atomic locks
│ ├── routers/ # API route controllers (files, pages, clipboard, etc.)
│ ├── ws_manager/ # WebSocket states for real-time clipboard & updates
│ ├── utils/ # Platform checks, memory limits, and Zeroconf mDNS
│ ├── static/ # CSS styles, images, and client JS modules
│ └── templates/ # Jinja2 layout components (base.html, index.html)
├── certs/ # SSL certificate config and generation scripts
├── data/ # Operational user files & db stores (uploads, clipboards)
├── docs/ # Platform setups and requirements manifests
│ └── termux/ # Automated setup assets for Android Termux
├── testing/ # Test workspace and unit diagnostic suites
├── run.py # Platform-aware server launcher entry point
└── qt.py # Core component reliability test runner
For detailed architecture descriptions, refer to the documentation in each folder:
- app/: Main FastAPI application core, routes, assets, and Jinja2 views.
- app/static/js/: Client-side progressive JavaScript architecture.
- app/templates/: Modular HTML views and skeleton inheritance files.
- certs/: SSL certificate creation configurations and local key generator scripts.
- docs/: Platform configuration checklists, troubleshooting, and setup scripts.
- docs/termux/: Automated setup assets and scripts for Android Termux.
- testing/: Sandboxed test workspace assets and isolated diagnostic tools.
- run.py: Entry launcher that detects platform targets, sets up venv, and boots uvicorn.
- qt.py: Standard automated component testing suite.
| Problem | Fix |
|---|---|
| Other devices cannot connect | Run fix_guest_connectivity.bat as Administrator (Windows) |
Lanvan.local does not resolve |
Use the direct IP address instead |
| Upload fails with 500 error | Check available disk space; see server console for details |
| Server won't stop on Ctrl+C | Type close in the terminal and press Enter |
| Clipboard sync not working on Android | Android restricts background clipboard access — use manual copy/paste |
| Package | Purpose |
|---|---|
fastapi |
Web framework |
uvicorn[standard] |
ASGI server |
jinja2 |
HTML templates |
python-multipart |
File upload handling |
cryptography |
AES encryption |
psutil |
System monitoring |
qrcode |
QR code generation |
zeroconf |
mDNS service discovery |
aiofiles |
Async file I/O |
pyperclip |
Clipboard operations (desktop) |
MIT License — see LICENSE for details.