If you've actually been hacked you want to get your data off to another computer and then wipe the hacked server. You can try and run a rootkit to see if it can detect any signs of being hacked.
Before using any files from the serer, check them carefully for virus and trojans.
If you just locked yourself out of the server by mistake, boot into single-user mode and reset your password.
Either way, unplug the network cable until you figure out if you've been hacked or not.
Two instances of AdGuardHome ... though tempted to switch to the new Gravity.