Mastodon Integration


Mastodon can be run from a docker image.

I wonder if someone here has set up Mastodon so it reuses the data and redis images from Discourse docker, or how to do it.

I wish we document it, since there’s no reason why running Mastodon from Docker would create extra instances for services that already come with Discourse. Therefore this post is set to evolve and integrate the step-by-step modifications to Mastodon install so that it can co-exist with an existing Discourse multisites install with separate containers for PostgreSQL and Redis.

Then it can also include extra documentation, such as:

  • adding a user field for the local Mastodon instance
  • integrating the local Mastodon instance feeds into a dedicated Discourse category, with a topic for each user feed (I see the autobot plugin may do that, but I’d rather use an ATOM/RSS specific plugin for that. Should we think about a dedicated Mastodon plugin?)
  • post from Discourse to Mastodon.

(Rafael dos Santos Silva) #2

If you are running Mastodon using docker-compose, you can run Discourse using the web_only template and point to the existing redis and pg containers.


My situation is exactly inverse: I have a Discourse running, and want to install a Mastodon instance without relying on Mastodon’s db and redis images since I already have them with Discourse.

EDIT: maybe you’re right, since Mastodon docker images use Alpine, they may be lighter.