To keep a McBook from falling asleep when you close the lid, you need to buy and use a dummy HDMI connector that makes it believe it is connected to an external display.
It's funny how everyone acts like this stuff works, but then I try to log in and it's asleep. If it were easy, there wouldn't be a thousand ways to do it that are all incapable, it would just be a setting.
How to keep a Mac Mini from going to deep sleep so it can be used as a little server? Answer: install Linux.