Script: Update Tailscale on (nearly) all devices

This one is the solution:

ln -s tailscale.combined tailscale
ln -s tailscale.combined tailscaled

Copy the tailscale.combined to /usr/sbin and use the commands above.

Does this apply to new versions that came after your solution? For example version 1.62.1 came out yesterday

The script will download the newest available version.

1 Like

Good job once again!

I have a question about this:

Then

Do we need to run once or everytime there is an update available?

1 Like

Re-run every time a new version is available.
Effects are permanent so reseting the firmware won’t reset the tailscale version.

1 Like

A post was split to a new topic: Tailscale DNS issues

Hi, I am using Flint 2 with firmware 4.5.7.

Encountered the following error when running the sciprt.

Detecting latest tailscale version …
The latest tailscale version is: tailscale_1.62.1_arm64.tgz
Downloading latest tailscale version …
Segmentation fault

UPX package download and installation has issue as well

Do you want to compress the binaries with UPX to save space? (y/N) y
Ensuring xz is present …
Failed to send request: Operation not permitted
Failed to send request: Operation not permitted
Collected errors:

Please check your DNS and internet connection.
Maybe you need to disable AGH and / or VPN.

Hi wondering if you had any thoughts on whether this as possible? I…e running the script from the CLI would always check for an updated script? And download it?

update-tailscale.sh

thanks :pray:

Feel free to add the necessary cronjobs to your crontab.
Use the --force switch so it will skip all confirmations.

Thanks for the script, it worked with Mudi. However, every command with ‘tailscale’ results in “Segmentation fault” as response and I cannot set manual commands for subnet or exit node. Any ideas how to troubleshoot or fix it? ‘Tailscaled -version’ gives fine result, ‘tailscale version’ outputs segmentation fault.

I don’t own an Mudi so I can’t test it right now. Could be possible that the newest tailscale version does not work on Mudi.

Could be indeed, however, from Tailscale GUI I can enable it and subnets and seem to work fine so far, only command line fails. Is there a way to install earlier version of Tailscale with script or best to do manually? Thanks.

Manually is the only way, sorry.

What is “Tailscale”? For what it is used for?

What is “Tailscale”? For what it is used for?

4 Likes

I’m trying to update tailscale on my ar750s but I’m running into an issue where it won’t update. At the section “installing tailscale”
Stopping tailscale …
Moving tailscale to /usr/sbin …
mv: can’t rename ‘/tmp/tailscale//tailscale’: No such file or directory
mv: can’t rename '/tmp/tailscale/
/tailscaled’: No such file or directory
Removing temporary files …
Restarting tailscale …

After it restarts it still 1.32.3, this scrips work on my mt-3000.

Please post the complete log.

Checking if prerequisites are met …
✓ Firmware version: 4
✓ Architecture: mips
✓ Available space: 81 MB
✓ xz is installed.
✓ Prerequisites are met.

Do you want to continue? (y/N)
y
┌────────────────────────────────────────────────────────────────────────┐
│ G E T T I N G N E W E S T T A I L S C A L E V E R S I O N │
└────────────────────────────────────────────────────────────────────────┘
Detecting latest tailscale version …
The latest tailscale version is: tailscale_1.64.0_mips.tgz
Downloading latest tailscale version …
┌────────────────────────────────────────────────────────────────────────┐
│ C O M P R E S S B I N A R I E S W I T H U P X │
└────────────────────────────────────────────────────────────────────────┘
Do you want to compress the binaries with UPX to save space? (y/N) y
Ensuring xz is present …
Getting UPX …
tar: can’t open ‘/tmp/tailscale.tar.gz’: No such file or directory
Compressing tailscale with UPX …
This might take 2-3 minutes, depending on your router.
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2024
UPX 4.2.3 Markus Oberhumer, Laszlo Molnar & John Reiser Mar 27th 2024

    File size         Ratio      Format      Name

upx: /tmp/tailscale//tailscale: FileNotFoundException: /tmp/tailscale//tailscale: No such file or directory

Packed 0 files.
Command exited with non-zero status 1
0.11
tar: can’t open ‘/tmp/tailscale.tar.gz’: No such file or directory
Compressing tailscaled with UPX …
This might take 2-3 minutes, depending on your router.
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2024
UPX 4.2.3 Markus Oberhumer, Laszlo Molnar & John Reiser Mar 27th 2024

    File size         Ratio      Format      Name

upx: /tmp/tailscale//tailscaled: FileNotFoundException: /tmp/tailscale//tailscaled: No such file or directory

Packed 0 files.
Command exited with non-zero status 1
0.13
rm: can’t remove ‘/tmp/tailscale.tar.gz’: No such file or directory
┌────────────────────────────────────────────────────────────────────────┐
│ C R E A T I N G B A C K U P O F T A I L S C A L E │
└────────────────────────────────────────────────────────────────────────┘
Creating backup of tailscale config …
Backup created: /root/tailscale_config_backup/2024-04-26_04-18-27.tar.gz
The binaries will not be backed up, you can restore them by using the --restore flag.
┌────────────────────────────────────────────────────────────────────────┐
│ I N S T A L L I N G T A I L S C A L E │
└────────────────────────────────────────────────────────────────────────┘
Stopping tailscale …
Moving tailscale to /usr/sbin …
mv: can’t rename ‘/tmp/tailscale//tailscale’: No such file or directory
mv: can’t rename '/tmp/tailscale/
/tailscaled’: No such file or directory
Removing temporary files …
Restarting tailscale …
┌────────────────────────────────────────────────────────────────────────┐
│ U P G R A D E P E R S I S T A N C E │
└────────────────────────────────────────────────────────────────────────┘
The update was successful. Do you want to make the installation permanent?
This will make your tailscale installation persistent over firmware upgrades.
Please note that this is not officially supported by GL.iNet.
It could lead to issues, even if not likely. Just keep that in mind.
In worst case, you might need to remove the config from /etc/sysupgrade.conf

Do you want to make the installation permanent? (y/N)

If I don’t compress the files I still get errors.

Detecting latest tailscale version …
The latest tailscale version is: tailscale_1.64.0_mips.tgz
Downloading latest tailscale version …
┌────────────────────────────────────────────────────────────────────────┐
│ C O M P R E S S B I N A R I E S W I T H U P X │
└────────────────────────────────────────────────────────────────────────┘

Do you want to compress the binaries with UPX to save space? (y/N) n
Extracting tailscale without compression …
tar: can’t open ‘/tmp/tailscale.tar.gz’: No such file or directory
rm: can’t remove ‘/tmp/tailscale.tar.gz’: No such file or directory
┌────────────────────────────────────────────────────────────────────────┐
│ C R E A T I N G B A C K U P O F T A I L S C A L E │
└────────────────────────────────────────────────────────────────────────┘
Creating backup of tailscale config …
Backup created: /root/tailscale_config_backup/2024-04-26_04-21-25.tar.gz
The binaries will not be backed up, you can restore them by using the --restore flag.
┌────────────────────────────────────────────────────────────────────────┐
│ I N S T A L L I N G T A I L S C A L E │
└────────────────────────────────────────────────────────────────────────┘
Stopping tailscale …
Moving tailscale to /usr/sbin …
mv: can’t rename ‘/tmp/tailscale//tailscale’: No such file or directory
mv: can’t rename '/tmp/tailscale/
/tailscaled’: No such file or directory
Removing temporary files …
Restarting tailscale …