Live data from Hacker News

Making a Linux home server sleep on idle and wake on demand (2023)

dgross.ca

101–110 of 115 posts

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#101
post #74

I considered doing something like that but eventually I went for the simpler solution of plugging my little servers into smart plugs. I shut them down, then power off the plug over wifi. I start them by powering on the plugs. The plugs draw very little power. The servers are ARM SoC and draw 1 to 4 W. One of them has an HDD that draws about 10 W but I can unmount and power off it when I don't need that disk and I sti…

Sounds like a neat setup - can you self host the smart plug control (Home Assistant?), or do they connect to third party servers?

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#102

Ha ha, I tried something similar when I had to go to Thailand for my wife's treatment. And failed spectacularly. Fortunately, my laptop had all the files. I didn't have Tailscale at that time. My Desktop, WoL on, tested to be working Android Phone, always on All have SyncThing installed. Mobile had Tasker installed. So, the idea was to have Tasker monitor a folder inside SyncThing, When I need my computer, I put a fi…

You worked with what you had and understood, it was beautiful.

I for one just leave the beast on, I understand that spin-ups and downs are the main thing that wreck harddrives (and my beast has a lot.)

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#103
My server stays powered off but will boot on receiving wol packet. It’s not a sophisticated set up but works for me. I have an always on Rpi running tailscale. I can ssh to it and send a wol from there. Once my server boots I can ssh to it and run the script to mount its data disks - they are encrypted so I need to type a passphrase. Quite a bit of work but I don’t have to do it often.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#104
post #90

Earlier quoted context omitted.

Why don't you send WOL directly over the internet? (You'll need to set up a permanent ARP record on the router.) Or login into the router and send WoL from there? Or have Raspberry always on with ssh? Or set a power-on timer in BIOS/UEFI once a day and a shutdown/sleep in cron? (This is also a good failsafe if WoL doesn't work.)

> Why don't you send WOL directly over the internet? (You'll need to set up a permanent ARP record on the router.) Hm, so never tried something like that before actually, I think for OpenWrt I need to install arp packages. I do not have public IP any more though, was getting hammered by bot network and found Tailscale to do what I need. > Or login into the router and send WoL from there? Restricted outside access to…

I don't think BIOS/UEFI can do power-on timer unless it's server-class hardware? Have not looked into PC BIOS/UEFI for a while.

For failsafe, KVM might be the ultimate solution in case boot got stuck.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#105
post #83

Earlier quoted context omitted.

Not everyone's "home server" is a backup server - some are for AI experiments.

That one should be Wake-On-LAN

I wouldn't want to fiddle with WoL just to get my self-hosted LLM-assisted code-completion working when I pickup my old and underpowered laptop on the couch for some quick hacking. Wake-on-any-network-activity would be perfect, and has superior UX.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#106

Well done. But note: you can grab an ATX control board, or configure the RPi as a USB Gadget to wake the machine via power button or keyboard.

I did this recently as I was struggling to get WoL to work with my consumer PC. It seems like this ultra low-level stuff is a total crapshoot so if you can dodge it by just wiring up the power button, that's a good option. In in the end I just went the whole hog and set up a PiKVM, so now if I mess up the machine's networking (or even completely break the OS) I can still recover it remotely even though it doesn't hav…

I'm absolutely excited for the nanoKVM-PCIe. They were out of stock last I looked, but they've released the firmware source as promised.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#107

Well done. But note: you can grab an ATX control board, or configure the RPi as a USB Gadget to wake the machine via power button or keyboard.

Note: If you're going to use an SBC _only_ for wake up signals, you might want to look into alternatives for the RPi such as the Radxa RockPi S [1]. My home server, for example, runs continuously at 7W, which beats many RPi models. Of course, a Pi to wake things doesn't need that much power and could be an older model, but even then, you'd still be burning "empty Watts". Of course, the RockPi doesn't give you any KVM…

Yea, technically an esp32 board with ethernet would work for this job. They're typically limited to 10mbit, but if you have 10mbit/s of broadcast traffic you can afford something better.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#108
post #74

I considered doing something like that but eventually I went for the simpler solution of plugging my little servers into smart plugs. I shut them down, then power off the plug over wifi. I start them by powering on the plugs. The plugs draw very little power. The servers are ARM SoC and draw 1 to 4 W. One of them has an HDD that draws about 10 W but I can unmount and power off it when I don't need that disk and I sti…

Sounds like a neat setup - can you self host the smart plug control (Home Assistant?), or do they connect to third party servers?

It's a Shelly S. Among the many ways to control it I'm using its local web server to turn on and off the power from my phone, and a curl to do it from my scripts. I'm also polling the url for reading the power level and know when a shutdown is complete, before turning off the power. I think it can be interfaced by home assistant and similar platforms but I never tinkered with them. Self made small scripts are more than enough for my use cases.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#109

Earlier quoted context omitted.

> Why don't you send WOL directly over the internet? (You'll need to set up a permanent ARP record on the router.) Hm, so never tried something like that before actually, I think for OpenWrt I need to install arp packages. I do not have public IP any more though, was getting hammered by bot network and found Tailscale to do what I need. > Or login into the router and send WoL from there? Restricted outside access to…

I don't think BIOS/UEFI can do power-on timer unless it's server-class hardware? Have not looked into PC BIOS/UEFI for a while. For failsafe, KVM might be the ultimate solution in case boot got stuck.

I don't know about UEFI - I don't have any UEFI system - but my Gigabyte 880GA motherboard can certainly do RTC power-on from BIOS settings and it's far from being a server motherboard.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#110

Earlier quoted context omitted.

I did this recently as I was struggling to get WoL to work with my consumer PC. It seems like this ultra low-level stuff is a total crapshoot so if you can dodge it by just wiring up the power button, that's a good option. In in the end I just went the whole hog and set up a PiKVM, so now if I mess up the machine's networking (or even completely break the OS) I can still recover it remotely even though it doesn't hav…

I'm absolutely excited for the nanoKVM-PCIe. They were out of stock last I looked, but they've released the firmware source as promised.

I hadn't seen that before, seems neat as the physical inconvenience factor of the KVM approach is definitely real.

It's pretty funny that you have both the input and output physically installed in and powered by the chassis, but then you run cables to connect them!

It would seem reasonable to at least have the option to have it directly enumerate as a USB hub/display device on the PCIe bus it gets power from! But maybe that would add a lot of bulk/cost?

Post reply on HN