Used to be possible by ticking both federation and private on the admin page. But now they made it where you can't toggle both simultaneously.
I'd like to see that return as a feature. I'd like to have my local instance have private communities for my users but still provide my users the ability to go out to the rest of the fediverse. My instance is friends of friends sort of stuff. So I have no reason to host communities out to the whole of the fediverse.