Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Share Local Files Over The Web With ngrok

One of the more useful hacks I know is how to share a folder on my computer so folks can grab files from it from a web browser.

I use a command line application called ngrok to provide the functionality. The command I use to run it on my mac is:

Code

ngrok http -bind-tls=true "file://$(pwd)"

The result is a secure URL where the outside world can browse whatever directory on my computer the command was run in.

Code

ngrok http -bind-tls=true "file:///C:\Users\alan\Public Folder"

Password Protection

You can also add password protection by adding an argument:

Code

-auth="username:password"

For example:

Code

ngrok http -auth="alan:mushroomcat" -bind-tls=true "file://$(pwd)"

The ngrok Software

Here's the ngrok homepage for details on the app. This is the installation page if you want to jump right in.

Happy Sharing,

-a

P.S. If you'd like more details, this post has an addendum