Skip to content

Latest commit

 

History

History
179 lines (129 loc) · 4.28 KB

tailscale-on-arm.md

File metadata and controls

179 lines (129 loc) · 4.28 KB

Install Tailscale on an OpenPLi set-top box (without Docker)

This page describes how to install and configure Tailscale on an OpenPLi set-top box using the ARM version of Linux.
Because OpenPLi is a lightweight distribution, the usual package manager method may not work. Instead, you may need to use Tailscale’s static binaries and configure an init.d service for automatic startup.


1. Try the standard installation script

First, attempt to install Tailscale using the official script:

curl -fsSL https://tailscale.com/install.sh | sh
  • If this works, skip ahead to Step 4.
  • If it fails (common on OpenPLi), continue with the manual installation below.

2. Download the ARM static binaries

Go to Tailscale Stable Releases and download the archive for your architecture: arm, arm64, mips, or mipsle. The file names follow the pattern tailscale_<version>_<arch>.tgz, where <version> is the current version shown on that page. For an ARM device, for example:

wget https://pkgs.tailscale.com/stable/tailscale_<version>_arm.tgz

3. Unpack and install the binaries

Extract the archive and copy the executables into /usr/sbin:

tar zxvf tailscale_*_arm.tgz
cp tailscale_*_arm/tailscal* /usr/sbin/
chmod +x /usr/sbin/tailscal*

If you downloaded another architecture, replace arm in the file names.

This provides both tailscale (CLI) and tailscaled (daemon).


4. Create an init.d service for Tailscale

Since OpenPLi does not use systemd, we need to create an init.d service to start Tailscale at boot.

Create the service script:

cat << 'EOF' > /etc/init.d/tailscaled
#!/bin/sh
DAEMON=/usr/sbin/tailscaled
PIDFILE=/var/run/tailscaled.pid
DAEMON_OPTS="--state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock"

case "$1" in
  start)
    echo "Starting tailscaled"
    start-stop-daemon --start --quiet --background --make-pidfile       --pidfile "$PIDFILE" --exec "$DAEMON" -- $DAEMON_OPTS
    ;;
  stop)
    echo "Stopping tailscaled"
    PID="$(cat "$PIDFILE" 2>/dev/null)"
    # Ignore a stale PID file whose number now belongs to another process
    grep -qF "$DAEMON" "/proc/$PID/cmdline" 2>/dev/null || PID=""
    if [ -n "$PID" ] && ! start-stop-daemon --stop --quiet --retry=TERM/9/KILL/11 --pidfile "$PIDFILE"; then
      # A start-stop-daemon that rejects --retry sends no signal, so send TERM here
      kill "$PID" 2>/dev/null
    fi
    # BusyBox ignores --retry and returns at once, so wait here until the process is gone
    i=0
    while [ -n "$PID" ] && kill -0 "$PID" 2>/dev/null; do
      if [ "$i" -ge 15 ]; then
        kill -9 "$PID" 2>/dev/null
        break
      fi
      sleep 1
      i=$((i + 1))
    done
    "$DAEMON" --cleanup
    rm -f "$PIDFILE"
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  status)
    if grep -qF "$DAEMON" "/proc/$(cat "$PIDFILE" 2>/dev/null)/cmdline" 2>/dev/null; then
      echo "tailscaled is running"
    else
      echo "tailscaled is not running"
    fi
    ;;
  *)
    echo "Usage: /etc/init.d/tailscaled {start|stop|restart|status}"
    exit 1
    ;;
esac

exit 0
EOF

Make the script executable and add it to startup:

chmod +x /etc/init.d/tailscaled
update-rc.d tailscaled defaults

5. Test the service

Check the service status (should be stopped):

service tailscaled status

Start the daemon:

service tailscaled start

Verify it’s running:

service tailscaled status

You can also check that the PID file exists:

cat /var/run/tailscaled.pid

6. Run Tailscale

With the daemon running, bring Tailscale online:

tailscale up

You will receive an authentication URL, for example:

To authenticate, visit:

     https://login.tailscale.com/c/129a3b4e01e114a

Open this in your browser, log in, and the device will appear in your Tailscale network.


7. Notes

  • The daemon will now automatically start on boot.
  • You can stop or restart it anytime using:
service tailscaled stop
service tailscaled restart
  • From here, Tailscale should work like on any other Linux machine.

✅ Success! At this point, your OpenPLi ARM device is part of your Tailscale network.