Make Sketch’s ‘local sharing’ work anywhere

Bohemian Coding recently released Sketch 3.4 which ships with lots of new features, the most exciting perhaps being ‘local sharing’. Local sharing allows you to quickly grab a link to preview live changes to your Sketch document which anyone on your network can view with a web browser.

There’s one limitation however and that’s that local sharing, as the name implies, only works on your local network. If you want to share your document with a friend or colleague who isn’t with you, Sketch isn’t going to help you out with that.

With a little command line doodling we can break out of our local network, and share our design on the internet for anyone to see.

Assuming you have Node preinstalled, open a terminal and type the commands next to the dollar signs below.

We’re using localtunnel to provide a connection to our computer that anyone on the internet can access.

Now, let’s enable local sharing on a Sketch document. Our browser will open pointing at a local address (normally starting with…).

Our document being served on a local address (Sketch default)
Our document served publicly using localtunnel

If we just replace the local hostname with the locatunnel url, we can now share this link with anyone and they’ll be able to watch live updates to the document while Sketch remains open.