Remote url for localhost server

There is a nice tool called ngrok. It allows to bind the URL for your localhost server!

For example, you’ve launched a django development server on you computer:

python runserver

and this project can be accessed by remote URL.

What for?

At least i can imagine such tasks:

  • demonstrate project to customer
  • check your site integration with payment system. For example paypal, where for receiving IPN messages you need a working site URL, even for sandbox


  • Download ngrok from here
  • Unpack downloaded archive
  • Start django development server (by default on 8000 port)
  • Start ngrok:
    ./ngrok 8000
  • In console you’ll see something like this:
    Tunnel Status                 online
    Version                       1.6/1.6
    Forwarding           ->
    Forwarding           ->
    Web Interface       
    # Conn                        0
    Avg Conn Time                 0.00ms

Now your server is bind to


It is not very useful, that on every start ngrok will generate new url like ********

But we can assign custom subdomain and project can be accessed by the same url.

To do it we need:

  • register
  • take auth token
  • let ngrok know your auth token (it is needed to do only once):

    ./ngrok -authtoken your_auth_token 8000
  • set your custom subdomain like this:

    ./ngrok  -subdomain=mysupersite 8000

After that our local server will be shown at