PHPackages                             rivervanrain/activitypub - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rivervanrain/activitypub

ActiveElgg-plugin[API Development](/categories/api)

rivervanrain/activitypub
========================

ActivityPub integration for Elgg

0.3(1y ago)101[1 issues](https://github.com/RiverVanRain/activitypub/issues)AGPL-3.0-or-laterPHPPHP ^8.3

Since Mar 6Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/RiverVanRain/activitypub)[ Packagist](https://packagist.org/packages/rivervanrain/activitypub)[ Docs](https://wzm.me)[ Fund](https://nowpayments.io/donation/elgg)[ RSS](/packages/rivervanrain-activitypub/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

ActivityPub
===========

[](#activitypub)

[![Elgg 6.1](https://camo.githubusercontent.com/5e56803daf43acdcbc882946ff108b984b64e8992175e1c1b01fde39a5ab5e4c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d362e312d707572706c652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/5e56803daf43acdcbc882946ff108b984b64e8992175e1c1b01fde39a5ab5e4c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d362e312d707572706c652e7376673f7374796c653d666c61742d737175617265)

ActivityPub integration for Elgg

About
-----

[](#about)

Implements the **ActivityPub protocol** [1](https://en.wikipedia.org/wiki/ActivityPub), [2](https://activitypub.rocks), [3](https://w3c.github.io/activitypub) for your Elgg app, allowing members to communicate with each other. Users will be able to follow content on Mastodon and other federated platforms that support ActivityPub.

With the ActivityPub plugin installed, your Elgg app itself function as a federated server in **Fediverse** [1](https://en.wikipedia.org/wiki/Fediverse), [2](https://www.britannica.com/technology/fediverse), along with profiles for each user and/or group.

For instance, if your Elgg app is `app.url`, then the app-wide profile can be found at `@app.url@app.url`, and users like Jane and Bob would have their individual profiles at `@jane@app.url` and `@bob@app.url`, respectively.

Inspired by [ActivityPub](https://www.drupal.org/project/activitypub) Drupal plugin by [Kristof De Jaeger aka swentel](https://git.drupalcode.org/swentel) and [Minds ActivityPub](https://developers.minds.com/docs/decentralization/activitypub)

Features
--------

[](#features)

- Allow users to enable ActivityPub for their account
- Enable ActivityPub for Groups
- Allow or block domains from posting to inbox globally and/or per user/group
- [Outbox](https://www.w3.org/TR/activitypub/#outbox), [Inbox](https://www.w3.org/TR/activitypub/#inbox), [Followers](https://www.w3.org/TR/activitypub/#followers), [Following](https://www.w3.org/TR/activitypub/#following) and [Liked](https://www.w3.org/TR/activitypub/#liked) endpoints
- Map Activity types and properties to content types and create posts to send out to the Fediverse
- Discovery via [WebFinger](https://webfinger.net) for locating app, user and group profiles
- Signature verification for incoming activities
- Integration with the [IndieWeb plugin](https://github.com/RiverVanRain/indieweb)

**Supported Activity types**

- [Accept](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accept)
- [Announce](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-announce)
- [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create)
- [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete)
- [Follow](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-follow)
- [Join](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join)
- [Leave](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-leave)
- [Like](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like)
- [Move](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-move)
- [Undo](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-undo)
- [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update)

... more to come

**Supported Actor types**

- [Application](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-application)
- [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group)
- [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person)

... more to come

**Supported Object types**

- [Article](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-article)
- [Audio](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audio)
- [Document](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-document)
- [Event](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event)
- [Image](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-image)
- [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note)
- [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page)
- [Place](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-place)
- [Video](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-video)

... more to come

**Supported Link types**

- [Mention](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-mention)

The plugin has been tested with the following federated platforms:

- [Diaspora](https://diasporafoundation.org)
- [Drupal](https://www.drupal.org/project/activitypub)
- [Elgg](https://elgg.org/plugins/3330966)
- [Friendica](https://friendi.ca)
- [Lemmy](https://join-lemmy.org)
- [Mastodon](https://joinmastodon.org)
- [Misskey](https://misskey-hub.net/en/)
- [Mitra](https://mitra.social)
- [Pixelfed](https://pixelfed.org)
- [Pleroma](https://pleroma.social)
- [Smithereen](https://github.com/grishka/Smithereen)
- [WordPress](https://wordpress.org/plugins/activitypub)
- [Write as](https://write.as)

[Open an issue](https://github.com/RiverVanRain/activitypub/issues) if you have successfully interacted with another platform.

Requirements Elgg plugins
-------------------------

[](#requirements-elgg-plugins)

You need to activate the following [bundled](https://learn.elgg.org/en/stable/plugins/index.html) Elgg plugins:

- **Friends**
- **Groups**: for enabling ActivityPub for Groups
- **Messages** and **Site notifications**: for sending and receiving the direct messages via Fediverse

Suggested Elgg plugins
----------------------

[](#suggested-elgg-plugins)

- [Event manager](https://github.com/ColdTrick/event_manager) to enable `Event` and `Place` object types
- [The Wire tools](https://github.com/ColdTrick/thewire_tools) to allow post and reshare via Groups

Installation
------------

[](#installation)

- You must have the required Elgg version installed.

**Note**: Don't forget to [setup cron](https://learn.elgg.org/en/stable/intro/install.html#set-up-cron)!

- Update server configurations:

**For Apache**

Change this rule in .htaccess:

```
RewriteRule "^.well-known/" - [L]

```

On these rules:

```
RewriteCond %{REQUEST_URI} !^/\.well-known/(webfinger|nodeinfo|x-nodeinfo2)
RewriteCond %{REQUEST_URI} ^/\. [NC]

```

**For Nginx**

Add these rules at the end of your config:

```
location = /.well-known/webfinger {
	try_files $uri @elgg;
}

location = /.well-known/nodeinfo {
	try_files $uri @elgg;
}

location = /.well-known/x-nodeinfo2 {
	try_files $uri @elgg;
}

location ~ (^\.|/\.) {
	deny all;
}

```

See examples in the `/install/config` folder of this plugin.

- Activate `ActivityPub` plugin on the `/admin/plugins` page.

Configure plugin
----------------

[](#configure-plugin)

### Basic config

[](#basic-config)

Go to the plugin's settings `/admin/plugin_settings/activitypub`

**Configure permissions:**

- *Allow users to enable ActivityPub for their account* for authenticated user
- *Enable ActivityPub for Groups* for groups
- *Allow users to resolve remote activities and actors* to search remote accounts and posts in Fediverse

At this point, when a user has enabled ActivityPub at `/settings/plugins/username/activitypub`, they should be discoverable.

*Test enabled ActivityPub by user on Elgg:*

- Try searching for `@username@yourapp.url` on Mastodon.
- Use Webfinger: `http://yourapp.url/.well-known/webfinger?resource=acct:username@yourapp.url`

If you follow this user, [Follow](https://www.w3.org/TR/activitypub/#follow-activity-inbox) activity will arrive in the inbox and an [Accept](https://www.w3.org/TR/activitypub/#accept-activity-inbox) outbox activity will be created automatically.

**Configure global settings to select how to process ActivityPub activities:**

- Outbox: enable/disable *Send activities*
- Inbox: enable/disable *Process incoming*

This way you can configure your Elgg app as [Client-to-Server](https://www.w3.org/TR/activitypub/#client-to-server-interactions) or [Server-to-Server](https://www.w3.org/TR/activitypub/#server-to-server-interactions) interaction.

**Control domains:**

- Allow *Globally whitelisted domains* to send requests to your app
- Block *Globally blocked domains* from sending requests to your app

**Server parameters:**

Configure your ActivityPub instance.

Read [documentation](https://landrok.github.io/activitypub/activitypub-server-usage.html) to learn more about Server instance configuration.

### Types

[](#types)

On `/admin/activitypub/types` you get an overview of all ActivityPub types configuration entities.

**Core types** are enabled when enabling the bundled Elgg plugin and have locked ActivityPub types.

**Dynamic types** are not enabled yet since this depends on your setup.

Public and Private keys
-----------------------

[](#public-and-private-keys)

Public and private keys are saved in `/data/1/1/activitypub/keys/`, where `data` is your Elgg [data folder](https://learn.elgg.org/en/stable/intro/install.html#create-a-data-folder).

Caching
-------

[](#caching)

For incoming or outgoing requests, images needs to be fetched to get the Inbox endpoint for example.

This is saved in `/data/activitypub/cache/`, where `data` is your Elgg [data folder](https://learn.elgg.org/en/stable/intro/install.html#create-a-data-folder).

Logs
----

[](#logs)

Enable logs in `Development` section at `/admin/plugin_settings/activitypub` to check how the plugin works.

Logs are saved in `/data/activitypub/log/`, where `data` is your Elgg [data folder](https://learn.elgg.org/en/stable/intro/install.html#create-a-data-folder).

Inbox and outbox
----------------

[](#inbox-and-outbox)

Every user and group has an inbox and outbox where activities from remote users are stored and outgoing posts to your followers, unless it's an unlisted or private post.

Administrators can control all ActivityPub activities on `/admin/activitypub/activities` page.

Support
-------

[](#support)

[Frequently Asked Questions](https://github.com/RiverVanRain/activitypub/wiki/FAQ)

[Donate](https://nowpayments.io/donation/elgg)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance49

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

438d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48ce15d46f86b7e95cdf6885d04dfdb9e633e72e80b4f9924fb20c0e39153c28?d=identicon)[rivervanrain](/maintainers/rivervanrain)

---

Top Contributors

[![RiverVanRain](https://avatars.githubusercontent.com/u/2176145?v=4)](https://github.com/RiverVanRain "RiverVanRain (3 commits)")

---

Tags

activitypubelggfediverseindiewebactivitypubfediverse

### Embed Badge

![Health badge](/badges/rivervanrain-activitypub/health.svg)

```
[![Health](https://phpackages.com/badges/rivervanrain-activitypub/health.svg)](https://phpackages.com/packages/rivervanrain-activitypub)
```

###  Alternatives

[aimeos/aimeos-laravel

Cloud native, API first Laravel eCommerce package with integrated AI for ultra-fast online shops, marketplaces and complex B2B projects

8.6k214.7k3](/packages/aimeos-aimeos-laravel)[vonage/client-core

PHP Client for using Vonage's API.

9288.8M18](/packages/vonage-client-core)[thecodingmachine/graphqlite-bundle

A Symfony bundle for thecodingmachine/graphqlite.

371.6M3](/packages/thecodingmachine-graphqlite-bundle)[oxid-esales/graphql-base

OXID eSales GraphQL base module

24101.0k10](/packages/oxid-esales-graphql-base)[zfr/zfr-shopify

PHP library for interacting with the Shopify REST API

37198.8k](/packages/zfr-zfr-shopify)[los/los-rate-limit

Rate Limit Middleware for PHP

2737.9k1](/packages/los-los-rate-limit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
