How do I quickly share files across my network without setting up nginx?

Quick Linux Tip #48:

Try: python3 -m http.server 8080 --bind 0.0.0.0

Info: Python's built-in HTTP server serves the current working directory over HTTP. --bind 0.0.0.0 makes it reachable across all network interfaces on port 8080.

Examples:

  • $ cd /path/to/share && python3 -m http.server 8000  # Share specific directory
  • $ python3 -m http.server 8080 --directory /var/www/public  # Set dir without cd
  • $ npx http-server -p 8080  # Node.js alternative

Note: Never use in production. It lacks authentication, HTTPS, and multi-threading. Press Ctrl+C to stop. Check your firewall settings (ufw) if connection times out.




LinuxTeck.com
linuxteck@ubuntu:~$ python3 -m http.server 8080 --bind 0.0.0.0
Serving HTTP on 0.0.0.0 port 8080 (http://0.0.0.0:8080/) ...
192.168.1.105 - - [19/Aug/2026 10:15:02] "GET / HTTP/1.1" 200 -
192.168.1.105 - - [19/Aug/2026 10:15:05] "GET /backup.tar.gz HTTP/1.1" 200 -
^C
Keyboard interrupt received, exiting.
linuxteck@ubuntu:~$

PREVIOUS ARTICLE Quick Linux Tip #47: I deleted a file 5 minutes ago and there's no backup. Can I recover? NEXT ARTICLE Quick Linux Tip #49: How do I check if a config file differs between two servers?
About John Britto

John Britto Founder & Chief-Editor @LinuxTeck. A Computer Geek and Linux Intellectual having more than 20+ years of experience in Linux and Open Source technologies.

View all posts by John Britto →

Leave a Reply

Your email address will not be published.