Use Tailscale to test websites and apps against a local server

Tailscale is one of my favorite new tools. We are using it everyday to help build and test Shareup. It’s rock solid and easy to use. Tailscale creates a network (a “tailnet”) between all the devices where it’s installed and where one is signed in. We have accounts for all three of us and our remote servers so we can connect to each other’s laptops, our remote servers, and even between our phones. It’s honestly so easy it almost feels impossible.

One of my favorite use cases is to connect from my mobile device back to my development iMac to test a website or app. Tailscale has a free plan which can do what I’m describing below, so don’t worry about this particular use case costing a lot.

I’ll use our website as an example project. I’ve started our development server on my iMac and it’s listening at localhost:3000.

After Tailscale is installed on both the phone and computer, I can grab the IP address of my computer using the app:

Screenshot of the Tailscale iOS app showing me the IP address of my Mac

All Tailscale IP addresses start with 100.x.x.x. The IP addresses are “stable” meaning that the address of a device in the “tailnet” will be the same as long as Tailscale remains installed on it. So you can remember or bookmark the IP address for use later and expect it to keep working. This is great for those of us who are used to our computer’s public IP address changing periodically.

Using the IP address, I can navigate directly to port :3000 and see the response from the development server on my iMac. It even works over a cellular connection 🤓

Screenshot of the Safari loading the development website from my Mac

We can also test our iOS app against an API server running on our Macs over cellular.

It’s really that easy. We really like Tailscale and recommend giving it a try.