I monitor the DSM version on my Synology NAS with my icinga2 instance and sometimes alerts pop while I'm not in a position to run the upgrade using the normal GUI process.
This is rare enough that I almost always find myself trying to remember how to do it via ssh(1) and after flailing around aimlessly for a while I ultimately figure it out. This time I figured I'd write it down so I can at least find it in the future.
Basically synoupgrade is what you want.
admin@nas01:/$ sudo synoupgrade --check
Password:
UPGRADE_CHECKNEWDSM
Available update: DSM 6.1.3-15152 Update 7, patch type: smallupdate, restart type: none, reboot type: now
admin@nas01:/$ sudo synoupgrade --download
UPGRADE_DOWNLOADDSM
New update has been downloaded
admin@nas01:/$ sudo synoupgrade --start
UPGRADE_STARTUPGRADE
Start DSM update...
Finish DSM update, reboot now!!
Broadcast message from root@nas01
(unknown) at 19:00 ...
The system is going down for reboot NOW!
Update 2022
This still works as of DSM version 6.2.4-25556 Update 6.