這是一張有關標題為 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 demonstrated how to use Tailscale to establish a secure, private VPN (tailnet) accessible only by you.

This guide will walk you through installing the latest version of Tailscale on a Synology NAS and setting up automated updates to keep it current.

System Configuration

The steps in this guide are based on the following setup:

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

To install the latest version of Tailscale, you need to identify the generic architecture of your NAS. This determines the appropriate Synology package (.spk) file for installation and updates.

If you’re unsure about your NAS architecture, refer to the Synology and SynoCommunity Package Architectures for detailed information.

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, then select Package Center.

    Main Menu Button Package Center

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

    Install Tailscale

  3. 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 releases the latest version of the spk for Synology. Users can manually install it or automate the process using the script below.

Copy and Modify the Script

Open a text editor and paste the script below:

 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

Modify the URL in the Script

  1. Identify your NAS’s architecture using Synology and SynoCommunity Package Architectures.
    • For example:
      • DS220+ uses x86_64.
      • DS218play uses armv7.
  2. Visit the Tailscale Stable Releases.
  3. Locate the .spk file that corresponds to your DSM version and architecture, then copy its URL.
  4. Replace the url variable in the script with the selected .spk URL.

Note: If your NAS uses the x86_64 architecture, no changes to the script are required. Models such as DS224+, DS923+, DS723+, DS423+, DS1621+, DS220+, DS420+, RS820+, RS1219+, FS1018, and FS3017 all use x86_64, allowing the script to be used directly.

Access the Task Scheduler

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

  • Click the main menu button in the top-left corner.

Main Menu Button

  • Select Control Panel.

Control Panel

  • Navigate to Task Scheduler.

Task Scheduler

Add a Scheduled Task

  • Create a new scheduled task for running the script.

    Add → Scheduled Task → User-defined Script

Add New Script

Configure and Save the Task

  1. Set a task name and ensure it runs as the root user.

Task Name and Run as Root

  1. Schedule the task to execute daily at midnight.

Set Script Execution Time

  1. In the task settings, paste the script tailored for your NAS’s architecture. Optionally, configure the task to send execution results via email.

Paste NAS Architecture Script

  1. Click Confirm to save the task. If a warning message appears, select Yes to proceed.

Click Confirm, Warning Message Appears, Click Yes

Run the Task Manually

To ensure Tailscale is upgraded to the latest version, manually execute the task for the first time:

  1. Right-click on the created task in the Task Scheduler.
  2. Select Execute from the context menu.

Right-click Task → Execute

Verify the Update

  1. Open the Package Center and locate the installed Tailscale package.
  2. Confirm that the version matches the latest release (1.58.2 as of January 25, 2024), which is newer than Synology’s official version (1.38.4).

Check Tailscale Version, Updated via Script

Note: This script upgrades the existing Package Center version (e.g., from 1.38) directly, without requiring you to uninstall the previous installation.

Conclusion

Once the installation is complete, navigate to the Control Panel and open the Tailscale app. This will launch a new tab where you can log in and begin setting up your network.

For more advanced networking details, 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