At times I get frustrated because I can't easily share files on my local network without jumping through several hoops, like setting up Nextcloud, Samba, sending the file over Internet, or similar. A quick and easy way to share some files without any authentication is setting up a super simple Python HTTP server. Python is most likely already installed on your GNU/Linux distribution.
Start a Simple Python HTTP Server for Sharing Files Locally on Your Network
- Open a terminal window.
- Navigate to the directory you want to share.
- Start the Python HTTP server:
python3 -m http.server - Visit http://<your_ip_address>:8000 in a web browser from another PC/device to find the files shared. Use ifconfig or "ip address" in your command line on the computer you run the HTTP server on to find your IP address.
- Download the files you want using the web browser.
- Back in the terminal, press Ctrl+c to shut down the server.
You may have to open up port 8000 for TCP connections on your firewall for other computers to be able to access the files you're sharing.