這是一張有關標題為 Installing the Latest Version of Tailscale on Synology NAS (DSM) 的圖片

Installing the Latest Version of Tailscale on Synology NAS (DSM)

One-click installation of the latest Tailscale version on Synology NAS

Introduction

In the previous article, Using Tailscale to Easily Create Secure and Private Tunnels, we explained how to use Tailscale to establish a VPN (tailnet) that only you can access.

This article will focus on how to install the latest version of Tailscale on a Synology NAS, and implement mechanisms for automatic updates to ensure Tailscale stays up-to-date.

The system configuration for the following operations is:

  • NAS Device: DS220+
  • Operating System: DiskStation Manager 7 (DSM 7)
  • CPU: Intel Celeron J4025
  • Synology Package Arch: Geminilake
  • Generic Arch: x86_64

To update to the latest version of Tailscale, it is necessary to know the generic architecture of your NAS. This will determine which Synology package (spk) file to download for installation and updates. If you’re unsure about your NAS architecture, you can check Synology and SynoCommunity Package Architectures to find out.

Traditional Installation Method

The traditional installation method is through the Synology Package Center, where you can install the version released by Synology.

  1. Click the main menu button in the top left corner.

    Main Menu Button

  2. Click on the Package Center.

    Package Center

  3. Find Tailscale at the bottom of all packages and click Install.

    Install Tailscale

  4. After installation, click on the main menu’s Tailscale and log in to use it.

    In the Package Center, check the installed version to see it is the official version 1.38.4-700038004.

    Check Tailscale Version

This version is released by Synology (2023/5/8).

According to Tailscale’s latest official release, the version is 1.58.2 (2024/1/25).

Installing the Latest Version of Tailscale from the Official Website

Tailscale compiles and releases the latest version of the spk for Synology with each update.

Users can download it themselves and manually install it via the Package Center. For future updates, repeat this process.

Here, Wells has integrated a script to automate installation and scheduled updates. Follow the steps below to execute it.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

# Update Tailscale
tailscale update --yes

# Check if update was successful
if [ $? -eq 0 ]; then
echo "Tailscale update executed successfully"
exit 0
fi

# If command not found, manually download the specified version of the Tailscale installation package
url="https://pkgs.tailscale.com/stable/tailscale-x86_64-1.58.2-7000058002-dsm7.spk"
filename=$(basename "$url")

# Create a temporary folder in the user's home directory
cd ~
mkdir tmp_synology
cd tmp_synology

# Download Tailscale installation package
wget "$url"

# Install Tailscale Synology package
sudo synopkg install "$filename"

# Start Tailscale Synology package
sudo synopkg start Tailscale

# Remove temporary folder
rm -rf ~/tmp_synology

# Run Tailscale update again
tailscale update --yes
  1. Copy the script content above into a text editor.

  2. Modify the URL in the script, adjusting it according to your NAS generic architecture.

    You can check Synology and SynoCommunity Package Architectures to find your NAS’s generic architecture.

    Find the Generic Arch corresponding to your NAS model. For DS220+, it’s x86_64.

    Visit Tailscale Stable Releases to find the corresponding DSM version and Generic Arch.

    Copy its spk URL and replace the URL line in the script.

    The script URL is suitable for x86_64. If your Generic Arch is the same, no changes to the script are needed.

    For example, DS224+, DS923+, DS723+, DS423+, DS1621+, DS220+, DS420+, RS820+, RS1219+, FS1018, FS3017, etc., all use x86_64, so the script can be used directly.

  3. Click the main menu button in the top left corner.

    Main Menu Button

  4. Click on the Control Panel.

    Control Panel

  5. Click Task Scheduler.

    Task Scheduler

  6. Add a new scheduled task (scheduled execution).

    Add New Script

  7. Fill in the task name.

    Task Name and Run as Root

  8. Set the script to execute at a scheduled time, here it is set to run at midnight daily.

    Set Script Execution Time

  9. In task settings, paste the script corresponding to your NAS architecture. You can set whether to return the execution result via email.

    Paste NAS Architecture Script

  10. Click confirm.

    Click Confirm, Warning Message Appears, Click Yes

  11. The first time you can manually execute the update to upgrade the NAS version to the latest version.

    Here, Wells installed the Package Center version (1.38) without removing it.

    It can be directly upgraded to the latest version, so it doesn’t matter whether it is removed first or not.

    Right-click Task → Execute

  12. Check the version in the Package Center, it should be 1.58.2, while Synology’s latest version is 1.38.4.

    Check Tailscale Version, Updated via Script

Thus, Tailscale will automatically update at midnight daily.

Conclusion

After installation, you can go to the control panel and click on the Tailscale app. This will open a new tab, where you can log in and start networking.

For detailed networking, refer to Using Tailscale to Easily Create Secure and Private Tunnels.

References

  1. What kind of CPU does my Synology NAS have?
  2. Synology and SynoCommunity Package Architectures
  3. Using Tailscale to Easily Create Secure and Private Tunnels
  4. Synology Packages
Theme Stack designed by Jimmy