Tailscale daemon couldn't start on Arch Linux

Hi. I’m trying to setup tailscale on Arch Linux on VPS, but looks like the daemon doesn’t start. How do I fix this?

Environment

  • Arch Linux
  • 1 vCPU / 4GB RAM VPS hosted on vultr.com
    • I also tested on Ubuntu 22.04 LTS and it worked correctly. So I think it’s not problem of vultr
    • I could reproduce this on Arch Linux on Vagrant (windows 11)

Steps to reproduce

Install tailscale using official script copied from Download · Tailscale

# curl -fsSL https://tailscale.com/install.sh | sh

(This time I do this as root / provided shell script, but same result when I tried as normal user / install manually. )

Result

# tailscale up
failed to connect to local tailscaled; it doesn't appear to be running (sudo systemctl start tailscaled ?)

# systemctl start tailscaled

# tailscale up
failed to connect to local tailscaled (which appears to be running as tailscaled, pid 7516). Got error: Failed to connect to local Tailscale daemon for /localapi/v0/status; systemd tailscaled.service not running. Error: dial unix /var/run/tailscale/tailscaled.sock: connect: no such file or directory
# journalctl -u tailscaled
Feb 12 01:14:12 tailscale-playground systemd[1]: Starting Tailscale node agent...
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: logtail started
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: Program starting: v1.36.1, Go 1.20: []string{"/usr/sbin/tailscaled", "--cleanup"}
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: LogID: adfa7dae9dffa5bab7125ae82e0e1c4cd9a23fc55dcfa44d7863a13a2ce0f1b3
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: logpolicy: using $STATE_DIRECTORY, "/var/lib/tailscale"
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: logpolicy.ConfigFromFile /var/lib/tailscale/tailscaled.log.conf: open /var/lib/tailscale/tailscaled.log.conf: no such file or directory
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: logpolicy.Config.Validate for /var/lib/tailscale/tailscaled.log.conf: config is nil
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: dns: resolvedIsActuallyResolver error: resolv.conf doesn't point to systemd-resolved; points to [108.61.10.10 2001:19f0:300:1704::6]
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: dns: [resolved-ping=yes rc=nm resolved=not-in-use ret=direct]
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: dns: using "direct" mode
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: dns: using *dns.directManager
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: flushing log.
Feb 12 01:14:12 tailscale-playground tailscaled[7227]: logger closing down
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: logtail started
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: Program starting: v1.36.1, Go 1.20: []string{"/usr/sbin/tailscaled", "--state=/var/lib/tailscale/tailscaled.state", "--socket=/run/tailscale/tailscaled.sock", "--port=41641"}
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: LogID: adfa7dae9dffa5bab7125ae82e0e1c4cd9a23fc55dcfa44d7863a13a2ce0f1b3
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: logpolicy: using $STATE_DIRECTORY, "/var/lib/tailscale"
Feb 12 01:14:13 tailscale-playground systemd[1]: Started Tailscale node agent.
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: wgengine.NewUserspaceEngine(tun "tailscale0") ...
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: Linux kernel version: 5.15.91-1-lts
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: is CONFIG_TUN enabled in your kernel? `modprobe tun` failed with: modprobe: FATAL: Module tun not found in directory /lib/modules/5.15.91-1-lts
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: kernel/drivers/net/tun.ko found on disk, but not for current kernel; are you in middle of a system update and haven't rebooted? found: /lib/modules/5.15.91-4-lts/kernel/drivers/net/tun.ko.zst
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: wgengine.NewUserspaceEngine(tun "tailscale0") error: tstun.New("tailscale0"): no such device
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: flushing log.
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: logger closing down
Feb 12 01:14:13 tailscale-playground tailscaled[7233]: getLocalBackend error: createEngine: tstun.New("tailscale0"): no such device
Feb 12 01:14:13 tailscale-playground systemd[1]: tailscaled.service: Main process exited, code=exited, status=1/FAILURE
Feb 12 01:14:13 tailscale-playground tailscaled[7243]: logtail started
Feb 12 01:14:13 tailscale-playground tailscaled[7243]: Program starting: v1.36.1, Go 1.20: []string{"/usr/sbin/tailscaled", "--cleanup"}
Feb 12 01:14:13 tailscale-playground tailscaled[7243]: LogID: adfa7dae9dffa5bab7125ae82e0e1c4cd9a23fc55dcfa44d7863a13a2ce0f1b3
Feb 12 01:14:13 tailscale-playground tailscaled[7243]: logpolicy: using $STATE_DIRECTORY, "/var/lib/tailscale"
Feb 12 01:14:13 tailscale-playground tailscaled[7243]: dns: resolvedIsActuallyResolver error: resolv.conf doesn't point to systemd-resolved; points to [108.61.10.10 2001:19f0:300:1704::6]
Feb 12 01:14:13 tailscale-playground tailscaled[7243]: dns: [resolved-ping=yes rc=nm resolved=not-in-use ret=direct]
Feb 12 01:14:13 tailscale-playground tailscaled[7243]: dns: using "direct" mode
Feb 12 01:14:13 tailscale-playground tailscaled[7243]: dns: using *dns.directManager
Feb 12 01:14:13 tailscale-playground tailscaled[7243]: flushing log.
Feb 12 01:14:13 tailscale-playground tailscaled[7243]: logger closing down
Feb 12 01:14:14 tailscale-playground systemd[1]: tailscaled.service: Failed with result 'exit-code'.
Feb 12 01:14:14 tailscale-playground systemd[1]: tailscaled.service: Scheduled restart job, restart counter is at 1.
Feb 12 01:14:14 tailscale-playground systemd[1]: Stopped Tailscale node agent.

You’ll need to enable systemd-resolved and link the stub resolv.conf:

sudo systemctl enable --now systemd-resolved
sudo ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Once done, you can restart tailscaled and it should work.

Thank you for your reply! I just tried that and still got error.

failed to connect to local tailscaled (which appears to be running as tailscaled, pid 8842). Got error: Failed to connect to local Tailscale daemon for /localapi/v0/status; systemd tailscaled.service not running. Error: dial unix /var/run/tailscale/tailscaled.sock: connect: no such file or directory

I can reproduce. It looks like there’s a Linux module that’s not enabled?