Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>I than proceeded to put a Pi next to it, that would listen to incoming Plex requests and would start up and shut down the server with WoL.

How hard is this to configure? I have a server at home I use to run a database and computational heavy code, however I am the only user so realistically it is only in use 8 hours a day and some weekends etc. However in the fear of forgetting to turn it on before I go to work (or if I suddenly find time to work while away) I find that I default to leave it on. Being able to control it would be fantastic.



> How hard is this to configure?

Not at all. Just ensure that you have WoL enabled on the host machine and than proceed to send a magic packet. You could even do this with Home Assistant [1] if you are into that. I did this with a script that used tcpdump to monitor for incoming traffic [2] for Plex with an additional (dummy) Plex server on the Pi. I also remember faintly that I had to add 1 library and 1 video file to make this work though.

Powering down - or sleep - is a bit harder. I built a 'Sleep on LAN' app [3] for myself years ago that could power down (or sleep) a system on demand using a REST API. I used this and Tautulli [3] with Home Assistant that would check if there were any active streams and if there wasn't any activity for a specified amount of time I would send a SoL request to my service.

As you can see it isn't super hard or complicated, but a bit cumbersome to find all the moving bits and make it work. But when it does, it's IMHO fantastic.

1. https://www.home-assistant.io/integrations/wake_on_lan/

2. https://gist.github.com/alex3305/8cc73ddd2c8ca6328f20235480a...

2. https://github.com/alex3305/sleep-on-lan

3. https://tautulli.com/


If it's just that, you can have a Pi next to it and just ssh in to send a WoL command. Basically nothing to configure.

You can make it simpler to use by making an alias in your shell, or a button on your phone (with one of the countless "ssh button" apps). Or even make a web page for it (some php or python that just calls the WoL function).

OP describes a more transparent (and complex) setup where the Pi presumably acts as a reverse proxy. I'd be curious to know the exact setup too, one of the simplest ways would be to use wake on unicast: https://news.ycombinator.com/item?id=35627107

Other ways include wrapping some scripts around socat, writing your own proxy, systemd socket activation, etc.


I used tcpdump with a dummy Plex server that listened to incoming requests [1]. Because those request are automatically generated when a user opens up the Plex app. And I than proceeded to send a WoL request.

A reverse proxy would of probably worked too, but I didn't want to be limited by the 100Mbps network interface of my Pi 3B.

1. https://gist.github.com/alex3305/8cc73ddd2c8ca6328f20235480a...




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: