I think so, you’d just need to not add any other instances on your instance settings. Not 100% sure. I just started my own instance a couple of days ago. And I could not connect to other communities unless I whitelisted them in settings. Also there’s a bunch of options and variables in configuration files that enable/disable activitypub.