Mastodon servers don’t have to communicate with other servers. They can be run in “Limited Federation” mode, where all other servers are blocked by default. This can be left as it is for a totally isolated community, or an “allowlist” can be introduced which allows specifically selected servers to communicate.
If you want to do this with Mastodon, there’s a web page with instructions and tips on Limited Federation mode here ⧉ and there’s a technical description of Limited Federation mode ⧉ in the official documentation.
Allowlists vs Blocklists: How do they differ?
In normal mode, Mastodon servers can communicate with other servers unless the server admin blocks them. This is known as a “blocklist” system, because it depends on the admin telling their server which other servers to block.
In Limited Federation mode, it’s the opposite way around. No servers can communicate with the server unless the server admin specifically allows them. This is known as an “allowlist” system, because it depends on the admin telling their server which other servers to allow connections with.
How do I set my server to Limited Federation mode?
You’ll need to be a server admin to change your server’s federation.
If the server is on a managed hosting company, the admin will need to ask the hosting company to switch the server over to Limited Federation mode.
If the server has been set up manually by the admin, they will need to make the adjustments manually by consulting the official Mastodon documentation on federation ⧉.
Will the apps work with a server in Limited Federation mode?
There may be problems with some app store apps working with servers in Limited Federation mode. You might want to have a look at the guide linked to above ⧉ for more info on which apps work.