Making a Linux home server sleep on idle and wake on demand — the simple way
It began with what seemed like a final mundane touch to my home server setup for hosting Time Machine backups: I wanted it to automatically sleep when idle and wake up again when needed. You know, sleep on idle — hasn’t Windows had that built in since like Windows 98? How hard could it be to configure on a modern Ubuntu install?
To be fair, I wanted more than just sleep on idle, I also wanted wake on request — and that second bit turns out to be the hard part. There were a bunch of dead ends, but I stuck out it to find something that “just works” without the need to manually turn on the server for every backup. Join me on the full adventure further down, or cut to the chase with the setup instructions below.
There's a newer, improved version of this guide that's also open for community contributions. Read the latest version »
tl;dr
Home Server PC - High power consumption! - Ubuntu Linux - Mostly sleeps, wakes up on demand Wake-on-LAN: unicast packets Raspberry Pi (or similar) - Low power consumption - Ubuntu Linux - Always-on SSH AFP ... Network services Network services ARP Stand-in Avahi ... Time machine backups ARP queries for Home Server mDNS queries for Home Server
Outcome:
Server automatically suspends to RAM when idle
Server automatically wakes when needed by anything else on the network, including SSH, Time Machine backups, etc.
You’ll need:
... continue reading