Setting up Tailscale on Alpine Linux
Tailscale is a magical VPN solution, but doesn't come prepackaged for Alpine Linux yet. Here's how to get it set up.
-
Download the latest static binaries from https://pkgs.tailscale.com/stable/#static
-
Unzip and copy the tailscale binaries to a bin folder:
tar xvf tailscale_*.tgz && cp tailscale/tailscale* /usr/bin
-
Create an openrc script in
/etc/init.d/tailscale
:#!/sbin/openrc-run # supervise the running process supervisor=supervise-daemon # require network before starting depend() { need net } # run tailscale command=/usr/bin/tailscaled name=tailscale command_args="--state=tailscaled.state"
-
Make it executable:
chmod +x /etc/init.d/tailscale
-
Make it start on boot:
rc-update add tailscale default
-
Go ahead and
rc-service tailscale start
the service to make sure it works. -
tailscale up
to log in and get connected. -
reboot
to make sure things come up cleanly on boot (checkrc-status --servicelist
)