Share Local Files Over The Web With ngrok

March, 2022

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:

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.

Windows Version

The Windows command is basically the same. The paths just look a little different. This version is hard coded to a specific directory since I don't know how to dynamically point to the current directory on Windows yet. I'll update the code when I figure that out.

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

Password Protection

You can also add password protection by adding an argument:


For example:

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,


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