Discourse and the Fediverse!

Two years ago, we started working on a plugin that brings Discourse and the Fediverse closer together. Discourse communities are online spaces that facilitate open collaboration and communication. The Fediverse offers ways to expand the reach of Discourse communities and help them build bridges with people active in other spaces, all while keeping the conversation civil, meaningful and focused. This post will describe how the ActivityPub plugin works and how you can enable your Discourse community to connect with other communities or Fediverse users.
What is the Fediverse?
The Fediverse is a decentralized social media network. Fediverse users typically join any one of many available servers on a given network and that server shares activities (posts, likes, replies, follows, mentions) with other servers. There are many different types of server networks in the Fediverse: Mastodon, Lemmy, Pixelfed, Pleroma, to name a few. Other web applications have also recently embraced the Fediverse: blogging platforms like Wordpress or Ghost, social news platforms like Flipboard and, of course, community forum software like Discourse.
At Discourse, we share the Fediverse’s focus on openness, decentralization and user data ownership. That is why we have invested in establishing interoperability via ActivityPub, we see it as a natural extension of our values and an important step towards a more connected, open web.
Discourse's approach to ActivityPub
There are some clear parallels between social media and forum software. Both deal with social interactions between people in an online setting. However, they differ in a few key ways. On social media, users follow other users and consume content by scrolling a main, central feed or timeline. Posts on forum software, on the other hand, are typically organized around topics, which are further organized by taxonomies such as categories and tags. A user in a community devoted to a programming language, for example, can see a list of the latest topics on the homepage and also filter topics to narrower subjects (specific implementations, help, feedback) using categories or tags.
The Discourse ActivityPub plugin bridges these differences in two ways. First, it turns Discourse categories and tags into “actors” that Fediverse users can follow. This opens up access to these categories and tags for users of social media: they can see content from the community directly in their feed. At the same time, it enables Discourse users to see the same content in the community's own structure based on categories and tags.
Second, the Discourse ActivityPub plugin allows administrators to either federate all of the posts in each topic (“Full Topic” federation) or just the first post (“First Post” federation). On social media, the “original post” often has a primacy and importance that the replies do not. In forum software, by contrast, the original post in a topic is often just the start of a discussion, and may not necessarily be more important than the replies. Our plugin enables both modes of engagement, allowing administrators to choose for some categories or tags to just share the first post of a topic with their followers in Fediverse, and other categories or tags to share all of the posts in a topic.
A practical example
The ActivityPub plugin is installed and enabled on our main support community at meta.discourse.org, and it is configured to publish several categories and tags. The ai tag, for example, has Full Topic federation enabled. Posts and replies made on meta can be seen by users in other ActivityPub applications simply by following “@discourse-ai@meta.discourse.org”. I follow this handle on Mastodon, this way I can see all of the AI tagged discussions from Meta in my main feed there, automatically.
The Announcements category on Meta also has ActivityPub enabled using the First Post publication type. That means that people following “@announcements@meta.discourse.org” can see the first post of Meta announcement topics in their ActivityPub application of choice. For announcements on social media, the First Post approach is a better fit; the original post has a clear importance, an attentional currency, that the replies do not.
Discourse to Discourse integration
ActivityPub integration also unlocks bidirectional content publication between Discourse communities. A great example of this is the activitypub tag on Meta and the Discourse category on socialhub.activitypub.rocks. The two Fediverse actors follow each other and this benefits both communities: discussions on meta.discourse.org surrounding “activitypub” are relevant to people on SocialHub (a community about ActivityPub), and, vice versa, discussions around Discourse on SocialHub are relevant to Meta community members. Users of each community don't have to leave one community to see what's new in the other.
And there you have it! A quick overview of how Discourse communities can join the Fediverse and connect and collaborate with other Discourse instances and platforms across the decentralized web. Whether you're sharing announcements, hosting technical discussions, or collaborating across communities, federation makes it easier to extend your reach and engage with users where they already are.
If you’re running a Discourse instance and want to try it out, the plugin is available today.