Server turns itself off

Hello!

So I am hosting a server on a debian VPS.

I would like the server to be running 24/7, but for some reason it shuts itself off every couple hours.

It’s like maybe 1 or 2 hours from when PuTTy logs me off of the VPS.

Tried running it with screen instead of bash, but then the server doesn’t come up on the server list.

How can I fix this?

Thanks in advance
Szymon

Any errors when it shuts off? If not then you could just make your .bat restart the server if it crashes.

No errors. As long as the PC connected to PuTTy runs, it’s fine. Server shuts off like 1 maybe 2 houslrs after PuTTy disonnects from the server.