Can mastodon run in a multi-tenant environment? #1

Closed
opened 2026-05-22 15:34:41 +02:00 by vanrein · 4 comments
Owner

Nice idea, to have "static" containers that change the domains/users that they host; but does it work for Fediverse services, specifcally Mastodon?

Nice idea, to have "static" containers that change the domains/users that they host; but does it work for Fediverse services, specifcally Mastodon?
Author
Owner

From the protocol:

  1. Mastodon implements ActivityPub
  2. ActivityPub communicates via outbox and inbox
  3. These are URLs, often on a webserver, involving a domain name and/or user
  4. At least in theory, this can be done

From the software:

  1. The Mastodon repository is a Ruby program
  2. Mastodon has a setting ALTERNATE_DOMAINS that it recognises, without further processing
  3. It would be a simple patch, I'd guess, but it is not built for multi-tenant use

YES on the protocol, NOT YET on the Mastodon software.

From the protocol: 1. [Mastodon implements ActivityPub](https://docs.joinmastodon.org/) 2. ActivityPub communicates via [outbox and inbox](https://www.w3.org/TR/activitypub/#outbox) 3. These are URLs, often on a webserver, involving a domain name and/or user 4. At least in theory, this can be done From the software: 1. The [Mastodon repository](https://github.com/mastodon/mastodon) is a Ruby program 2. Mastodon has a setting `ALTERNATE_DOMAINS` that it recognises, without further processing 3. It would be a simple patch, I'd guess, but it is not built for multi-tenant use **YES** on the protocol, **NOT YET** on the Mastodon software.
Contributor

thanks, this seems like it should be viable, yeah.
a related ticket: fediversity/fediversity#322.
for reproducing such setups, on the nixos side this may involve fediversity/fediversity#621 if we wanted to not drop down from the abstraction level of service modules.

thanks, this seems like it should be viable, yeah. a related ticket: fediversity/fediversity#322. for reproducing such setups, on the nixos side this may involve fediversity/fediversity#621 if we wanted to not drop down from the abstraction level of service modules.
Author
Owner

And I would assume it'd be welcomed by the people in the fediversity too.

I was surprised to see that all Mastodon hosting offers (that I found) are based on VPS hosting, and, though $6/mo is not that costly, seem to be charged at higher fees than I'd find believable for a simple microblogging facility.

Essentially, what'd be required is a mapping from the HTTP URI to a (prefix for) the storage locations of files, redis and postgresql tables.

That's if we want to not drop to the concrete, of course. But less "moving parts" as you so nicely put it, is usually a Good Idea™ :-)

And I would assume it'd be welcomed by the people in the fediversity too. I was surprised to see that all Mastodon hosting offers (that I found) are based on VPS hosting, and, though $6/mo is not _that_ costly, seem to be charged at higher fees than I'd find believable for a simple microblogging facility. Essentially, what'd be required is a mapping from the HTTP URI to a (prefix for) the storage locations of files, redis and postgresql tables. That's _if_ we want to not drop to the concrete, of course. But less "moving parts" as you so nicely put it, is usually a Good Idea™ :-)
Contributor

(for reference, @vanrein also wrote a bit on this at the first section of https://git.fediversity.eu/vanrein/architecture/src/branch/master/thoughts.md)

(for reference, @vanrein also wrote a bit on this at the first section of https://git.fediversity.eu/vanrein/architecture/src/branch/master/thoughts.md)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
vanrein/architecture#1
No description provided.