Using Tailscale with an OrbStack VM on macOS
Recorded: May 28, 2026, 6 p.m.
| Original | Summarized |
GitHub - highpost/tailscale-macos-vm: Using Tailscale with an OrbStack VM on macOS · GitHub Skip to content Navigation Menu Toggle navigation
Sign in
Appearance settings PlatformAI CODE CREATIONGitHub CopilotWrite better code with AIGitHub SparkBuild and deploy intelligent appsGitHub ModelsManage and compare promptsMCP RegistryNewIntegrate external toolsDEVELOPER WORKFLOWSActionsAutomate any workflowCodespacesInstant dev environmentsIssuesPlan and track workCode ReviewManage code changesAPPLICATION SECURITYGitHub Advanced SecurityFind and fix vulnerabilitiesCode securitySecure your code as you buildSecret protectionStop leaks before they startEXPLOREWhy GitHubDocumentationBlogChangelogMarketplaceView all featuresSolutionsBY COMPANY SIZEEnterprisesSmall and medium teamsStartupsNonprofitsBY USE CASEApp ModernizationDevSecOpsDevOpsCI/CDView all use casesBY INDUSTRYHealthcareFinancial servicesManufacturingGovernmentView all industriesView all solutionsResourcesEXPLORE BY TOPICAISoftware DevelopmentDevOpsSecurityView all topicsEXPLORE BY TYPECustomer storiesEvents & webinarsEbooks & reportsBusiness insightsGitHub SkillsSUPPORT & SERVICESDocumentationCustomer supportCommunity forumTrust centerPartnersView all resourcesOpen SourceCOMMUNITYGitHub SponsorsFund open source developersPROGRAMSSecurity LabMaintainer CommunityAcceleratorGitHub StarsArchive ProgramREPOSITORIESTopicsTrendingCollectionsEnterpriseENTERPRISE SOLUTIONSEnterprise platformAI-powered developer platformAVAILABLE ADD-ONSGitHub Advanced SecurityEnterprise-grade security featuresCopilot for BusinessEnterprise-grade AI featuresPremium SupportEnterprise-grade 24/7 supportPricing Search or jump to... Search code, repositories, users, issues, pull requests...
Search Clear
Search syntax tips Provide feedback Include my email address so I can be contacted Cancel Submit feedback Saved searches
Name Query To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up
Appearance settings Resetting focus You signed in with another tab or window. Reload to refresh your session. Dismiss alert highpost tailscale-macos-vm Public
Notifications
Fork
Star Code Issues Pull requests Actions Projects Security and quality Insights
Additional navigation options
Code Issues Pull requests Actions Projects Security and quality Insights
mainBranchesTagsGo to fileCodeOpen more actions menuFolders and filesNameNameLast commit messageLast commit dateLatest commit History1 Commit1 CommitREADME.mdREADME.md build.shbuild.sh cleanup.shcleanup.sh dev-server.ymldev-server.yml run.shrun.sh store-ts-key-keychain.shstore-ts-key-keychain.sh View all filesRepository files navigationREADMEUsing Tailscale with an OrbStack VM on macOS Tag name: myservers Modify the Tailscale SSH access controls Add your new tag ("myservers") to the Destination (dst) array. Create a Tailscale auth key Generate an auth key via the Tailscale Admin Keys panel with these configurations: Reusable: Enabled Store the newly created auth key in Keychain: ./store-ts-key-keychain.sh (Note: This creates an entry named tailscale-auth-key-dev-server in your Keychain). Start the VM and add it to your tailnet Connect to the VM MagicDNS name: ssh player1@dev-server Example: git Files dev-server.yml: A cloud-init recipe that specifies environment configurations, system locales, default development packages, user access profiles and installation tasks for the Tailscale engine. About Using Tailscale with an OrbStack VM on macOS Readme Uh oh! There was an error while loading. Please reload this page. Activity 4 0 0 Report repository Releases Packages
Uh oh! There was an error while loading. Please reload this page. Contributors Uh oh! There was an error while loading. Please reload this page. Languages Shell
Footer © 2026 GitHub, Inc. Footer navigation Terms Privacy Security Status Community Docs Contact Manage cookies Do not share my personal information You can’t perform that action at this time. |
This repository demonstrates a method for integrating Tailscale networking with an OrbStack virtual machine running on macOS to establish secure remote access. The core technical advantage lies in OrbStack's ability to provide a fully capable Linux kernel environment, which allows Tailscale to utilize standard kernel networking facilities, such as /dev/net/tun, thus bypassing reliance on less secure userspace networking methods. The provisioning process involves spinning up a temporary virtual machine instance, utilizing cloud-init to load configuration settings from a designated file, and then bringing the pre-configured VM online. This workflow is orchestrated to add the VM to the user's Tailnet using an authentication key and enable Tailscale SSH, allowing users to connect to the VM remotely without exposing the host machine's ports. A critical element of this setup involves secure handling of authentication credentials. Due to macOS security sandbox restrictions, the guest VM cannot directly access secrets stored on the host system, such as the Tailscale authentication key. Consequently, secrets must be injected from the host macOS environment during the provisioning phase, as demonstrated by the execution of scripts like run.sh. The security mechanism leverages the Apple Keychain to store the Tailscale auth key securely. Establishing access requires careful configuration of Tailscale Access Control Lists and SSH permissions. The process begins by defining a custom tag, such as myservers, within Tailscale Access Controls. Subsequently, the Tailscale SSH policies must be modified to explicitly permit access to servers tagged with this new tag for specified users. This involves setting the action from check to accept and mapping desired usernames to the destination users, ensuring that only authorized entities can establish SSH sessions. The operational workflow involves a sequence of script executions managed by files such as build.sh, run.sh, and cleanup. The build script utilizes the cloud-init configuration to provision an Ubuntu environment, followed by the run script, which retrieves the stored authentication key from the Keychain and initializes the Tailscale interface within the virtual machine, enabling SSH. This setup facilitates seamless remote interaction, exemplified by allowing a user to clone a repository directly on the remote server via Tailscale SSH. The repository provides several supporting files detailing these steps, including dev-server.yml, which defines environment configurations and installation tasks, build.sh for environment provisioning, run.sh for VM startup and network integration, cleanup.sh for complete resource teardown, and store-ts-key-keychain.sh for securely storing the necessary authentication key in the system Keychain. The overall objective is to create a reproducible and secure mechanism for deploying and securely connecting to remote Linux environments on macOS via Tailscale. |