I have a personal Debian server set up, that I'm able to access in person and remotely, but normally I'm away from it and it's remote. It's on a battery-backup surge protector, but sometimes that isn't enough to keep the server on through a power outage. The machine automatically starts and boots, but its left at the login screen (in person). What I want to know is, what is the best way to have the server get itself back on and online after it loses power, without leaving it vulnerable in person? I'd like it to not auto-login for the screen in person, so that the machine isn't overly vulnerable in-person while I'm away.
Are there battery backups that signal for hibernation or other safe power down automatically? How can I have a user sign in automatically in the background? What would you recommend as a "best practice" for this, considering it's just a home server?