Macs run decently as headless servers except for the limit that you cannot use full disk encryption -- the boot process stops and waits for you to provide the decryption key via local keyboard and there is no way around this. If you are concerned about this then you can look at running an encrypted external disk or a partition of an internal disk as an encrypted volume. You still need to decrypt things before everything starts working again but at least the system can boot for remote access. Yes, yes, this is not a secure as having the system fully encrypted and we can all think of various ways something like this can be compromised. It all depends on the threat model you are looking at.