Table of Contents
If you're working from a MacBook and want to use your Windows PC as a remote development server, Tailscale makes it surprisingly easy. This guide will walk you through setting up Tailscale and accessing development services like SSH, Apache, or MySQL remotely over your private secure network.
Step 1: Install Tailscale
Install Tailscale on both your MacBook and PC:
Login on both devices using the same account (Google, Microsoft, GitHub, etc).
Step 2: Enable Services on the PC
Ensure your PC is running the services you need, such as:
- SSH Server: You can install OpenSSH Server via Windows Features or use a tool like Win32-OpenSSH.
- Apache or Localhost: Make sure the service is running on port 80 or 8080, and listening on all interfaces (0.0.0.0).
- MySQL/MariaDB: Set bind-address to
0.0.0.0
inmy.ini
and allow remote users.
Step 2.5: Verify Connection on Tailscale Dashboard
After logging into Tailscale on both your MacBook and PC, you can open the Tailscale admin dashboard to verify the connection.
There, you'll see a list of connected devices under your account, including:
- Hostname (e.g.,
your-macbook-device
andyour-pc-name
) - Tailscale IP address (e.g.,
100.x.x.x
) - Last seen online status
- Operating System
This dashboard confirms that both devices are in the same virtual network and can securely communicate with each other. You can copy the hostname or IP directly from here for use in SSH or MySQL connections.
Example: You can SSH to your PC from the MacBook using the Tailscale hostname shown here, like:
ssh your-user@your-pc-name.tailxxxx.ts.net
Step 3: Connect from Your MacBook
Once both devices are online in Tailscale, get the PC's Tailscale IP (e.g., 100.x.x.x
) or use the Tailscale hostname (e.g., my-pc.tailxxxx.ts.net
).
SSH Example:
ssh user@100.x.x.x
Preview Local Apache Site:
http://my-pc.tailxxxx.ts.net
MySQL Remote Access:
/opt/homebrew/opt/mysql-client/bin/mysql -u youruser -h my-pc.tailxxxx.ts.net -p
Security Tip
Make sure to allow only specific users in MySQL using youruser@'%'
or more securely, specific Tailscale hostnames.
Bonus: VS Code Remote SSH
Use the Remote - SSH extension in VS Code and add your PC's Tailscale address in the SSH config:
Host my-pc
HostName 100.x.x.x
User youruser
Then just connect from VS Code and start developing as if you're local.
Done!
You now have a secure, private development tunnel from your Mac to your PC without needing port forwarding or exposing anything to the internet. Thanks, Tailscale!