When you think about home labs, you’ll probably imagine powerful, multi-CPU setups with ungodly amounts of memory. Although enterprise-grade systems are terrific for computing projects, old systems can also double as solid workstations for your DIY ideas and self-hosting projects once you pair them with the right operating systems.
And I don’t just mean fairly recent systems, either. I tried reviving a decade-old laptop – a cheap one at that – with Proxmox a few weeks ago, and it now serves as a neat LXC-hosting rig. That said, ancient PCs may lack some essential home lab functionalities, and you might need to look into workarounds to implement some useful features into your dinosaur machine. Restore on AC Power Loss is one such utility, and WakeMyPotato is the workaround in question.
What’s WakeMyPotato, anyway?
And how does it work?
If you’ve never heard of Restore on AC Power Loss or WoL, here’s a brief explanation of their utility. When you’re hosting essential services on your server PC, you’ll want a quick way to get it out of sleep (or even powered down) mode – and that’s where Wake-on-LAN and Restore on AC Power Loss come in handy. The former lets you send a magic WoL packet from another system on the same network to your workstation to bring it back online, while the latter automatically reboots your PC once it detects AC power has been restored.
Although modern systems support both functionalities, their outdated counterparts may not. The WakeMyPotato script by developer pablogila doesn’t exactly implement WoL, but adds a decent alternative for it. In the event of a random outage, WakeMyPotato essentially acts as a systemd service that safely turns off your system and wakes it back up once AC power is restored. This makes it quite useful for old laptops that you wish to revive as servers, as its automatic shutdown feature meshes well with battery-powered nodes and ensures that your storage drives remain unharmed by sudden shutdowns.
Alternatively, you can also use WakeMyPotato with a normal, battery-less PC. Sure, you won’t be able to get the safe shutdown facility, but you can configure the script to auto-restart your system after a specific period of time.
A must-have tool if your home lab is cursed with outages
If you’re wondering about the utility of WakeMyPotato, it’s got a couple of neat uses. For instance, I live in a backwater town that’s afflicted with constant blackouts. Between all the SBCs and power-hungry server rigs in my arsenal, budget-friendly UPS can’t handle the brunt of all my self-hosting nodes. This includes my old laptops, which only draw power from a normal socket and have to rely on their own batteries during outages.
Running WakeMyPotato on laptops that don’t support WoL is a great way to add auto-restart to them. Not to mention, the script can schedule restarts whenever the AC power goes down, so I don’t have to worry about data corruptions caused by unexpected shutdowns.
Configuring WakeMyPotato
It’s pretty simple
Contrary to what you may believe from a systemd service, WakeMyPotato is fairly easy to set up. Assuming your system already has git installed (if it doesn’t, you’ll want to run sudo apt install git -y in a terminal), you can run the git clone https://github.com/pablogila/WakeMyPotato.git command to grab the files from the official repo. Then, you’ll want to use cd WakeMyPotato to switch to the newly-created directory before running sudo bash install.sh to launch the installation wizard.
If you’re planning to set up WakeMyPotato on Proxmox, you’ll need to install the upower package with the apt install upower command.
Soon, the wizard will prompt you to enter the amount of time (in seconds) you want your PC to wait before it initiates auto-restart. By default, WakeMyPotato sets this limit to 600 seconds, though you’re free to modify it even after assigning this value in the setup wizard. With WakeMyPotato configured, you can run the sudo wmp start command to initialize it. Keep in mind that your PC will reboot immediately after running the script.
In case the system doesn’t restart on its own after the specified time, you can reboot it manually and run sudo wmp status or sudo wmp log to diagnose the issue. A faulty BIOS battery could be the culprit, and it’s something I realized after failing to set up this service on an ancient PC. Alternatively, you can run sudo wmp check, followed by the number of seconds you want the PC to wait until auto-reboot triggers to confirm whether the script works as expected.
WakeMyPotato is an amazing addition for old systems
I’ve enabled WakeMyPotato on two separate systems – a laptop running Proxmox, and an old PC running Debian – and the script works like a charm on both setups. While I wouldn’t use it as an alternative to WoL or Restore on AC Loss, it’s still quite useful as a last resort on ancient systems.