Clone of Nautilus
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Aaron Parecki d5bf8add82
Merge pull request #2 from diogogithub/patch-1
2 years ago
app Remove unnecessary ternary operator in $digest definition 2 years ago
bootstrap missed a folder 3 years ago
config new laravel project 3 years ago
database add custom properties to profiles 3 years ago
public new laravel project 3 years ago
resources replace home page 3 years ago
routes implement pinned/featured posts 3 years ago
storage new laravel project 3 years ago
tests new laravel project 3 years ago
.editorconfig new laravel project 3 years ago
.env.example update readme with more instructions 3 years ago
.gitattributes new laravel project 3 years ago
.gitignore ignore 3 years ago
LICENSE Create LICENSE 2 years ago
artisan new laravel project 3 years ago
composer.json adds a micropub endpoint to create posts 3 years ago
composer.lock adds a micropub endpoint to create posts 3 years ago
package.json new laravel project 3 years ago
phpunit.xml new laravel project 3 years ago use `activitypub` in the URL and add rewrite example 3 years ago
server.php new laravel project 3 years ago
webpack.mix.js new laravel project 3 years ago


This project is meant to run as a standalone service to deliver posts from your own website to ActivityPub followers. You can run your own website at your own domain, and this service can handle the ActivityPub-specific pieces needed to let people follow your own website from Mastodon or other compatible services.


These instructions assume you've deployed this proxy service to and that your primary domain that you want to use for your ActivityPub identity is

Create a user account in this service

$ php artisan user:create username email name

Fetch the JSON profile from this service to serve on your domain

$ curl

Save that file on your own website in a file named:

Save the below as a file named:

<?xml version="1.0"?>
<XRD xmlns="">
  <Link rel="lrdd" type="application/xrd+xml" template="{uri}"/>

In order for the permalinks of your posts to also live on your domain, you'll need to create an HTTP redirect rule from your server to this service. In nginx, you can create a rewrite rule such as this:

rewrite ^/activitypub/(.+)$1;

Your posts will be identified with a URL on your own domain this way, so that you continue to own the permalinks. This rewrite is required in order for Mastodon and other servers to be able to fetch the JSON version of your posts.


This project uses the Laravel framework. Please refer to the Laravel Configuration Guide for more details.

You'll need to copy .env.example to .env and set up your database connection and queue driver there. It is recommended to use an asynchronous queuing driver such as redis or database, otherwise your server may time out if you have many followers.

Once your queue and database are configured, you can run the worker in the background via:

$ php artisan queue:work



Once your domain is configured to delegate the ActivityPub profile bits to this service, you can now be followed by people on Mastodon. They will be able to search for and click "Follow".


To create a post to deliver to all your followers, you'll need to create a token that you can use to tell this service to deliver a post. From the command line, run:

$ php artisan token:generate yourusername

This will output a new token you can use in a request.

To create a post and deliver it to your followers, send a POST request with the token to this service's post creation endpoint. For example:

$ch = curl_init('');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'Authorization: Bearer xxxxxxxxxxxxxxxxxxx'
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  'h' => 'entry',
  'content' => 'The content of your post'

The background worker will deliver the post to all of your followers.


This is currently a pretty barebones ActivityPub implementation. There are still a few things needed to turn this into a full ActivityPub proxy service.

  • Include photos and videos in posts
  • Support creating replies
  • Support creating likes
  • Support creating reposts
  • Support updating existing posts
  • Support deleting posts
  • Follow other users
  • Deliver posts created by people you follow into somewhere you can read them - likely by pushing them into an Aperture channel, or providing a feed you can subscribe to in an RSS reader
    • Note that I will not implement this as a single feed, but rather you'll be able to group people you follow into different channels, since a single timeline is unsustainable