[Mod] Federation

Started by Deaks, Nov 27, 2026, 10:15 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Deaks

🌐 Federation 1.0.2
Connect your SMF forum to the Fediverse with ActivityPub, part of the BoredSkull mod collection



What if people on Mastodon and other Fediverse servers could follow your forum's boards and see new topics in their feeds, without signing up?

Federation is a brand-new, hook-based ActivityPub implementation for SMF 2.1. You choose which public boards to share, remote followers see your new topics, and nothing from outside reaches your forum until a moderator approves it.

✨ What it does
  • Boards become Fediverse accounts: any guest-public board you enable can be followed from Mastodon and other servers, as [tt]@board-1@yourforum[/tt].
  • New topics go out automatically: new public topics are published to followers. Edits send an update, and removals send a delete.
  • Identities for members (optional): members can opt in to their own address ([tt]@member-12@yourforum[/tt]). They can follow remote accounts, manage their followers, and read a private feed of approved activity.
  • Everything incoming is moderated: remote follows, posts, likes and boosts wait in a review queue, and you can view each signed payload before approving or rejecting it.
  • Delivery queue: outgoing activity is queued, signed and retried automatically, with a status screen and a manual retry button.
  • Domain blocks: cut off any server, and every subdomain under it, in one go.
  • Diagnostics: one screen checks HTTPS, OpenSSL and cURL, and lists the discovery URLs to test.

🛡οΏ½ Privacy and security first
  • Off by default: nothing is federated until you switch it on and opt in each board yourself.
  • Only boards guests can genuinely read can be enabled. Visibility is checked again every time content is served or delivered.
  • If a topic is moved to a private board, unapproved, recycled or deleted, it stops being served and a delete is sent to followers.
  • Requests in both directions are signed with RSA-SHA256, and signatures on incoming activity are verified.
  • Private signing keys are encrypted with AES-256-GCM.
  • Remote fetches are protected against SSRF: private, reserved and tunnel addresses are blocked, and only HTTPS on port 443 is allowed.
  • Rate limits for each IP address and each remote domain.
  • Hooks only: no SMF core or theme files are edited.

🧩 Works with the BoredSkull collection
Approved activity is passed on through the [tt]integrate_federation_approved_activity[/tt] hook, so mods like Activity Stream, Profile Wall and Community Insights can pick it up. Federation doesn't require any of them.

βš™οΈ Before you switch it on
Federation needs a bit more setup than most mods:
  • An HTTPS forum with a valid certificate
  • PHP with OpenSSL and cURL (mbstring recommended)
  • Two rewrite rules for WebFinger and NodeInfo (Apache and nginx examples included)
  • A cron job to run the delivery worker, e.g. every 5 minutes
The included [tt]docs/DEPLOYMENT.md[/tt] walks through every step and has a checklist for testing with an account on another server.

📌 Good to know
  • Remote posts appear in the moderated feed. They are not turned into SMF topics or replies.
  • New topics are federated. Replies within topics are not.
  • Once something has been federated, remote servers may keep their copy even after a delete.

🆕 What's in 1.0.2
  • Delivery through shared inboxes, so each remote server gets a public post once, not once per follower
  • Followers are checked again before each delivery
  • Followers can be listed and removed; a daily review limit applies to each remote server
  • Topic removal, approval and move hooks, with a background check that catches other changes
  • Approved topics that had been withdrawn are restored safely under a new ID
  • Wider HTTP signature support and WebFinger handle lookup
  • Every message is now translatable, and federation is treated as off if guest access is switched off
  • Upgrades directly from 1.0.1 or any 1.0.2 test build, keeping all settings, keys and followers

📦 Details
  • Compatibility: SMF 2.1.x
  • Licence: ISC
  • Languages: English
  • Settings: Admin β†’ Configuration β†’ Modification Settings β†’ Federation
  • Member page: Profile β†’ Modify Profile β†’ Federated identity

Try it with your Mastodon account, and let us know how it gets on with other Fediverse servers!
Questions, bugs or ideas? Reply below! 💀
  • 0 reactions

    Members who reacted