A handy http server to enable public http access on any folder within a few seconds.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


handyhttpd – A Handy HTTP Server

handyhttpd, as its name implies, is a handy http server to enable public http access on any folder with a simple command. It’s designed for simplicity.



handyhttpd is written in go. Install latest go before start.

Use following command to get and build it with go.

go get github.com/huandu/handyhttpd
go install github.com/huandu/handyhttpd

handyhttpd will be built and installed to $GOPATH/bin/handyhttpd.

Basic Usage

Run it in any dir to get public http access.

[user@server /your/dir/foo]$ handyhttpd

handyhttpd listens port 9696 by default. This dir can be accessed by url http://localhost:9696/foo.

If you need to add more dir to handyhttpd, just go to that dir and run exactly the same command.

[user@server /your/dir/foo]$ cd /your/dir/bar
[user@server /your/dir/bar]$ handyhttpd

Maybe the dir name “bar” doesn’t sound cool, use --alias option to rename it.

[user@server /your/dir/bar]$ handyhttpd --alias=soundy_bar

Once you don’t need to provide http service any more, type handyhttpd --quit.

If port 9696 is not your favorate, you can specify a port by --port option on handyhttpd first start. Just notice that handyhttpd cannot change port after it’s up. Restart it to change port.

Use --help to explore all handyhttpd options and have fun.

Comparisions With python -m SimpleHTTPServer

In short, handyhttpd is a bit stronger and easier than python -m SimpleHTTPServer.

handyhttpd implements all python -m SimpleHTTPServer features.

In addition, it can

  • serve more than one dir on a single port.
  • run only one server instance at once – much easy to manage. You can start handyhttpd over one ssh connection and modify/quit it over another. There is no need for you to use ps and kill with handyhttpd.