Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tryghost/activitypub
A full-featured ActivityPub server for networked publishing with Ghost
https://github.com/tryghost/activitypub
activitypub fediverse fediverse-server ghost ghost-cms
Last synced: 6 days ago
JSON representation
A full-featured ActivityPub server for networked publishing with Ghost
- Host: GitHub
- URL: https://github.com/tryghost/activitypub
- Owner: TryGhost
- License: mit
- Created: 2024-06-05T09:26:56.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T17:59:08.000Z (12 days ago)
- Last Synced: 2024-10-28T01:11:20.956Z (8 days ago)
- Topics: activitypub, fediverse, fediverse-server, ghost, ghost-cms
- Language: TypeScript
- Homepage: https://activitypub.ghost.org
- Size: 260 KB
- Stars: 115
- Watchers: 8
- Forks: 6
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ActivityPub 🚧
A multitenant ActivityPub server for [Ghost](https://ghost.org/), built with [Fedify](https://fedify.dev/). This service makes it possible for independent websites to publish their content directly to the Fediverse, enabling networked publishing to the open social web.
This repository is being actively developed and is currently in early alpha - expect many breaking changes. It is not suitable for production use.
## Subscribe to updates
We're publishing a weekly build-log about the development of this project. Sign up on [https://activitypub.ghost.org](https://activitypub.ghost.org)[![image](https://github.com/TryGhost/ActivityPub/assets/120485/b341451c-3281-43b8-a6df-e7e34d75f9b5)](https://activitypub.ghost.org)
# How it works
All requests to `/.ghost/activitypub/*` and `/.well-known/webfinger` are proxied to this ActivityPub service using NGINX. All other requests are forwarded to Ghost.
## Current features
- [x] Follow
- [ ] Unfollow
- [x] Auto Accept Follows
- [ ] Manually Accept/Reject Follows
- [x] Publish Articles to Followers
- [x] Receive Articles in Inbox
- [x] Receive Notes in Inbox
# Running locally for development
This has only been tested on MacOS using [Docker for Mac](https://docs.docker.com/desktop/install/mac-install/) and [OrbStack](https://orbstack.dev/).
## Setup
1. **[Install Ghost](https://ghost.org/docs/install/)**
- Ensure Ghost is running locally at `localhost:2368`.
2. **Proxy with [Tailscale](https://tailscale.com/kb/1080/cli?q=cli)** (or [ngrok](https://ngrok.com/))
- Use `tailscale funnel 80` or `ngrok http 80` to expose your local port 80.
3. **Configure Ghost**
- Run `ghost config url` and set it to the URL provided by Tailscale
4. **Start the ActivityPub Service**
- Run `yarn dev` in the root directory of this project
5. **Open Ghost Admin**
- Access your Ghost instance via the URL provided by Tailscale
6. **[Configure a Webhook](https://ghost.org/integrations/custom-integrations/)**
- Set up a webhook for the `post.published` event pointing to `https:///.ghost/activitypub/webhooks/post/published`.
7. **Enable ActivityPub Alpha**
- Enable the ActivityPub Alpha flag in Settings → Labs## Running Tests
- Run `yarn test` to execute tests within a Docker Compose stack.
## Populating the DB
The below command will populate the DB with ~5000 followers for the `activitypub` host
- Run `docker compose run scripts populate-activitypub-db`
![Leaderboard](https://github.com/TryGhost/ActivityPub/assets/115641230/371e8f36-8293-43d2-912a-772e56517e1d)
## Migrations
`docker compose run migrate` or `docker compose run migrate-testing` will run the up migrations against your dev or testing db respectively.
If you would like to run other commands you can run `docker compose exec -it migrate /bin/bash` or `docker compose exec -it migrate-testing /bin/bash` This will drop you into a shell with the `migrate` binary available as well as a $MYSQL_DB environment variable that is correctly formated for use as the `-database` argument to the `migrate` binary
# Copyright & license
Copyright (c) 2013-2024 Ghost Foundation - Released under the [MIT license](LICENSE). Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our [trademark policy](https://ghost.org/trademark/) for info on acceptable usage.