In this tutorial you will learn to make your server 24/7 using windows. (should be similar for all versions)
Steps:
1.)First click on start and go to the control panel
2.)Click on system and security
3.)Click on power options
4.)Go to your current power setting and choose "change plan settings"
5.)Click on "change advanced power settings"
Now we can get started on what really matters.
Hard disk
Make sure the "Turn off hard disk after {0} time" is set to never when plugged in.
Sleep
Make sure the "Sleep after" section options are set to never, same with hibernate.
Power buttons and lid (big hancho)
The "Lid close action" should be, when plugged in, "Do nothing". This ensures your server does not get shut down.
The "Power button action" should also be set to "Do nothing" when plugged in, same with sleep button.
That is pretty much it, your pc will run over night. Nothing bad should happen to your computer, just make sure to do regular updates as usual. This is how I keep my servers up.