I have several NAS servers at home (one for Media, other for Backups…) so in order to extend shelf life, not all of them are on all the day. However, there are some situations in which I need to have access to a server, but it could be off and maybe i’m not at home. In that case, I have a way to turn on the Synology NAS remotely from another server.
Wake On LAN
Wake-on-LAN (WOL) is an Ethernet standard that allows a machine to be turned on by a network message. The idea is to send from a server of your network (for example, a Raspberry Pi) this magic message to the Synology NAS in order to wake it up.
Configure WOL in Synology NAS
The first step is to activate this functionality in our Synology NAS. You can find the feature in the DSM Menu Control Panel -> System -> Hardware & Power -> Enable WOL on LAN.
Get the MAC from your Synology
The MAC address of your NAS is the next important step. To get it, you can find in the DSM Menu Control Panel -> System -> Info Center -> Network -> LAN -> MAC address.
Next step is to install the software etherwake, which will be in charge of send the magic packet.
sudo apt install etherwake
Wake Up the NAS Synology Server
Once installed etherwake in your Ubuntu (or Linux) server, you can send the command to the Synology server, it’s quite easy. Just use the etherwake command and the MAC address of the NAS Synology server you got previously. Note that you have to use the root user to use this command.
And that’s all, your Synology NAS is waking now up.
Now, you could create a bash script in the home of the root user to save the command, and then you won’t need to remember the MAC address.
Insert the code…
#!/bin/bash etherwake 00:11:32:c1:57:55
And give executable permissions to the script:
chmod +x ~/wake_up_synology.sh
Now, you can wake up your synology just executing the script.