You can host an instance on any pc you can install stuff on or run docker containers on.
The issue, as the other commenter said, is that the computer needs to run so that it can catch and send federated stuff. Otherwise you are an island which can be a good usecase for a school or small company but not generally.
A probable usecase would be an old pc which you leave running or a raspberry pi. You route the federation ports through your router and nothing else. That way you have full federation and very few attack vectors. The most secure way to use it is locally on your network or by connecting via vpn.