the fast, reliable localhost tunneling solution

Running a Python web server

By Bjarni R. Einarsson 2011-01-16, 13:26


The following, although still valid, is largely pointless now that 0.4.x comes with its own built-in web server. If you want to put the contents of a folder temporarily on the web, this command will do the job:

$ /path/to/folder

Much easier!

Original content ...

Since you already have Python installed in order to run, you can try the built-in Python HTTP server for sharing files or just testing PageKite. At the command prompt, enter the folder you would like to make visible and run the following:

python -m SimpleHTTPServer 8000

This will create a web-server serving only the files in the current working directory, on port 8000.

Note that this server is very simple, slow and probably a security risk. It probably isn't wise to leave it running for long, but it can be quite useful for testing.

The HowTo contains links to other, more powerful servers.


  1. Tintenpatronen111 said on 2021-08-22, 17:26
    This does not tell me anything about running a python backend with pagekite. It only serves the python file as text

Leave a comment

( (Please leave these blank: )

We use Gravatar for commenter's photos. Get your own, it's free!