Download the PHP package ernestdefoe/federation without Composer

On this page you can find all versions of the php package ernestdefoe/federation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package federation

Federation (ActivityPub) for Flarum 2

Latest tag Flarum 2.0+

Put your Flarum community on the fediverse. Once enabled, anyone on Mastodon, Lemmy, Misskey, Akkoma or any other ActivityPub server can follow your community — and individual members — and receive every new discussion right in their home timeline. Replies and likes from those servers flow back into your forum as posts.

It implements the parts of ActivityPub that make a forum a good fediverse citizen: WebFinger discovery, signed delivery (HTTP Signatures, the same scheme Mastodon uses), a community Service actor, per-member Person actors, and inbound Follow / Undo / Create / Delete handling.

No core files are modified. Every endpoint lives under /federation/* and /.well-known/*, wired purely through Flarum's extender API, so the extension survives core updates untouched.


Table of contents


How it works

Your community is published as a single Service actor at @{community}@{your-host}. Each member is also published as a Person actor at @{member}@{your-host}.

When a member starts a new discussion:

  1. The community boosts (Announce) the discussion's Note to everyone following the community. Because the boost comes from the actor those people actually follow, it lands in their home timeline — with the original author's attribution preserved (the remote server dereferences the Note and shows the member as the author). This is the standard fediverse "group/relay actor" pattern.
  2. The discussion is also delivered as a normal Create to anyone following that member directly.

When someone on a remote server replies to a boosted/announced discussion, the reply is verified and imported as a federated post in the thread, authored by a mirrored local "federated" account. A remote Delete removes that post again.

Why a boost and not just a Create to community followers? Mastodon's home timeline only shows posts from actors you follow. If member discussions were sent to community followers as a Create authored by the member, the remote server would accept them and then silently drop them (you don't follow that member). Announcing from the community actor is what makes "follow the community → see every discussion" actually work.

Outbound delivery is queued (DeliverActivity), so a slow or dead remote never blocks a page load.

What federates (and what doesn't)

Event Behavior
New public discussion Boosted to community followers + Create to the author's own followers
Remote Follow of the community or a member Stored; a signed Accept is returned
Remote Undo Follow Follower removed
Remote reply to a federated discussion Imported as a post in the thread
Remote Delete The imported federated post is removed
Replies by your local members Delivered to the author's followers + remote thread participants (not boomed to all community followers, to avoid timeline noise)
Private discussions, hidden discussions, PMs Never federated

Requirements

Installation

Then open Admin → Extensions, enable Federation (ActivityPub), and turn on the Enable federation setting (see below).

To update later:

Configuration

Admin → Federation (ActivityPub):

A 2048-bit RSA keypair for the community is generated automatically the first time it's needed and stored in settings; each member's keypair is generated lazily the first time their actor is fetched. There is nothing to configure by hand.

⚠️ Pick the handle name once. Changing it after people have followed will break their existing follows (the handle they followed no longer resolves).

Following your community

From any fediverse server, search for your handle and hit follow:

A member's handle is shown on their profile card once federation is enabled.

Endpoints

All are read-only GET unless noted, and all return 404 while federation is disabled.

Path Purpose
/.well-known/webfinger?resource=acct:{user}@{host} Discovery → resolves to the community or a member actor
/.well-known/nodeinfo, /nodeinfo/2.0 Server metadata for crawlers
/federation/actor The community Service actor
/federation/outbox Recent public discussions as Create activities
/federation/followers The community's followers collection
/federation/inbox (POST) Signed inbox for the community
/federation/notes/{id} The Note object for a discussion
/federation/users/{id}/actor A member Person actor
/federation/users/{id}/outbox A member's recent discussions
/federation/users/{id}/followers A member's followers collection
/federation/users/{id}/inbox (POST) Signed inbox for a member

Security

Troubleshooting

FAQ

Does this modify core or other extensions? No. It only adds routes, a couple of nullable columns (on users/posts) and one table (federation_followers), all through the extender API.

Can I use a subdomain handle like @[email protected]? Yes — the handle host always matches your forum's configured URL. Whatever host your forum runs on is the host in the handle.

What happens to existing discussions? They're listed in the outbox and are fetchable as Notes, but only discussions created after someone follows you are pushed to their timeline (that's how the fediverse works).

Disable cleanly? Turning the setting off makes the community disappear from the fediverse immediately. Disabling the extension stops everything; the data columns/table remain until you uninstall.

License

MIT © ernestdefoe


All versions of federation with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-openssl Version *
flarum/core Version ^2.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ernestdefoe/federation contains the following files

Loading the files please wait ...