I recently reconfigured my home servers using Clear Linux for the stateless installation and performance on intel devices. Unfortunately, after the installation I discovered that Tailscale does not currently support Clear Linux (at the time of writing). Luckily, even with my rudimentary knowledge of Linux, I was able to install and run Tailscale using the available binaries manually. The successful experience shows the power of static Go binaries.
Here is how I did it!
Installation
Download the latest stable Tailscale binaries that are compatible with your server architecture.
Binaries are available here: https://pkgs.tailscale.com/stable/#static
For my part, servers are AMD64 compatible. To download the binaries with CURL, run the following command:
curl https://pkgs.tailscale.com/stable/tailscale_1.26.1_amd64.tgz --output tailscale.tgz
Extract the archive using:
tar xvf tailscale.tgz
Some modifications
You should have two binaries and a systemd
folder at the extraction location. Since Clear Linux is stateless, we are prohibited from using the normal path provided in the systemd/tailscaled.service
file, so we need to update it. On lines ExecStartPre
, ExecStart
, ExecStopPost
, the executable paths should be changed to /usr/local
.
Here is the modified file:
[Unit]
Description=Tailscale node agent
Documentation=https://tailscale.com/kb/
Wants=network-pre.target
After=network-pre.target NetworkManager.service systemd-resolved.service
[Service]
EnvironmentFile=/etc/default/tailscaled
ExecStartPre=/usr/local/tailscaled --cleanup
ExecStart=/usr/local/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale>
ExecStopPost=/usr/local/tailscaled --cleanup
Restart=on-failure
RuntimeDirectory=tailscale
RuntimeDirectoryMode=0755
StateDirectory=tailscale
StateDirectoryMode=0700
CacheDirectory=tailscale
CacheDirectoryMode=0750
Type=notify
[Install]
WantedBy=multi-user.target
Move files
To make the installation work, we need to move files to their proper locations within the ClearLinux file structure. To do so, within the extracted folder,
Move the environment file by running:
sudo mkdir /etc/default
sudo mv systemd/tailscaled.defaults /etc/default/tailscaled
Move the executables by running:
sudo mv tailscale /usr/local/
sudo mv tailscaled /usr/local/
Move the systemd unit file by running:
sudo mv systemd/tailscaled.service /etc/systemd/system/
Starting Tailscale
Enable the service to start on machine boot so it is always accessible through Tailscale.
sudo systemctl enable --now tailscaled
Use the tailscale
cli to register the machine to your Tailscale account:
sudo /usr/local/tailscale up
The CLI should prompt you with a link that you can use to login.
That’s it, you should now have your new machine listed in the Tailscale web UI