install and configure tailascale to start at boot on macos
we want tailscale to start at boot of our macos vm and not when a user logins (so we can remotely manage the vm).
install go:
brew update && brew install golang
mkdir -p $HOME/go/{bin,src,pkg}
cat <<EOF >> ~/.zshrc
export GOPATH=$HOME/go
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
EOF
source $HOME/.zshrc
cat <<EOF >> ~/.bashrc
export GOPATH=$HOME/go
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
EOF
source $HOME/.bashrc
source: https://jimkang.medium.com/install-go-on-mac-with-homebrew-5fa421fc55f5
install tailscaled:
go install tailscale.com/cmd/tailscale{,d}@main
run tailscaled at system boot:
sudo $HOME/go/bin/tailscaled install-system-daemon
login talscaled to your account (with your auth key):
tailscale login --authkey=tskey-auth-a08gh083g083208gf08wgef0284ghf08wgf0a288fag30
check it's ok:
tailscale status
output
user@machine ~ % tailscale status
100.123.123.1 this-machine tailscale-account@ macOS -
100.321.321.2 another-machine tailscale-account@ linux -
# Health check:
# - This is an unstable (development) version of Tailscale; frequent updates and bugs are likely
NB: as stated, tailscaled is an unstable (development) version of Tailscale.
source: https://github.com/tailscale/tailscale/wiki/Tailscaled-on-macOS