How to Quickly Setup HTTP File Server in Ubuntu 20.04

Last updated: July 3, 2020

There are quite a few ways to transfer files over home network. One of the easiest ways is to run a single python command in terminal.

Python contains a script that sets up simple http server. No need to install anything, and even no internet connection required.

1. Simply right-click on the folder that contains the files you want to transfer, then select ‘Open in Terminal

2. When terminal opens, run the single command:

python3 -m http.server

UPDATE: You can specify the listening port (e.g., 9900) if you get “Address already in use” error, by running command:

python3 -m http.server 9900

That’s it!

Now any device in the same network can access the http file server by going to (change 8000 if you specified another listening port): http://server_ip:8000

In addition, you may run python3 -m http.server & instead to start the http server in background, so the terminal window can be closed.

To check your IP address, go to Settings > Wi-Fi (or Network), click on the gear button after your connected network and check the IPv4 Address.


I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee:

5 responses to How to Quickly Setup HTTP File Server in Ubuntu 20.04

  1. I asked and they delivered!

    Congratulations, Panda Jim, now you are officially maintaining Audacious PPA.

    Thanks and keep up the excellent work!

  2. this is brilliant. Simple, efficient and elegant.

  3. Thanks much Ji, for such a simple explanation and useful post. Bryan

  4. Thanks Ji, exactly what I need. Your article pointed me to http.server. Thank you!