Help for tailscaled.service on an unsupported Linux distribution

I am using Tailscale on Solus, a distribution that has no official package yet, so I use the latest static binary. As mentioned in the documentation, there is an example tailscaled.service provided in the systemd/ subfolder. I assume it is just an example, because the path to tailscaled is preset to /usr/sbin/tailscaled.

I extracted the static binary to /home/kewbak/.config/tailscale/tailscaled so I edited the service file accordingly:

[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=/home/kewbak/.config/tailscale/tailscaled --cleanup
ExecStart=/home/keabak/.config/tailscale/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port 41641
ExecStopPost=/home/kewbak/.config/tailscale/tailscaled --cleanup

Restart=on-failure

RuntimeDirectory=tailscale
RuntimeDirectoryMode=0755
StateDirectory=tailscale
StateDirectoryMode=0700
CacheDirectory=tailscale
CacheDirectoryMode=0750
Type=notify

[Install]
WantedBy=multi-user.target

Then copied the service file to /etc/systemd/system/tailscaled.service, enabled it with sudo systemctl enable tailscaled and tried to start it with sudo systemctl start tailscaled. Unfortunately this seems to fail terribly:

Job for tailscaled.service failed because of unavailable resources or another system error.
See "systemctl status tailscaled.service" and "journalctl -xe" for details.
kewbak@homimi-solus ~/.config/tailscale/systemd $ sudo systemctl status tailscaled
● tailscaled.service - Tailscale node agent
     Loaded: loaded (/etc/systemd/system/tailscaled.service; enabled; vendor preset: enabled)
     Active: failed (Result: resources) since Sat 2021-10-16 18:45:10 CEST; 19s ago
       Docs: https://tailscale.com/kb/
        CPU: 0

Oct 16 18:45:10 homimi-solus systemd[1]: tailscaled.service: Scheduled restart job, restart counter is at 5.
Oct 16 18:45:10 homimi-solus systemd[1]: Stopped Tailscale node agent.
Oct 16 18:45:10 homimi-solus systemd[1]: tailscaled.service: Start request repeated too quickly.
Oct 16 18:45:10 homimi-solus systemd[1]: tailscaled.service: Failed with result 'resources'.
Oct 16 18:45:10 homimi-solus systemd[1]: Failed to start Tailscale node agent.
kewbak@homimi-solus ~/.config/tailscale/systemd $ journalctl -xe
Oct 16 18:45:29 homimi-solus sudo[690562]: kewbak : TTY=pts/3 ; PWD=/home/kewbak/.config/tailscale/systemd ; USER>
Oct 16 18:45:29 homimi-solus sudo[690562]: pam_unix(sudo:session): session opened for user root by (uid=1000)
Oct 16 18:45:29 homimi-solus sudo[690562]: pam_unix(sudo:session): session closed for user root

What am I doing wrong? Thank you all in advance for your help!

I’m going to give this a shot, however, I’m stuck at square one! How did you get this to execute successfully? When I run sudo tailscaled --state=tailscaled.state all I get is “command not found.”

If you’re installing on a system which uses neither deb nor rpm packages, you’ll likely need the static binaries: https://pkgs.tailscale.com/stable/, scroll to the bottom in the " Static binaries" section.

Got that far, but when I run sudo tailscaled --state=tailscaled.state all I get is “command not found.”

That means the binaries are not in $PATH. If you are familiar with your shell rc you can add whatever directory the binaries are in to $PATH. Otherwise, they would usually go in:
/usr/bin/tailscale
/usr/sbin/tailscaled

That worked! Thank you!

This is pretty old by now and i expect @kewbak was able to solve it, but in case somebody else runs into this: I had the same issue but fixed it by copying the config to the right place: cp systemctl/tailscaled.defaults /etc/default/tailscaled

More specifically, in tailscaled.service the “EnvironmentFile” path must point to a file containing the tailscaled.defaults data. So you can just move the tailscaled.defaults file to /etc/default/tailscaled (the file not the folder) and it should work. Otherwise if you move it to a different location, you’ll need to edit the tailscaled.service file to match.

The tailscaled.service should be moved to your /etc/systemd/system/ directory.
You also need to put the tailscale application on the shell path, such as /usr/sbin/