Script: Update Tailscale on (nearly) all devices

Hi there :wave:

Many people wonder how to update the pretty old Tailscale version on GL.iNet routers like the Flint, Flint2, or even the new Flint 3 (GL-BE9300). For your convenience, I created a script to automate this entire process.

ssh2

Key Features

  • :sparkles: Automatic Updates - The script fetches and installs the latest Tailscale version automatically
  • :package: Tiny Version Support - Uses optimized tiny binaries to save precious storage space
  • :bullseye: Version Selection - Want a specific version? The --select-release flag lets you choose
  • :wrench: Exit Node Ready - Automatically configures stateful filtering for proper exit node functionality
  • :shield: Safe Restore - Easy rollback to original firmware binaries if needed

Permanent Installation

The script makes all changes permanent across firmware updates. You only need to run it once, and the updated Tailscale persists even after GL.iNet firmware upgrades. On the downside, it might create trouble when you flash a way older firmware. Make sure to use --restore before downgrading.

You need to re-run the script when a new Tailscale version is released.

If everything fails, flashing using U-Boot will fix it.

Supported Architectures

Currently supported on devices using ARM64, ARMv7, MIPS, MIPSle architectures. This covers nearly all GL.iNet routers with firmware 4.x.

Quick-Start

You can run it directly on your router via SSH with this single command:


wget -q https://get.admon.me/tailscale -O update-tailscale.sh ; sh update-tailscale.sh

:warning: Important: Do not run this script as a cron job! Manual execution is recommended.

Download & Documentation

Advanced Usage

Running on devices with low free space

You can use --ignore-free-space to bypass the free space check. The script uses tiny-tailscale binaries by default, so 15 MB of free space during execution should be sufficient.

:warning: Could potentially break your router if there is not enough free space.

Running without confirmation

Use the --force flag to run the script without any confirmation prompts. Combination with --ignore-free-space is possible for fully unattended installations.

Select a specific version


sh update-tailscale.sh --select-release

The script will display available releases for you to choose from.

:warning: Warning: Downgrading Tailscale is not officially supported and may cause unexpected behavior.

Logging options

Enable timestamps for debugging:


sh update-tailscale.sh --log

Use ASCII characters instead of emojis for older terminals:


sh update-tailscale.sh --ascii

Usage

./update-tailscale.sh [--ignore-free-space] [--force] [--restore] [--no-upx] [--no-download] [--no-tiny] [--select-release] [--testing] [--log] [--ascii] [--help]

Argument Description
--ignore-free-space Bypasses the free space check. Use with caution on low-storage devices!
--force Skips all confirmation prompts and makes installation permanent
--force-upgrade Forces upgrade even if the current version is already up to date. Useful for reinstalling the same version.
--restore Restores original firmware binaries. :warning: Does not restore config files!
--no-upx Skips UPX compression. Binaries will be larger but installation is faster
--no-download Skips downloading binaries. Use pre-downloaded archive at /tmp/tailscale.tar.gz
--no-tiny Uses full Tailscale binaries instead of tiny version
--select-release Displays available releases and lets you choose a specific version
--testing Uses the test branch for updating the script
--log Shows timestamps in all log messages. Useful for debugging
--ascii Uses ASCII characters instead of emojis for compatibility
--help Displays help message with all available arguments

Tiny-Tailscale Feature

By default, the script uses optimized tiny binaries that significantly reduce storage footprint while maintaining full functionality. These binaries are pre-built and UPX-compressed, perfect for routers with limited storage. Use --no-tiny if you need the full-sized binaries.

Disclaimer

This script is provided as-is without any warranty. Use it at your own risk.

It may potentially:

  • :fire: Break your router, computer, or network
  • :fire: Cause unexpected system behavior
  • :fire: Even burn down your house (okay, probably not, but you get the idea)

You have been warned!

Alternative Way

You can update Tailscale manually by downloading the necessary files from the official website and replacing the files on your router accordingly.

Restoring

Simply run the script with the --restore argument:


sh update-tailscale.sh --restore

:warning: Caution: This does not restore configuration files and may result in a broken installation.

Manual Restoration:

  1. Replace /usr/sbin/tailscaled and /usr/sbin/tailscale files with the original files from /rom/usr/sbin/
  2. Remove all Tailscale lines from /etc/sysupgrade.conf

Made with :heart: by @Admon

If you find this helpful, consider supporting the project via GitHub

47 Likes

Thank you so much for this!

However, sadly on my Brume 2 this does not update my version of tailscale, the script completes successfully but when I go to the tailscale admin page it is still stuck on the old version.

Could you please run uname -m and df -h?

uname -m returns

root@GL-MT2500:~# uname -m
aarch64

and df -h returns

root@GL-MT2500:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                40.0M     40.0M         0 100% /rom
tmpfs                   495.3M    336.0K    495.0M   0% /tmp
/dev/mmcblk0p7            7.2G    441.0M      6.8G   6% /overlay
overlayfs:/overlay        7.2G    441.0M      6.8G   6% /
tmpfs                   512.0K         0    512.0K   0% /dev

Hmm, that’s strange - all dependencies are met.
Since I don’t use tailscale: Where do you find the version information?

Could you please run tailscale version and tailscaled -version as well?

I add the version given on the tailcale admin console as an attachment.

Screenshot 2024-01-24 at 09.53.36

The output of tailscale version and tailscaled -version are:

root@GL-MT2500:~# tailscale version
1.32.2-dev
  go version: go1.19.3
root@GL-MT2500:~# tailscaled -version
1.32.2-dev
  go version: go1.19.3
1 Like

Thanks for pointing out, I found the bug and updated the script.
You can run the command from above once more - it should work now.

Yes, that works great! Thank you very much.

1 Like

Hi Admon,

I just did the update on the below device. The upgrade worked perfectly on my MT-3000 except that for some odd reason the upgrade didn’t like my device. I’m using a rasberry pi as an exit node and my MT-3000 as a router and I no longer have the internet working. In addition when I run the tailscale status command on my GL-inet I no longer get a direct connection to the exit node (its now trying to use a relay).

I had to factory reset my device and use the older version to get it working.

So thanks for the script but I think the guys at GL-inet might have some configuring to do for the new versions of Tailscale.

Thanks again though for the great script :slight_smile:

I’m running the v4.4.6 of the admin panel.
image

The script was updated to support --ignore-free-space so it’s able to run on the AXT1800 as well.

2 Likes

fyi - I remotely logged into my other AXT1800 and used this script - it worked flawlessly - withen 1 minute, it had upgraded Tailscale and reinitiated Tailscale without my input / really great work - thanks again

2 Likes

Thanks for the feedback, appreciate it! :star2:

Worked great on Brume 2 and Slate Plus!

1 Like

@admon should this work to update Tailscale on GL-MV1000 Brume or no?

Don’t know, give it a try.

I’m getting this error on MV1000.
“Downloading ‘https://raw.githubusercontent.com/Admonstrator/glinet.forum/main/scripts/update-tailscale/update-tailscale.sh
Failed to send request: Operation not permitted”

Can’t help you with this, it’s an error on your side.

Maybe wget does not support TLS on the MV1000 or you are using proxy/vpn and block GitHub?

Ok thanks. I am attempting to do the upgrade remotely. I’ll try again when I’m connected to the machine locally and can disable Tailscale and try a different ISP. Thank you for the script. It worked great on two of my gl-inet devices.

1 Like

8 posts were split to a new topic: AXT1800 file system is read-only

Hi,

i’ve update tailscaile with your script.

my AXT1800 is working fine.

thanks

1 Like