Script: Update Tailscale on (nearly) all devices

Hi there :wave:

some people wonder how to update the pretty old Tailscale version on devices like the Flint or Flint2. For your convenience, I created a script to automate this process.

asciicast

Permanent feature

I added the option to make all changes permanent. The script therefore only needs to be executed once, the effects are then permanent. Even across firmware updates. On the downside, it might create trouble when you flash a way older firmware. Make sure to use --restore before.

You need to re-run the script if there is a new tailscale version.

If everything fails, flashing using Uboot will fix it .

Dependencies

Currently, the update-process is only supported on devices using ARM64, ARMv7 and MIPS architecture.

Quick-start

You can run it by using the following command directly on your router via SSH.


wget -O update-tailscale.sh https://raw.githubusercontent.com/Admonstrator/glinet-tailscale-updater/main/update-tailscale.sh \
&& sh update-tailscale.sh

Download

Running on devices with low free space

You can use --ignore-free-space to ignore the free space check. This is useful for devices with low free space. By default, the tiny-tailscale binaries will be used, so all in all, 15 MB of free space during the run of the script should be totally fine.

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

Running it without confirmation

Use the --force flag to run the script without any confirmation. Combination with --ignore-free-space is possible.

Usage

./update-tailscale.sh [--ignore-free-space] [--force] [--restore] [--no-upx] [--no-download] [--no-tiny] [--help]

Argument Description
--ignore-free-space Ignore free space check
--force Do not ask for confirmation
--restore Restore tailscale to factory default
--no-upx Do not compress tailscale with UPX
--no-download Do not download the newest tailscale version
--no-tiny Will not use tiny tailscale binaries
--help Show this help

Disclaimer

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

It may break your router, your computer, your network or anything else.
It may even burn down your house :fire: You have been warned!

Alternative way

You can update Tailscale on your own manually.
Simply get the necessary files from the official website and replace the files on your router accordingly.

Restoring

Simply run the script with the --restore argument.

Manual way:

  1. To revert the changes, replace the /usr/sbin/tailscaled and /usr/sbin/tailscale files with the original files.

  2. Remove all tailscale lines from /etc/sysupgrade.conf

21 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