I am preparing a new series of blog posts about my home server setup using an old Dell Latitude 5490. This setup is designed to power on when a smart plug activates and to shut down safely when the plug turns off. To achieve this, I configured the BIOS settings (power on) and set up a cronjob for Proxmox (power off). This blog series will cover these configurations and the overall process.

I am setting up a home server using Proxmox with a focus on power efficiency. To achieve this, I am willing to compromise server availability. I’ve decided to use a smart plug to control the power and rely on the laptop’s battery to ensure a safe shutdown.

Power on setup

To power on the laptop when AC power is restored, I activated the Wake-on-AC feature in the BIOS: dell 5490 BIOS AC wakeup

Power off setup

To power off the laptop, I developed a cronjob that runs every 5 minutes to check if the laptop is connected to AC power:

To add the script to your Proxmox, place it in your directory and make it executable:

chmod +x /root/safe-shutdown.sh

Execute the cronjob editor:

crontab -e

Add the following line:

*/5 * * * * sleep 70 && sh /root/safe-shutdown.sh