For my work I need to be able to access my home lab “server” frequently but in no way it needs to be always-on. This leaves me with the struggle of leaving it on and, for most of the time, consuming unnecessary electricity or accept the fact that I can’t use it without proper planning.
So I was thinking of a way to have the best of both worlds, no waste of electricity but being able to use it whenever I want.
I thought of a system where I would run a script each evening shutting down the system. The script will prompt for the shutdown so when I’m still using it I am able to cancel the shutdown. This is the easy part, but how to get it on again…… What about that legacy Wake-On-Lan (WOL) protocol?
I started with just a simple WOL program on my Windows 8 company laptop and I was able to turn on the “server”. That’s cool but that doesn’t help because when I’m not at home this just doesn’t work. After a lot of thinking I though about that cool Synology Diskstation I have on my desk.
From one of the Synology forums I grabbed a script and got it working. I ‘m now actually able to turn on my server from anywhere, any time and any place.
Here is a short description of how it works.
First you need to start with setting up Synology Diskstation Web Services.
Go To Control Panel > Web Services and enable a Virtual Host.
Now you’ll find a new folder in your Synology File Station.
Upload index index.php file to that folder.
In the php file find the IP Subnet and change that to your IP subnet, probably 192.168.1.255 (always ends on 255).
At the bottom of the php file you’ll find three lines for systems. Carefully replace the MAC Addresses of the systems you want to be able to WOL.
When you’re ready browse to http://diskstationIP:port/WOL/