Why fediverse apps always need a subdomain?

Hi there o/
(I’m french, but let’s try in english for accessibility. Therefore, sorry for language issues :wink:)

It seems that all the available apps using the ActivityPub/federation mechanism (Mastodon, Pleroma, Plume, etc.) require a dedicated domain, and I wonder if there’s a particular technical reason for that?

I know that YunoHost packagers usually follow the developers’ recommendations for that, but it’s strange that all the developers of such apps did the same recommendation, so… does the ActivityPub protocol need that?

(Moreover, I would like to be known on the fediverse with the classical login@maindomain, as for mails and XMPP (well, probably @login@maindomain here), so if you know any available app that can be installed without blocking all the main domain, please let me know; but I started this post mainly for the technical explanation, being curious)

Les services ActivityPub/Fediverse ont besoin d’un domaine dédié par-ce-que sinon, tu pourrais installer plusieurs services ActivityPub sur le même domaine, qui essayeraient tous de s’occuper des mêmes messages provenant de l’extérieur.

Il faut noter que si tu installes un service ActivityPub sur un domaine, tu peux généralement continuer à utiliser ce domaine pour email/XMPP, par-ce-que ces derniers n’utilisent pas les mêmes ports.

ActivityPub/Fediverse services need a dedicated root domain because otherwise, you could have multiple ActivityPub services on the same domain trying to capture and interpret the same incoming messages.

Note that you can still use the domain you installed an ActivityPub service on for email/XMPP, as those use separate ports.

Thanks for the answer :slight_smile:
Yep, I did understand that several fediverse app can’t be at the same time on the same domain, that seems logical.
The thing that bothers me is that, currently, no app can be in the same domain than a fediverse one, even if it’s absolutely not related to the fediverse.

For instance. I’d like to have the same adress on every protocol I can run on my sever, for obvious simplicity reason. I also want to allow people to talk to me using my personal favorite protocol (XMPP) without efforts. So, for the latter, I installed Converse, and configured it to allow anonymous connections (if you go to the converse page on my main domain, it directly shows a chatroom to talk to me).
In such a case, if I want to be on the fediverse, I need to have several domains: either one for both the base accounts (Fediverse & XMPP) and the other for Converse, or one for XMPP (both the account and Converse) and the other for Fediverse. Doesn’t make any sense for me.

Note that I’m not saying that YunoHost people did something wrong: I guess that it would be complicated to automatically check if an app is or is not fediverse-related, and I understand that some advanced exclusion mechanisms (allowing to install Pleroma with Etherpad, but not with Friendica, for instance) would be hard to deploy. So I’m not yelling after your amazing work at all :wink:

(I don’t know how it works, but I saw that Synapse is able to be installed on a given domain, and serve accounts using another one, which may be a way to avoid such a problem with the Matrix protocol.)

Several apps in yunohost catalog can’t be installed on a subpath just due to the way its coded (root domain assumption).
I don’t know which is the status on fediverse apps about that point, but it’s possible that’s the reason number one why you cannot have mastodon + etherpad on same domaine.

YunoHost is currently unable to have one app installed on domain.tld/ and another on domain.tld/foo/ . In fact we don’t know if the first app upstream need a foo directory/path or not. So to avoid some conflict we have decided several years ago to forbid to install an app on a subpath if another one is already installed on /.

In more, installing on subpath could be a security problem if we made error in config. Having your domain on a subdomain allow you to migrate it onto another server (independently of others apps).

So the problem you point is more general than fediverse app. And you are right, it’s quite difficult to identify which apps could be in conflict with an other. A new package system is in project for a better resource management, but the question you ask for is a very difficult problem.