How to be privacy and legally conform with self hosted services that are public reachable in the Internet?

Are there EU legal requirements to services you self host that are public reachable? Is there a difference between services you can only use on your own/family and friends/everyone? Where to put the imprint/data Privacy statement/cookie banner if the service don’t offer these sites it own? Would it be ok to just provide these information on the most top Domain?

Would like to know more about that.