Deploy Tailscale VPN on a Mac mini

Deploy Tailscale VPN on a Mac mini

Connect to your Mac mini through a private, encrypted network in 4 short setup steps, then connect with SSH using its Tailscale IP address. You do not open anything on the public internet. It takes about 10 minutes.

You need: an email account and your Mac mini SSH login (user name and IP address from your welcome email). Works from macOS and Windows computers.

Keep your Tailscale auth key private, like a password. Never post it in a ticket, chat or email.

Step 1: Register a Tailscale account

  1. Go to tailscale.com and select Get Started.
  2. Sign in with your Google, Microsoft, Apple or GitHub account. Tailscale has no password of its own.

Using it for business? Sign up with your company email. The free Personal plan is for non-commercial use only.

Step 2: Create a Tailscale auth key

Tailscale calls it an auth key. Some people call it the API key.

  1. Open console.tailscale.com/admin/settings/keys.
  2. Select Generate auth key.
  3. Set a short expiry, such as 1 day. Leave Reusable and Ephemeral off.
  4. Generate the key and copy it. It starts with tskey-auth-. Tailscale shows it only once.

Do not pick an API access token (it starts with tskey-api-). It will not work here.

Step 3: SSH into the Mac mini

Open a terminal on your computer and run this. Replace admin and x.x.x.x with the user name and IP address of your Mac mini.

ssh -p 2222 -t admin@x.x.x.x
  • macOS: open Terminal (Applications > Utilities) and run it.
  • Windows 10/11: open PowerShell or Windows Terminal. OpenSSH is built in.

Enter the Mac mini password when asked. When you see a prompt that ends with %, you are in.

Step 4: Run the one-line install command

Paste this one line into the Mac mini and press Enter:

curl -fsSL https://raw.githubusercontent.com/marslert/macmini-tailscale-setup/v1.0.0/tailscale-mac-setup.sh -o /tmp/ts.sh && bash /tmp/ts.sh

You only do three things:

  1. Password: enter the Mac mini password when it asks.
  2. Homebrew: if it asks Install Homebrew now?, type y and press Enter. This installs a standard Mac tool that Tailscale needs. It can take a few minutes.
  3. Auth key: when it asks, paste the key from Step 2 and press Enter. You will see * as you paste.

When the script finishes, your Mac mini is connected to your Tailscale network. Next, find its Tailscale IP address and connect to it.

Connect to your Mac mini over Tailscale

A. Get the Tailscale IP address of the Mac mini

Every device on Tailscale gets a private address that starts with 100.. Use either method:

  • From the Mac mini:in the same SSH window, run:
    tailscale ip -4
    It prints one address, for example 100.101.102.103. If you see command not found, run /opt/homebrew/bin/tailscale ip -4 instead.
  • From the Tailscale admin console: open console.tailscale.com/admin/machines. Find your Mac mini in the list and copy the address that starts with 100..

B. Connect your own computer to Tailscale

  1. Download Tailscale for your computer from tailscale.com/download (macOS or Windows) and install it.
  2. Open Tailscale and sign in with the same account you used in Step 1.
  3. Check that Tailscale shows Connected and that your Mac mini is in the device list.

C. Connect to the Mac mini with SSH

Open Terminal (macOS) or PowerShell (Windows) and run this. Replace admin with your Mac mini user name and 100.101.102.103 with the Tailscale IP address from part A:

ssh -p8288 admin@100.101.102.103

Type yes the first time to accept the host key, then enter your Mac mini password. A prompt that ends with % means you are in.

No -p 2222 is needed here. Tailscale connects to the Mac mini directly and does not use the public SSH port. If the connection times out, check that Tailscale shows Connected on your computer.

Need help? Open a ticket with our Technical Support team and tell us which step you are on. Never include your auth key.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.