All Projects → aaronpk → Nautilus

aaronpk / Nautilus

Licence: Apache-2.0 license
Turn your website into an ActivityPub profile

Programming Languages

PHP
23972 projects - #3 most used programming language
Blade
752 projects

Projects that are alternatives of or similar to Nautilus

Rustodon
A Mastodon-compatible, ActivityPub-speaking server in Rust
Stars: ✭ 434 (+689.09%)
Mutual labels:  mastodon, activitypub
activity-pub
API Platform ActivityPub Support
Stars: ✭ 63 (+14.55%)
Mutual labels:  mastodon, activitypub
Mastodon
Your self-hosted, globally interconnected microblogging community
Stars: ✭ 26,120 (+47390.91%)
Mutual labels:  mastodon, activitypub
gomphotherium
Gomphotherium (/ˌɡɒmfəˈθɪəriəm/; "welded beast"), a command line Mastodon client.
Stars: ✭ 22 (-60%)
Mutual labels:  mastodon, activitypub
indigenous-android
An open social app with support for IndieWeb, Mastodon, Pleroma and Pixelfed.
Stars: ✭ 89 (+61.82%)
Mutual labels:  indieweb, mastodon
Social
🎉 Social can be used for work, or to connect to the fediverse!
Stars: ✭ 302 (+449.09%)
Mutual labels:  mastodon, activitypub
The Federation.info
Statistics hub for the Fediverse
Stars: ✭ 101 (+83.64%)
Mutual labels:  mastodon, activitypub
Microstatus
Lightweight Mastodon- and GNU social-compatible ActivityPub and OStatus server implementation
Stars: ✭ 96 (+74.55%)
Mutual labels:  mastodon, activitypub
soundstorm
The Federated Social Audio Platform
Stars: ✭ 26 (-52.73%)
Mutual labels:  mastodon, activitypub
Guidetomastodon
An increasingly less-brief guide to Mastodon
Stars: ✭ 129 (+134.55%)
Mutual labels:  mastodon, activitypub
gotosocial
Golang fediverse server.
Stars: ✭ 400 (+627.27%)
Mutual labels:  mastodon, activitypub
mastodo
A fork of the GNU Social/AP-compatible microblogging server
Stars: ✭ 29 (-47.27%)
Mutual labels:  mastodon, activitypub
merveilles-town
Fork of Mastodon repository with modifications to make Merveilles a town of our own.
Stars: ✭ 23 (-58.18%)
Mutual labels:  mastodon, activitypub
Aardwolf
Powering connected social communities with open software.
Stars: ✭ 379 (+589.09%)
Mutual labels:  mastodon, activitypub
mastodon-lite
Lightweight client for mastodon micro blogging service.
Stars: ✭ 12 (-78.18%)
Mutual labels:  mastodon, activitypub
Wordpress Activitypub
ActivityPub for WordPress
Stars: ✭ 118 (+114.55%)
Mutual labels:  mastodon, activitypub
ligh7hau5
A Matrix (https://matrix.org/docs/spec/) to Fediverse / ActivityPub client / bridge. Also, some media proxying.
Stars: ✭ 26 (-52.73%)
Mutual labels:  mastodon, activitypub
mastodon
Your self-hosted, globally interconnected microblogging community
Stars: ✭ 29,949 (+54352.73%)
Mutual labels:  mastodon, activitypub
mastodon-hnbot
A bot posting the Hacker News stories with 100+ points to Mastodon
Stars: ✭ 37 (-32.73%)
Mutual labels:  mastodon
tut
TUI for Mastodon with vim inspired keys
Stars: ✭ 165 (+200%)
Mutual labels:  mastodon

Nautilus

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.

Setup

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

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 https://proxy.example.com/username.json

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

https://example.com/.well-known/user.json

Save the below as a file named: https://example.com/.well-known/host-meta

<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
  <Link rel="lrdd" type="application/xrd+xml" template="https://example.com/.well-known/user.json?resource={uri}"/>
</XRD>

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/(.+) https://proxy.example.com/username/$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.

Running

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

Usage

Following

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 [email protected] and click "Follow".

Delivery

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('https://proxy.example.com/yourusername/micropub');
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'
]);
curl_exec($ch);

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

Todo

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].