Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

LocalShare

A simple desktop GUI app (share.py) that turns any folder on your computer into a temporary HTTP file server, so other devices on your local network (phone, laptop, tablet) can browse and download files from it — no cloud, no account, no internet required.

Repo: https://github.com/meetsalmvn/LocalShare

Features

  • Pick any folder and share it over your local Wi-Fi/LAN
  • Auto-detects your machine's local IP address
  • Custom port selection with validation
  • Start/Stop the server anytime — GUI stays responsive
  • One-click "Open in Browser" button
  • Binds only to your LAN interface, not the whole internet

⚠️ Security note: Anyone who can reach the shown address on your network can view and download files in the shared folder. Only run this on networks you trust (e.g. your home Wi-Fi), and stop the server when you're done.


Requirements

LocalShare needs only two things to run:

Requirement Why
Python 3.8+ The app is written in Python
Tkinter Powers the GUI (bundled with Python on Windows/macOS, but a separate package on most Linux distros and Termux)

No third-party pip packages are required — the app only uses Python's standard library (tkinter, http.server, socket, threading, webbrowser).

You'll also need git (or just download the ZIP from GitHub) to get the code.


Installation

🪟 Windows 10 / 11

  1. Install Python from python.org/downloads.
    • During setup, check "Add python.exe to PATH".
    • Leave "tcl/tk and IDLE" checked (it's checked by default) — this installs Tkinter for you.
  2. Open Command Prompt or PowerShell and verify:
    python --version
    python -m tkinter
    A small test window should pop up if Tkinter is installed correctly.
  3. Clone or download the repo:
    git clone https://github.com/meetsalmvn/LocalShare.git
    cd LocalShare
  4. Run the app:
    python share.py

🍎 macOS

  1. Install Python 3 using the official installer from python.org/downloads — this bundles Tcl/Tk (Tkinter) already.
    • (Homebrew alternative: brew install python-tk if you use a Homebrew Python and get a Tkinter error.)
  2. Verify:
    python3 --version
    python3 -m tkinter
  3. Clone the repo:
    git clone https://github.com/meetsalmvn/LocalShare.git
    cd LocalShare
  4. Run:
    python3 share.py

🐧 Linux (Debian / Ubuntu / Mint / Pop!_OS)

sudo apt update
sudo apt install python3 python3-tk git -y
git clone https://github.com/meetsalmvn/LocalShare.git
cd LocalShare
python3 share.py

🐧 Linux (Fedora)

sudo dnf install python3 python3-tkinter git -y
git clone https://github.com/meetsalmvn/LocalShare.git
cd LocalShare
python3 share.py

🐧 Linux (Arch / Manjaro)

sudo pacman -S python tk git --needed
git clone https://github.com/meetsalmvn/LocalShare.git
cd LocalShare
python3 share.py

🪟🐧 WSL2 (Windows Subsystem for Linux — Ubuntu)

sudo apt update
sudo apt install python3 python3-tk git -y
git clone https://github.com/meetsalmvn/LocalShare.git
cd LocalShare
python3 share.py

Display:

  • Windows 11: WSLg is built in — the GUI window just appears, no extra setup needed.
  • Windows 10: You need a Windows X server such as VcXsrv. Start it, then in WSL run:
    export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
    before launching share.py.

Reaching the share from other devices on your home network: WSL2 sits behind Windows' own virtual network, so the LAN IP the app shows (something like 172.x.x.x) is only reachable from Windows itself, not from your phone or other PCs. To expose it, forward the port from Windows to WSL2 (run in an elevated PowerShell on Windows, after the server is running):

netsh interface portproxy add v4tov4 listenport=8000 listenaddress=0.0.0.0 connectport=8000 connectaddress=<WSL2-IP-shown-in-app>

Then also allow the port through Windows Firewall, and share your Windows machine's own LAN IP (not the WSL2 one) with other devices.

📱 Android (Termux)

Tkinter doesn't have a native display on Android, so running LocalShare's GUI in Termux requires Termux:X11.

  1. Install Termux from F-Droid (not the Play Store version).
  2. Install Termux:X11 from the official GitHub Releases. Download termux-x11-universal-debug.apk and install it.
  3. In Termux, install the required packages:
    pkg update && pkg upgrade -y
    pkg install x11-repo python git -y
    pkg install termux-x11-nightly -y
    If termux-x11-nightly isn't available, download the .deb package manually from the official Releases and install it with:
    apt install ./<package-name>.deb
  4. Install Ubuntu:
    pkg install proot-distro -y
    proot-distro install ubuntu
  5. Start Termux:X11 from Termux:
    termux-x11 :1
    Then open the Termux:X11 app.
  6. Open a new Termux session and enter Ubuntu:
    proot-distro login ubuntu --shared-tmp
    export DISPLAY=:1
    apt update && apt install python3 python3-tk git -y
  7. Clone and run:
    git clone https://github.com/meetsalmvn/LocalShare.git
    cd LocalShare
    python3 share.py

Note: If termux-x11-nightly cannot be installed, the Termux:X11 APK alone is not enough — the Termux companion package is also required.

Simpler alternative for Termux: if you just want to share a folder from your phone and don't need the GUI, skip Tkinter entirely and use Python's built-in server:

pkg install python -y
cd /path/to/folder
python3 -m http.server 8000

Then visit http://<phone-IP>:8000 from another device on the same Wi-Fi.


Usage

  1. Launch the app: python3 share.py (or python share.py on Windows).
  2. Click Select and choose the folder you want to share.
  3. (Optional) Change the Port — default is 8000.
  4. Click Start Server.
  5. Copy the address shown (e.g. http://192.168.1.42:8000/) and open it on another device connected to the same Wi-Fi/network — or click Open in Browser to test it locally.
  6. Click Stop Server when you're done sharing.

Troubleshooting

Problem Fix
ModuleNotFoundError: No module named 'tkinter' Install the Tkinter package for your OS (see platform sections above).
"Could not determine your local network IP address" Make sure you're connected to Wi-Fi/Ethernet. The app can't detect an IP with no active network.
"Address already in use" when starting Another program is using that port. Pick a different port (e.g. 8080).
Other devices can't open the link Check they're on the same network, and that your OS firewall allows inbound connections on the chosen port. On WSL2, see the port-forwarding note above.
GUI window doesn't appear on WSL2/Termux Make sure your X server (WSLg, VcXsrv, or Termux:X11) is running and DISPLAY is set correctly.

About

Share folders over your local network with a simple Python GUI — no cloud, no account, and no internet required.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages