Skip to content

Instantly share code, notes, and snippets.

@mariotaku
Last active May 11, 2025 04:11
Show Gist options
  • Save mariotaku/f7228c5459fc7ad2172a2b69dd51a4eb to your computer and use it in GitHub Desktop.
Save mariotaku/f7228c5459fc7ad2172a2b69dd51a4eb to your computer and use it in GitHub Desktop.
Install tailscale on webOS TV

Usage

  1. Have your TV rooted
  2. Open Terminal with SSH client or dev-manager-desktop
  3. Run curl -fsSL https://gist.githubusercontent.com/mariotaku/f7228c5459fc7ad2172a2b69dd51a4eb/raw/webosbrew-install-tailscale.sh | sh and wait for it to finish
#!/bin/sh
# Quit if not running as root
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root. Refer to https://www.webosbrew.org/guides/rooting/ for more information."
exit 1
fi
# Quit if not running on webOS
if [ ! -f /etc/starfish-release ]; then
echo "This script is intended for webOS devices only."
exit 1
fi
TAILSCALE_DIST=tailscale_1.82.0_arm
TAILSCALE_TARBALL="https://pkgs.tailscale.com/stable/${TAILSCALE_DIST}.tgz"
INSTALL_BINDIR=/media/developer/bin/
mkdir -p "$INSTALL_BINDIR"
echo "Downloading Tailscale..."
# Extract tailscaled, tailscale from the pipe
curl -sSL $TAILSCALE_TARBALL | tar -xz -C $INSTALL_BINDIR $TAILSCALE_DIST/tailscaled $TAILSCALE_DIST/tailscale --strip-components=1
echo "Adding tailscaled to init.d..."
cat <<EOF > /var/lib/webosbrew/init.d/tailscaled
#!/bin/sh
export PATH=/media/developer/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Make /etc/resolv.conf writable with bind-mount
cp /etc/resolv.conf /tmp/resolv.conf
mount -o bind /tmp/resolv.conf /etc/resolv.conf
/media/developer/bin/tailscaled &> /tmp/tailscaled.log &
EOF
chmod +x /var/lib/webosbrew/init.d/tailscaled
echo "Setting up PATH..."
# Add INSTALL_BINDIR to PATH if not already present
if ! grep -q "$INSTALL_BINDIR" /home/root/.profile; then
echo "export PATH=\$PATH:$INSTALL_BINDIR" >> /home/root/.profile
fi
echo "Done! Reboot the TV with reboot command, and run tailscale command for usage."
@pratikngupta
Copy link

Thank you for writing the wonderful script, i did not knew that it was possible to root LG TV in first place, i was able to install Tailscale but ran into this error so i figure out to leave it here so someone can save their time in future!


tailscale: not found on LG webOS after successful installation and rebooting.

If you're trying to run Tailscale on your rooted LG webOS TV and encounter the following error:

root@LGwebOSTV:~# tailscale
/bin/sh: tailscale: not found

Solution:

  1. Check the .profile to see if a custom path was added:
cat ~/.profile

You might see something like:

export PATH=$PATH:/media/developer/bin
  1. Verify if Tailscale is installed in that directory:
cd /media/developer/bin
ls

If installation was successful, you should see:

tailscale       tailscale_bin
  1. Run Tailscale using the full path:
/media/developer/bin/tailscale

This will execute Tailscale properly if the binary is located there.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment