Get started
WireGuard is a registered trademark of Jason A. Donenfeld.
© 2024 Tailscale Inc. All rights reserved. Tailscale is a registered trademark of Tailscale Inc.
Go back

Tailscale actions for iOS and macOS Shortcuts

January 25 2023
Mihai Parparita
Mihai Parparita

End-user programming and automation has a long history on Apple’s platforms. It began with BASIC being included in the ROM of the Apple II, continued in the 1980s with HyperCard, and was further expanded with AppleScript in the ’90s and Automator in the 2000s. The modern successor to those systems is Shortcuts, which was launched in iOS 13 and macOS 12. There are a lot of creative uses for Shortcuts, whether it’s quickly detecting allergens, making the Fediverse easier to use, or automating your way into a new job.

If you were trying to automate Tailscale functionality, you could always use the Tailscale CLI with the “Run Shell Script” action — but it would only work on macOS, and would not be particularly user friendly. Starting with Tailscale v1.36 (and in no small part thanks to user feedback!) Tailscale actions can be directly triggered and automated with Shortcuts on iOS and macOS. We’ve added actions for managing the connection state, using exit nodes, and switching between profiles.

See the documentation for more details, or read on for some ideas for how you might use Tailscale to (automatically!) make your life easier.

Tailscale: don’t leave home without it

On iOS, shortcuts can be triggered by automations, which include location-based triggers. You can set up an automation whenever you’ve left your house, ensuring that you always have control of how your traffic is routed:

Shortcuts automation to turn on Tailscale when leaving an address

As an alternative, you can use a time-based automation to trigger this, or one based on other factors, such as joining a specific Wi-Fi network or your battery level.

Switch between accounts

If you find yourself frequently switching between two tailnets, you may find the repeated mousing around the submenu tiring. A shortcut can instead turn this into one action:

Shortcut to switch between personal and work accounts

Once that’s set up, you can bind it to a keyboard shortcut or launch it from Spotlight for even faster fast user switching.

Toggle features from the home screen

On iOS, shortcuts can be added to the home screen for easy access, complete with custom icons. This allows you to have one-tap access to your preferred Tailscale workflows, such as using an exit node.

Shortcut to toggle the use of an exit node Tailscale shortcuts as home screen icon

Announce status

You can use the “Get Status” action to get a spoken summary of Tailcale announced via Siri.

Shortcut to speak the current Tailscale status Siri output of the shortcut to speak the current Tailscale status

Give it a try

We’re sure there are a lot more creative uses, and we’re looking forward to seeing how Tailscale plays in this new ecosystem – read the documentation to get started setting up shortcuts. Let us know what you automated with shortcuts for Tailscale: mention @Tailscale on Twitter and on Mastodon, or post on /r/tailscale on Reddit.

Subscribe to Tailscale’s blog

We have a deep commitment to keeping your data safe.

Too much email?RSSX

Try Tailscale for free

Schedule a demo
Contact sales
cta phone
Hugging Face