The DSM icon above is Copyright © 2004-2026 Synology Inc.
Script to automatically download the correct pat file and update DSM using the downloaded pat file.
- Download the latest version Source code (zip) from https://github.com/007revad/DSM_Update/releases
- Save the download zip file to a folder on the Synology.
- Unzip the zip file.
Optionally you can to edit the variables at the top of the script. The default settings are:
# Temporary directory for .pat downloads (cleaned up after install)
# $$ gets the PID of the script
PAT_DIR="/tmp/dsm_update_$$"
# Log file
LOG_FILE="/var/log/dsm_update.log"
# Maximum log file size in bytes before rotation (default 1MB)
LOG_MAX_SIZE=1048576
# synodsmnotify user to receive notifications (leave empty to notify all admins)
# If not empty all admins and users will receive notifications
NOTIFY_USER=""
You can run the script with the following options:
--force-check
--dry-run
--force-check forces DSM to check if there's a DSM update available.
--dry-run will just notify you that the script has detected that a newer DSM version is available, without downloading or installing it.
See How to run from task scheduler
How to enable SSH and login to DSM via SSH
sudo -s /volume1/scripts/dsm_update.shNote: Replace /volume1/scripts/ with the path to where the script is located.
If the script won't run check the following:
- Make sure you download the zip file and unzipped it to a folder on your Synology (not on your computer).
- If the path to the script contains any spaces you need to enclose the path/scriptname in double quotes:
sudo -s "/volume1/my scripts/dsm_update.sh" - Make sure you unpacked the zip or rar file that you downloaded and are trying to run the dsm_update.sh file.
- Set the script file as executable:
sudo chmod +x "/volume1/scripts/dsm_update.sh"